/* AG Reviews — front end. Every value is a custom property so themes and Elementor can override it. */
.agr {
	--agr-bg: #ffffff;
	--agr-card-bg: #ffffff;
	--agr-card-border: rgba(15, 23, 42, .08);
	--agr-card-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
	--agr-text: #0f172a;
	--agr-muted: #64748b;
	--agr-radius: 16px;
	--agr-gap: 20px;
	--agr-pad: 22px;
	--agr-star-empty: rgba(15, 23, 42, .12);
	--agr-star-size: 16px;
	--agr-reply-bg: rgba(15, 23, 42, .035);
	--agr-font: inherit;
	box-sizing: border-box;
	color: var(--agr-text);
	font-family: var(--agr-font);
	line-height: 1.55;
}
.agr *, .agr *::before, .agr *::after { box-sizing: border-box; }

/* Themes (used by shortcode/block; Elementor controls override them) */
.agr-theme-dark {
	--agr-card-bg: #111827;
	--agr-card-border: rgba(255, 255, 255, .08);
	--agr-card-shadow: 0 10px 30px -15px rgba(0, 0, 0, .6);
	--agr-text: #f1f5f9;
	--agr-muted: #94a3b8;
	--agr-star-empty: rgba(255, 255, 255, .15);
	--agr-reply-bg: rgba(255, 255, 255, .05);
}
.agr-theme-minimal { --agr-card-shadow: none; --agr-card-border: transparent; --agr-card-bg: transparent; --agr-pad: 4px 0; }
.agr-theme-card { --agr-radius: 22px; --agr-card-shadow: 0 20px 45px -25px rgba(15, 23, 42, .35); --agr-card-border: transparent; }

/* Header */
.agr-header {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
	margin-bottom: calc(var(--agr-gap) * 1.2);
}
.agr-header-main { display: flex; align-items: center; gap: 14px; }
.agr-header .agr-glogo svg { width: 36px; height: 36px; display: block; }
.agr-business { font-weight: 650; font-size: 1.05em; letter-spacing: -.01em; }
.agr-header-rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agr-avg { font-weight: 700; font-size: 1.15em; font-variant-numeric: tabular-nums; }
.agr-count { color: var(--agr-muted); font-size: .9em; }

