/* Amazon-Style Reviews — CSS
   Tweak the color variables below to match your brand instead of Amazon orange/blue if you like. */

:root {
	--asr-star-color: #de7921;
	--asr-star-empty-color: #d9d9d9;
	--asr-link-color: #007185;
	--asr-bar-fill-color: #de7921;
	--asr-bar-track-color: #ffffff;
	--asr-bar-border-color: #d5d9d9;
	--asr-text-color: #0f1111;
	--asr-positive-color: #007600;
	--asr-negative-color: #c40000;
}

/* ---------- Stars (shared by badge + histogram) ---------- */
.asr-stars {
	display: inline-flex;
	align-items: center;
	font-size: 18px;
	line-height: 1;
	letter-spacing: 1px;
}
.asr-star { display: inline-block; }
.asr-star-full,
.asr-star-half { color: var(--asr-star-color); }
.asr-star-empty { color: var(--asr-star-empty-color); }

/* ---------- Compact badge (near title) ---------- */
.asr-badge {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 12px;
	font-family: inherit;
}
.asr-badge-text,
.asr-badge-count {
	font-size: 14px;
	color: var(--asr-link-color);
	text-decoration: none;
}
.asr-badge-text:hover,
.asr-badge-count:hover { text-decoration: underline; }

/* ---------- Full histogram (Reviews tab) ---------- */
.asr-histogram {
	max-width: 420px;
	margin-bottom: 24px;
	font-family: inherit;
	color: var(--asr-text-color);
}
.asr-histogram-title,
.asr-histogram .asr-histogram-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.3;
}
.asr-histogram-summary {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 2px;
}
.asr-histogram-average {
	font-size: 14px;
}
.asr-histogram-total {
	font-size: 13px;
	color: #565959;
	margin: 0 0 16px;
}

.asr-histogram-bars {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.asr-histogram-row {
	display: grid;
	grid-template-columns: 44px 1fr 36px;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--asr-link-color);
}
.asr-histogram-label {
	font-size: 13px;
	white-space: nowrap;
}
.asr-histogram-bar-track {
	position: relative;
	height: 16px;
	background: var(--asr-bar-track-color);
	border: 1px solid var(--asr-bar-border-color);
	border-radius: 3px;
	overflow: hidden;
}
.asr-histogram-bar-fill {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	background: var(--asr-bar-fill-color);
}
.asr-histogram-percent {
	font-size: 13px;
	text-align: right;
	color: var(--asr-text-color);
}
.asr-histogram-row:hover .asr-histogram-label,
.asr-histogram-row:hover .asr-histogram-percent {
	text-decoration: underline;
}

/* ---------- AI "Customers say" summary ---------- */
.asr-ai-summary {
	max-width: 620px;
	margin: 8px 0 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e7e7e7;
	font-family: inherit;
	color: var(--asr-text-color);
}
.asr-ai-summary-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 8px;
}
.asr-ai-summary-text {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 6px;
}
.asr-ai-summary-disclaimer {
	font-size: 12px;
	color: #565959;
	margin: 0 0 14px;
	display: flex;
	align-items: center;
	gap: 4px;
}
.asr-ai-summary-disclaimer-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 3px;
	background: #e7e7e7;
	color: #565959;
	font-size: 9px;
	font-weight: 700;
}
.asr-ai-summary-learnmore {
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 8px;
}
.asr-ai-summary-chips {
	font-size: 13px;
	line-height: 2;
}
.asr-chip,
.asr-ai-summary-chips .asr-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	background-color: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	line-height: inherit;
	color: var(--asr-link-color);
	white-space: nowrap;
	cursor: pointer;
	padding: 0;
	margin: 0;
}
.asr-chip:hover {
	text-decoration: underline;
}
.asr-chip-divider {
	display: inline-block;
	margin: 0 10px;
	color: #d5d9d9;
}
.asr-chip-icon {
	font-weight: 700;
}
.asr-chip-positive .asr-chip-icon { color: var(--asr-positive-color); }
.asr-chip-negative .asr-chip-icon { color: var(--asr-negative-color); }
.asr-chip-mixed .asr-chip-icon { color: #6b6b6b; }
.asr-chip-count {
	color: var(--asr-text-color);
}

/* ---------- Theme excerpt panel target (lives in Full Bundle; chips inject into it) ---------- */
.asr-theme-panel-source {
	display: none !important; /* never shown directly — pure data source, cloned via JS */
}
.asr-theme-panel-target {
	position: relative;
	margin: 4px 0 16px;
	padding: 16px 40px 16px 16px;
	border: 1px solid #d5d9d9;
	border-radius: 8px;
	background: #fff;
}
.asr-theme-panel-close,
.asr-theme-panel-target .asr-theme-panel-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: auto;
	height: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	background-color: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	font-size: 22px;
	line-height: 1;
	color: #565959;
	cursor: pointer;
	padding: 0;
	margin: 0;
}
.asr-theme-panel-close:hover {
	color: var(--asr-text-color);
}
.asr-theme-panel-header {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 8px;
	color: var(--asr-text-color);
}
.asr-theme-panel-positive {
	margin-left: 10px;
	color: var(--asr-positive-color);
	font-weight: 600;
}
.asr-theme-panel-negative {
	margin-left: 10px;
	color: var(--asr-negative-color);
	font-weight: 600;
}
.asr-theme-panel-blurb {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 12px;
	color: var(--asr-text-color);
}
.asr-theme-panel-excerpt {
	font-size: 13px;
	line-height: 1.5;
	margin: 0 0 10px;
	color: #333;
	font-style: italic;
}

