/*
 * Reviews Chk 1.1. The widget takes the site's font and adapts to the width it is given (container queries), not
 * to the screen. Colors come from CSS variables set on any parent: --rvc-* (light backgrounds) and --rvc-dark-*
 * (dark backgrounds): --rvc-accent (stars), --rvc-text, --rvc-muted, --rvc-heading, --rvc-card, --rvc-line,
 * --rvc-link, --rvc-radius. The DC Reviews names (--dcr-*) and the Digital Checkmark kit variables (--dk-*) are read
 * too. Internal --_rvc-* variables hold the result; the star color chosen in Setup is set on the widget itself.
 */
.rvc-reviews {
	--_rvc-card: var(--rvc-card, var(--dcr-card, #FFFFFF));
	--_rvc-text: var(--rvc-text, var(--dcr-text, var(--dk-texto, #2A302C)));
	--_rvc-muted: var(--rvc-muted, var(--dcr-muted, var(--dk-gris, #5D6661)));
	--_rvc-line: var(--rvc-line, var(--dcr-line, var(--dk-linea, rgb(17 24 20 / .12))));
	--_rvc-accent: var(--rvc-accent, var(--dcr-accent, var(--dk-marca, #E8A317)));
	--_rvc-empty: var(--rvc-empty, rgb(17 24 20 / .14));
	--_rvc-link: var(--rvc-link, var(--dcr-link, var(--dk-primario, #1F2A24)));
	--_rvc-heading: var(--rvc-heading, var(--dcr-heading, var(--dk-oscuro, #141A16)));
	--_rvc-soft: var(--rvc-soft, var(--dcr-soft, var(--dk-alterno, #EEF1EE)));
	--_rvc-radius: var(--rvc-radius, var(--dcr-radius, 18px));
	--_rvc-shadow: 0 1px 2px rgb(17 24 20 / .05), 0 8px 24px -12px rgb(17 24 20 / .12);
	container-type: inline-size;
	min-width: 0;
	max-width: 100%;
	width: 100%;
	color: var(--_rvc-text);
	font-family: inherit;
	line-height: 1.55;
	text-align: start;
}
.rvc-reviews--dark,
.dk-resenas-oscuro .rvc-reviews {
	--_rvc-card: var(--rvc-dark-card, rgb(255 255 255 / .06));
	--_rvc-text: var(--rvc-dark-text, #EEF2EF);
	--_rvc-muted: var(--rvc-dark-muted, rgb(238 242 239 / .7));
	--_rvc-line: var(--rvc-dark-line, rgb(255 255 255 / .14));
	--_rvc-accent: var(--rvc-dark-accent, var(--dk-resalte, #F2BE4B));
	--_rvc-empty: var(--rvc-dark-empty, rgb(255 255 255 / .2));
	--_rvc-link: var(--rvc-dark-link, #FFFFFF);
	--_rvc-heading: var(--rvc-dark-heading, #FFFFFF);
	--_rvc-soft: var(--rvc-dark-soft, rgb(255 255 255 / .12));
	--_rvc-shadow: none;
}
.rvc-reviews *, .rvc-reviews *::before, .rvc-reviews *::after { box-sizing: border-box; }
/* In a flex parent (Elementor containers) the track would otherwise grow to its content and push the page sideways */
.elementor-widget-shortcode:has(.rvc-reviews),
.elementor-widget-dc_reviews, .elementor-widget-reviews_chk { min-width: 0; max-width: 100%; width: 100%; }

/* Stars: one element, filled to the rating. Each star is 1em wide with a 0.2em gap (the mask tile). */
.rvc-stars {
	display: inline-block; flex: none; width: 5.8em; height: 1em; font-size: 16px; vertical-align: -0.12em;
	background: linear-gradient(90deg, var(--_rvc-accent) var(--rvc-fill, 100%), var(--_rvc-empty) 0);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M10 .8l2.75 5.6 6.2.9-4.48 4.37 1.06 6.17L10 14.93l-5.53 2.91 1.06-6.17L1.05 7.3l6.2-.9z'/%3E%3C/svg%3E") 0 0 / 1.2em 1em repeat-x;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M10 .8l2.75 5.6 6.2.9-4.48 4.37 1.06 6.17L10 14.93l-5.53 2.91 1.06-6.17L1.05 7.3l6.2-.9z'/%3E%3C/svg%3E") 0 0 / 1.2em 1em repeat-x;
}
@media (forced-colors: active) { .rvc-stars { forced-color-adjust: none; background: CanvasText; } }

/* ---------- Top: the summary (big rating, stars, total) and the carousel arrows ---------- */
.rvc-reviews__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.rvc-reviews__summary { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rvc-reviews .rvc-reviews__score {
	font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--_rvc-heading);
	font-variant-numeric: tabular-nums lining-nums;
}
.rvc-reviews__meta { display: grid; gap: 6px; min-width: 0; }
.rvc-reviews__meta .rvc-stars { font-size: 20px; }
.rvc-reviews__total { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: .875rem; color: var(--_rvc-muted); font-variant-numeric: tabular-nums; }
.rvc-reviews__g { flex: none; width: 16px; height: 16px; vertical-align: -3px; }
.rvc-reviews__source .rvc-reviews__g { margin-inline-end: 6px; }
.rvc-reviews__source a { margin-inline-start: 6px; white-space: nowrap; }
.rvc-reviews__maps { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.rvc-reviews__arrows { display: flex; gap: 8px; flex: none; margin-inline-start: auto; }
/* Theme button styles (padding, min-width, backgrounds) must not change the controls: fixed sizes */
.rvc-reviews button.rvc-reviews__arrow {
	width: 44px !important; height: 44px !important; min-width: 0 !important; min-height: 0 !important; flex: 0 0 44px; padding: 0 !important; margin: 0;
	border-radius: 50%; border: 1px solid var(--_rvc-line); background: var(--_rvc-card) !important; box-shadow: none !important;
	color: var(--_rvc-heading) !important; cursor: pointer; display: grid; place-items: center; transition: background-color .15s, color .15s, border-color .15s, opacity .15s;
}
.rvc-reviews__arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rvc-reviews button.rvc-reviews__arrow:hover,
.rvc-reviews button.rvc-reviews__arrow:focus-visible { background: var(--_rvc-heading) !important; border-color: var(--_rvc-heading); color: var(--_rvc-card) !important; }
.rvc-reviews--dark button.rvc-reviews__arrow:hover,
.rvc-reviews--dark button.rvc-reviews__arrow:focus-visible,
.dk-resenas-oscuro .rvc-reviews button.rvc-reviews__arrow:hover { background: #FFFFFF !important; color: #141A16 !important; }
.rvc-reviews button.rvc-reviews__arrow[aria-disabled="true"] { opacity: .35; cursor: default; }
.rvc-reviews button.rvc-reviews__arrow[aria-disabled="true"]:hover { background: var(--_rvc-card) !important; color: var(--_rvc-heading) !important; border-color: var(--_rvc-line); }
.rvc-reviews :focus-visible { outline: 2px solid var(--_rvc-heading); outline-offset: 2px; }

/* ---------- The reviews ---------- */
.rvc-reviews__track { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; align-items: start; }
.rvc-reviews__card {
	position: relative; margin: 0; padding: 22px 22px 20px; background: var(--_rvc-card); color: var(--_rvc-text);
	border: 1px solid var(--_rvc-line); border-radius: var(--_rvc-radius); box-shadow: var(--_rvc-shadow);
	display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.rvc-reviews .rvc-reviews__author { display: flex; align-items: center; gap: 12px; margin: 0; font-style: normal; min-width: 0; }
.rvc-reviews__photo, .rvc-reviews__initial { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; object-fit: cover; }
.rvc-reviews__initial { display: grid; place-items: center; background: var(--_rvc-soft); color: var(--_rvc-heading); font-weight: 700; font-size: 1rem; }
.rvc-reviews__who { display: grid; min-width: 0; line-height: 1.3; }
.rvc-reviews__name { font-size: .975rem; font-weight: 650; color: var(--_rvc-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rvc-reviews .rvc-reviews__name a { color: inherit; text-decoration: none; }
.rvc-reviews .rvc-reviews__name a:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.rvc-reviews__when { font-size: .8125rem; color: var(--_rvc-muted); }
.rvc-reviews .rvc-reviews__when a { color: inherit; text-decoration: none; }
.rvc-reviews .rvc-reviews__when a:hover { color: var(--_rvc-link); text-decoration: underline; text-underline-offset: 3px; }
.rvc-reviews__card > .rvc-stars { font-size: 15px; }
.rvc-reviews__text { margin: 0; padding: 0; border: 0; background: none; color: var(--_rvc-text); font-size: 1rem; line-height: 1.6; font-style: normal; quotes: none; }
.rvc-reviews__text::before, .rvc-reviews__text::after { content: none; }
.rvc-reviews__text p { margin: 0; display: -webkit-box; -webkit-line-clamp: 6; line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rvc-reviews__card.is-open .rvc-reviews__text p { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.rvc-reviews button.rvc-reviews__toggle {
	all: unset; align-self: flex-start; cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--_rvc-link);
	text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.rvc-reviews button.rvc-reviews__toggle:focus-visible { outline: 2px solid var(--_rvc-heading); outline-offset: 2px; border-radius: 3px; }
.rvc-reviews button.rvc-reviews__toggle[hidden] { display: none; }

/* Carousel: one row that slides; the next card peeks in so it reads as more to see. */
.rvc-reviews--carousel .rvc-reviews__track {
	display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
	padding: 2px 2px 14px; margin: -2px -2px 0; scrollbar-width: none; overscroll-behavior-x: contain; align-items: stretch;
}
.rvc-reviews--carousel .rvc-reviews__track::-webkit-scrollbar { display: none; }
.rvc-reviews--carousel .rvc-reviews__card { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; }
@container (max-width: 900px) { .rvc-reviews--carousel .rvc-reviews__card { flex-basis: calc((100% - 20px) / 2.15); } }
@container (max-width: 560px) { .rvc-reviews--carousel .rvc-reviews__card { flex-basis: 86%; } }
.rvc-reviews__dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.rvc-reviews button.rvc-reviews__dot {
	width: 8px !important; height: 8px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0; border: 0 !important;
	border-radius: 4px; background: var(--_rvc-line) !important; box-shadow: none !important; cursor: pointer;
	transition: width .2s ease, background-color .2s ease;
}
.rvc-reviews button.rvc-reviews__dot.is-current { width: 22px !important; background: var(--_rvc-heading) !important; }

/* List: one under the other, no boxes; for sidebars and narrow columns. */
.rvc-reviews--list .rvc-reviews__track { grid-template-columns: minmax(0, 1fr); gap: 0; }
.rvc-reviews--list .rvc-reviews__card { background: none; border: 0; border-bottom: 1px solid var(--_rvc-line); border-radius: 0; box-shadow: none; padding: 20px 0; }
.rvc-reviews--list .rvc-reviews__card:first-child { padding-top: 4px; }

/* Badge: the rating and the total, small, linking to all the reviews. */
.rvc-reviews--badge { width: auto; display: inline-block; container-type: normal; }
.rvc-reviews .rvc-reviews__badge {
	display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 16px; border-radius: 999px;
	background: var(--_rvc-card); border: 1px solid var(--_rvc-line); box-shadow: var(--_rvc-shadow); color: var(--_rvc-text); text-decoration: none;
}
.rvc-reviews a.rvc-reviews__badge:hover { border-color: var(--_rvc-heading); color: var(--_rvc-text); }
.rvc-reviews__badge .rvc-reviews__score { font-size: 1.25rem; letter-spacing: -.01em; }
.rvc-reviews__badge .rvc-stars { font-size: 15px; }
.rvc-reviews__badge .rvc-reviews__total { font-size: .8125rem; }
.rvc-reviews--badge .dchk-attribution { margin-top: 6px; }

/* ---------- Source, filter note and "see all" (what Google requires next to its reviews) ---------- */
.rvc-reviews__source { display: block; margin: 14px 0 0; font-size: .8125rem; line-height: 1.45; color: var(--_rvc-muted); }
.rvc-reviews .rvc-reviews__source a { color: var(--_rvc-link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* Theme and Elementor link colors load later; the plugin's own links keep their color */
.rvc-reviews .rvc-reviews__source a:hover { color: var(--_rvc-link); text-decoration-thickness: 2px; }
.rvc-reviews .dchk-attribution { color: var(--_rvc-muted); }

@container (max-width: 480px) {
	.rvc-reviews .rvc-reviews__score { font-size: 2.4rem; }
	.rvc-reviews__card { padding: 18px 18px 16px; }
	.rvc-reviews__top { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
	.rvc-reviews button.rvc-reviews__dot, .rvc-reviews button.rvc-reviews__arrow { transition: none; }
}