.agr-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; border-radius: 999px; border: 0;
	background: var(--agr-accent, #1A73E8); color: #fff !important; text-decoration: none !important;
	font-weight: 600; font-size: .92em; line-height: 1.2; cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
	box-shadow: 0 6px 16px -8px var(--agr-accent, #1A73E8);
}
.agr-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* Stars */
.agr-stars { position: relative; display: inline-block; line-height: 0; white-space: nowrap; width: max-content; max-width: max-content; flex: none; }
.agr-card > .agr-stars { align-self: flex-start; }
.agr-stars svg { width: var(--agr-star-size); height: var(--agr-star-size); margin-right: 2px; }
.agr-stars-bg svg { fill: var(--agr-star-empty); }
.agr-stars-fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.agr-stars-fg svg { fill: var(--agr-star, #FBBC04); }

/* Card */
.agr-card {
	position: relative; display: flex; flex-direction: column; gap: 12px;
	padding: var(--agr-pad); border-radius: var(--agr-radius);
	background: var(--agr-card-bg); border: 1px solid var(--agr-card-border);
	box-shadow: var(--agr-card-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
	height: 100%;
}
.agr-card-head { display: flex; align-items: center; gap: 12px; }
.agr-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.agr-avatar-initial {
	display: inline-flex; align-items: center; justify-content: center;
	background: hsl(var(--agr-hue, 210) 70% 92%); color: hsl(var(--agr-hue, 210) 55% 32%);
	font-weight: 700; font-size: 1.05em;
}
.agr-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.agr-name { font-weight: 650; color: inherit !important; text-decoration: none !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agr-date { color: var(--agr-muted); font-size: .85em; }
.agr-gicon svg { width: 20px; height: 20px; display: block; }
.agr-text p { margin: 0; }
.agr .agr-toggle {
	background: none; border: 0; padding: 0; margin-top: 6px;
	color: var(--agr-accent, #1A73E8); font: inherit; font-size: .9em; font-weight: 600; cursor: pointer;
}
.agr-reply { background: var(--agr-reply-bg); border-left: 3px solid var(--agr-accent, #1A73E8); border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: .92em; }
.agr-reply p { margin: 4px 0 0; }
.agr-reply-label { font-weight: 650; font-size: .85em; color: var(--agr-muted); }

/* Grid / list / masonry — columns follow the container: never narrower than --agr-min-card. */
.agr-feed { --agr-min-card: 240px; }
.agr-items {
	display: grid; gap: var(--agr-gap);
	grid-template-columns: repeat(auto-fill, minmax(max(min(var(--agr-min-card), 100%), calc((100% - (var(--agr-cols, 3) - 1) * var(--agr-gap)) / var(--agr-cols, 3))), 1fr));
}
.agr-layout-list .agr-items { grid-template-columns: 1fr; }
.agr-layout-masonry .agr-items { display: block; columns: var(--agr-cols, 3) var(--agr-min-card); column-gap: var(--agr-gap); }
.agr-layout-masonry .agr-card { break-inside: avoid; margin-bottom: var(--agr-gap); height: auto; }
@media (max-width: 1024px) {
	.agr-items { --agr-cols: var(--agr-cols-t, 2); }
}
@media (max-width: 640px) {
	.agr-items { --agr-cols: var(--agr-cols-m, 1); }
}

.agr-more-wrap { display: flex; justify-content: center; margin-top: calc(var(--agr-gap) * 1.2); }
.agr-more {
	padding: 11px 22px; border-radius: 999px; border: 1px solid var(--agr-card-border);
	background: var(--agr-card-bg); color: var(--agr-text); font: inherit; font-weight: 600; cursor: pointer;
}
.agr-more[aria-busy="true"] { opacity: .6; pointer-events: none; }
.agr-empty { color: var(--agr-muted); }

/* Slider & carousel (scroll-snap, no library) */
.agr-slider { position: relative; --agr-per: var(--agr-cols, 3); }
@media (max-width: 1024px) { .agr-slider { --agr-per: var(--agr-cols-t, 2); } }
@media (max-width: 640px) { .agr-slider { --agr-per: var(--agr-cols-m, 1); } }
.agr-track {
	display: flex; gap: var(--agr-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; padding: 6px 2px 12px; outline: none;
}
.agr-track::-webkit-scrollbar { display: none; }
.agr-slide { flex: 0 0 max(min(var(--agr-min-card, 240px), 85%), calc((100% - (var(--agr-per) - 1) * var(--agr-gap)) / var(--agr-per))); min-width: 0; scroll-snap-align: start; }
.agr-layout-carousel .agr-slide { flex-basis: calc((100% - (var(--agr-per) - 1) * var(--agr-gap)) / var(--agr-per) * .9); scroll-snap-align: center; transition: transform .35s ease, opacity .35s ease; opacity: .55; transform: scale(.94); }
.agr-layout-carousel .agr-slide.is-active { opacity: 1; transform: none; }
.agr-nav {
	position: absolute; top: 50%; transform: translateY(-60%); z-index: 2;
	width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--agr-card-border);
	background: var(--agr-card-bg); color: var(--agr-text); box-shadow: var(--agr-card-shadow);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
	transition: opacity .2s ease, transform .2s ease;
}
.agr-nav svg { width: 20px; height: 20px; }
.agr-nav:hover { transform: translateY(-60%) scale(1.06); }
.agr-nav[disabled] { opacity: 0; pointer-events: none; }
.agr-prev { left: -14px; }
.agr-next { right: -14px; }
.agr-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.agr-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(128, 128, 128, .35); cursor: pointer; transition: width .25s ease, background .25s ease; }
.agr-dots button[aria-selected="true"] { width: 22px; background: var(--agr-accent, #1A73E8); }

/* Badge */
.agr-badge-wrap { display: block; }
.agr-badge {
	display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--agr-text) !important;
	background: var(--agr-card-bg); border: 1px solid var(--agr-card-border); box-shadow: var(--agr-card-shadow);
	padding: 8px 16px 8px 10px; border-radius: 999px; transition: transform .15s ease;
}
a.agr-badge:hover { transform: translateY(-1px); }
.agr-badge .agr-glogo svg { width: 26px; height: 26px; display: block; }
.agr-badge-body { display: flex; flex-direction: column; line-height: 1.25; }
.agr-badge-pill .agr-badge-body { flex-direction: row; align-items: center; gap: 8px; }
.agr-badge-rating { display: inline-flex; align-items: center; gap: 6px; }
.agr-badge-label { font-weight: 600; font-size: .85em; }
.agr-badge-inline { background: none; border: 0; box-shadow: none; padding: 0; }
.agr-badge-card { border-radius: var(--agr-radius); padding: 16px 20px; gap: 14px; }
.agr-badge-card .agr-glogo svg { width: 34px; height: 34px; }
.agr-badge-button { background: var(--agr-accent, #1A73E8); color: #fff !important; border: 0; --agr-star: #fff; --agr-star-empty: rgba(255,255,255,.35); }
.agr-badge-button .agr-count { color: rgba(255, 255, 255, .85); }
.agr-badge-button .agr-glogo { background: #fff; border-radius: 50%; padding: 4px; }
.agr-badge-button .agr-glogo svg { width: 20px; height: 20px; }

/* Summary */
.agr-summary {
	display: grid; grid-template-columns: auto 1fr; gap: 24px 32px; align-items: center;
	background: var(--agr-card-bg); border: 1px solid var(--agr-card-border); box-shadow: var(--agr-card-shadow);
	border-radius: var(--agr-radius); padding: calc(var(--agr-pad) * 1.2);
}
.agr-summary-score { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.agr-summary-score .agr-glogo svg { width: 28px; height: 28px; }
.agr-avg-xl { font-size: 3em; line-height: 1; letter-spacing: -.03em; }
.agr-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.agr-bars li { display: grid; grid-template-columns: 16px 1fr 44px; align-items: center; gap: 10px; font-size: .9em; }
.agr-bar { height: 8px; border-radius: 99px; background: var(--agr-star-empty); overflow: hidden; }
.agr-bar span { display: block; height: 100%; background: var(--agr-star, #FBBC04); border-radius: inherit; }
.agr-bar-count { color: var(--agr-muted); text-align: right; font-variant-numeric: tabular-nums; }
.agr-summary .agr-write { grid-column: 1 / -1; justify-self: center; }
@media (max-width: 520px) { .agr-summary { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
	.agr *, .agr-track { transition: none !important; scroll-behavior: auto !important; }
}

/* 0.2.1: source icon, natural card height, summary note */
.agr-qicon svg { fill: var(--agr-muted); opacity: .45; width: 20px; height: 20px; }
.agr-natural .agr-items { align-items: start; }
.agr-natural .agr-card { height: auto; }
.agr-natural .agr-track { align-items: flex-start; }
.agr-equal .agr-track { align-items: stretch; }
.agr-summary-bars { min-width: 0; }
.agr-bars-note { margin: 10px 0 0; color: var(--agr-muted); font-size: .82em; }