/* ---------- Review List widget ---------- */
.asr-review-list {
	max-width: 680px;
	font-family: inherit;
	color: var(--asr-text-color);
}
.asr-review-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	min-height: 28px;
}
.asr-review-filter-status {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	background: #f5f8f8;
	border: 1px solid #d5d9d9;
	border-radius: 4px;
	padding: 6px 12px;
}
.asr-review-clear-filter,
.asr-review-filter-status .asr-review-clear-filter {
	display: inline;
	width: auto;
	height: auto;
	background: none;
	background-color: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	color: var(--asr-link-color);
	font-size: 13px;
	font-weight: 400;
	line-height: inherit;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
	margin: 0;
}
.asr-review-sort-label {
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	white-space: nowrap;
	flex-shrink: 0;
}
.asr-review-sort-select {
	font-size: 12px;
	padding: 4px 6px;
}

.asr-review-item {
	padding: 14px 0;
	border-bottom: 1px solid #e7e7e7;
}
.asr-review-item.asr-hidden {
	display: none;
}
.asr-review-item-stars .asr-stars {
	font-size: 14px;
}
.asr-review-item-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 6px;
	font-size: 12px;
	color: #565959;
}
.asr-review-item-author {
	color: var(--asr-text-color);
	font-size: 13px;
}
.asr-review-item-verified {
	background: #f0f0f0;
	border-radius: 10px;
	padding: 1px 8px;
	font-size: 11px;
	color: #565959;
}
.asr-review-item-text {
	font-size: 14px;
	line-height: 1.5;
}
.asr-review-item-text p {
	margin: 0 0 8px;
}

.asr-show-more {
	display: block;
	width: 100%;
	margin: 20px 0;
	background: #fff;
	border: 1px solid #d5d9d9;
	border-radius: 8px;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	padding: 14px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--asr-link-color);
	text-align: center;
	cursor: pointer;
}
.asr-show-more:hover {
	background: #f7f7f7;
}

.asr-review-empty {
	font-size: 14px;
	color: #565959;
}

.asr-review-form {
	margin-top: 24px;
	display: none;
}
.asr-review-form.asr-open {
	display: block;
}

/* ---------- Two-column bundle layout ---------- */
.asr-bundle-grid {
	display: grid;
	grid-template-columns: minmax(240px, 380px) 1fr;
	gap: 40px;
	margin: 20px 0 32px;
	align-items: start;
}
@media (max-width: 700px) {
	.asr-bundle-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}
.asr-bundle-col-left .asr-histogram {
	max-width: none;
}
.asr-bundle-col-right .asr-ai-summary {
	max-width: none;
	border-bottom: none;
	padding-bottom: 0;
}

/* ---------- "Review this product" CTA ---------- */
.asr-review-cta {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e7e7e7;
}
.asr-review-cta-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px;
}
.asr-review-cta-text {
	font-size: 13px;
	color: #565959;
	margin: 0 0 12px;
}
.asr-write-review-btn {
	background: #fff;
	border: 1px solid #888c8c;
	border-radius: 20px;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	padding: 8px 20px;
	font-size: 13px;
	font-weight: 600;
	color: var(--asr-text-color);
	cursor: pointer;
}
.asr-write-review-btn:hover {
	background: #f7f7f7;
}

/* ---------- Review item avatar ---------- */
.asr-review-item-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}
.asr-review-item-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #a8b0b0;
	color: #ffffff;
	flex-shrink: 0;
}

/* ---------- Buy Box (modern, not a literal Amazon skin) ---------- */
.asr-buybox {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
	padding: 4px 0;
	border: none;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: none;
	font-family: inherit;
	color: var(--asr-text-color);
}
.asr-buybox-price-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 4px;
}
.asr-buybox-badge {
	display: inline-block;
	background: #c40000;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.asr-buybox-price {
	font-size: 22px;
	font-weight: 600;
	color: var(--asr-text-color);
}
.asr-buybox-typical {
	font-size: 13px;
	color: #9ca3af;
	margin: 0 0 12px;
}
.asr-buybox-stock {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 8px 0 2px;
}
.asr-buybox-instock {
	color: #16794f;
}
.asr-buybox-oos {
	color: #c40000;
}
.asr-buybox-delivery {
	font-size: 12px;
	color: #9ca3af;
	text-align: center;
	margin: 14px 0 0;
}

.asr-buybox-form-wrap {
	margin-top: 18px;
}
/* Reskin WooCommerce's native form output (quantity input + Add to Cart) */
.asr-buybox-form-wrap .quantity {
	display: block;
	margin-bottom: 14px;
}
.asr-buybox-form-wrap .quantity .qty {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 14px;
}

/* Amazon-style "Quantity: 1 ▾" dropdown box (when quantity_as_select is on) */
.asr-qty-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	margin-bottom: 14px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
}
.asr-qty-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b7280;
	white-space: nowrap;
}
.asr-qty-select.qty {
	flex: 1;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	border: none;
	background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 2px center;
	padding: 0 20px 0 4px;
	font-size: 14px;
	font-weight: 500;
	color: var(--asr-text-color);
	cursor: pointer;
	width: auto;
}
.asr-buybox-form-wrap .single_add_to_cart_button,
.asr-buybox-form-wrap .asr-buybox-buy-now {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	box-sizing: border-box;
	margin: 0 0 10px;
	padding: 15px 18px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-family: inherit;
	box-shadow: none;
	transition: opacity 0.15s ease;
}
.asr-buybox-form-wrap .single_add_to_cart_button {
	background-color: #171717;
	border-color: #171717;
	color: #ffffff;
}
.asr-buybox-form-wrap .asr-buybox-buy-now {
	background-color: #ffffff;
	border-color: #171717;
	color: #171717;
}
.asr-buybox-form-wrap .single_add_to_cart_button:hover,
.asr-buybox-form-wrap .asr-buybox-buy-now:hover {
	opacity: 0.85;
}
/* Loose reset for whatever a subscription-toggle plugin (e.g. APFS) renders
   inside this form, so it doesn't clash visually with the rest of the box.
   Fine-tuning this further may need real testing against the live markup —
   APFS's exact class names/structure aren't something I've verified live. */
.asr-buybox-form-wrap fieldset,
.asr-buybox-form-wrap .wcsatt-options-wrapper {
	border: none;
	padding: 0;
	margin: 0 0 14px;
	font-size: 13px;
}
/* Style individual purchase-option rows (best-effort — targets common
   list-item / label patterns subscription-toggle plugins tend to use). */
.asr-buybox-form-wrap fieldset ul,
.asr-buybox-form-wrap .wcsatt-options-wrapper ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.asr-buybox-form-wrap fieldset li,
.asr-buybox-form-wrap .wcsatt-options-wrapper li {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 12px 14px;
}
.asr-buybox-form-wrap fieldset li:has(input:checked),
.asr-buybox-form-wrap .wcsatt-options-wrapper li:has(input:checked) {
	border-color: #171717;
	border-width: 2px;
}
.asr-buybox-form-wrap fieldset label,
.asr-buybox-form-wrap .wcsatt-options-wrapper label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
}

/* Hide Stripe/PayPal express-checkout buttons + their "OR" dividers when
   injected into our form via the standard WooCommerce add-to-cart hooks.
   !important is intentional here — this is suppressing third-party plugin
   output we don't control, not fighting our own controllable styles. */
.asr-buybox-form-wrap.asr-hide-express [id*="stripe-payment-request"],
.asr-buybox-form-wrap.asr-hide-express [class*="stripe-payment-request"],
.asr-buybox-form-wrap.asr-hide-express [class*="wc-stripe-payment-request"],
.asr-buybox-form-wrap.asr-hide-express [id*="ppc-button"],
.asr-buybox-form-wrap.asr-hide-express [class*="ppcp-button"],
.asr-buybox-form-wrap.asr-hide-express [class*="paypal-button"],
.asr-buybox-form-wrap.asr-hide-express [id*="paypal-button"],
.asr-buybox-form-wrap.asr-hide-express [class*="express-checkout"],
.asr-buybox-form-wrap.asr-hide-express [class*="payment-request-button-separator"],
.asr-buybox-form-wrap.asr-hide-express [id*="gpay"],
.asr-buybox-form-wrap.asr-hide-express [class*="gpay"],
.asr-buybox-form-wrap.asr-hide-express [id*="google-pay"],
.asr-buybox-form-wrap.asr-hide-express [class*="google-pay"],
.asr-buybox-form-wrap.asr-hide-express [id*="apple-pay"],
.asr-buybox-form-wrap.asr-hide-express [class*="apple-pay"],
/* Stripe/Apple Pay/Google Pay buttons commonly render inside an iframe for
   PCI compliance — a class-name selector on a wrapper div can miss this
   entirely, leaving an empty-looking but space-reserving iframe behind. */
.asr-buybox-form-wrap.asr-hide-express iframe[name*="privateStripeFrame"],
.asr-buybox-form-wrap.asr-hide-express iframe[src*="stripe.com"],
.asr-buybox-form-wrap.asr-hide-express iframe[title*="Google Pay"],
.asr-buybox-form-wrap.asr-hide-express iframe[title*="Apple Pay"],
.asr-buybox-form-wrap.asr-hide-express iframe[title*="PayPal"],
.asr-buybox-form-wrap.asr-hide-express iframe[src*="paypal.com"] {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Best-effort height match for Stripe/Google Pay's own button when it IS
   shown (express checkout NOT hidden). This often lives inside an iframe
   whose internal button graphic Stripe controls, not us — so this may only
   resize the outer wrapper and not perfectly match our buttons' exact
   height. Flagging that honestly rather than promising a guaranteed fix. */
.asr-buybox-form-wrap:not(.asr-hide-express) [id*="stripe-payment-request"],
.asr-buybox-form-wrap:not(.asr-hide-express) [class*="wc-stripe-payment-request"],
.asr-buybox-form-wrap:not(.asr-hide-express) iframe[name*="privateStripeFrame"],
.asr-buybox-form-wrap:not(.asr-hide-express) iframe[src*="stripe.com"] {
	min-height: 50px !important;
	margin: 0 0 10px !important;
	border-radius: 6px !important;
}

/* ---------- Ships from / Sold by / Returns meta block ---------- */
.asr-buybox-meta {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #e5e7eb;
	font-size: 13px;
}
.asr-buybox-meta-row {
	display: flex;
	gap: 6px;
	padding: 3px 0;
}
.asr-buybox-meta-label {
	color: var(--asr-text-color);
	min-width: 80px;
}
.asr-buybox-meta-value {
	color: var(--asr-link-color);
}

/* Stronger catch-all for Stripe/PayPal "OR" dividers that don't match the
   named-class selectors above (plugin markup varies by version). */
.asr-buybox-form-wrap.asr-hide-express hr,
.asr-buybox-form-wrap.asr-hide-express [class*="separator"],
.asr-buybox-form-wrap.asr-hide-express [class*="divider"],
.asr-buybox-form-wrap.asr-hide-express .asr-js-hidden-or {
	display: none !important;
}

/* Our own "OR" divider, inserted after the Add to Cart button — replaces
   reliance on whatever a Stripe/PayPal plugin does (or doesn't) render there. */
.asr-buybox-or-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 10px 0;
}
.asr-buybox-or-divider::before,
.asr-buybox-or-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}
.asr-buybox-or-divider span {
	font-size: 11px;
	font-weight: 600;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
