/**
 * EquaRent Pro — "View all reviews" modal.
 * All selectors scoped under equarent-pro-* (iso-gate). The dialog follows the
 * SITE THEME: it reads the --equarent-* palette tokens, which the script copies
 * from the live .equarent-site wrapper onto the modal root (the modal is
 * appended to <body>, outside that wrapper). The literal fallback in each var()
 * keeps the modal light and readable if the tokens are ever unavailable.
 *
 * @package EquaRent\Pro
 */

.equarent-pro-reviews-trigger-wrap {
	display: flex;
	justify-content: center;
	margin: 1rem 0 0;
}

.equarent-pro-reviews-trigger {
	font: inherit;
	cursor: pointer;
	padding: 0.6rem 1.4rem;
	border-radius: 999px;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	line-height: 1.2;
}

.equarent-pro-reviews-trigger:hover,
.equarent-pro-reviews-trigger:focus-visible {
	background: var( --equarent-soft, rgba( 0, 0, 0, 0.06 ) );
	outline: 2px solid transparent;
}

/* Lock page scroll behind the modal. */
.equarent-pro-reviews-modal-open {
	overflow: hidden;
}

.equarent-pro-reviews-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.equarent-pro-reviews-modal[hidden] {
	display: none;
}

.equarent-pro-reviews-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 15, 23, 42, 0.55 );
}

.equarent-pro-reviews-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min( 680px, 100% );
	max-height: min( 82vh, 900px );
	background: var( --equarent-paper, #ffffff );
	color: var( --equarent-ink, #1d2327 );
	border-radius: var( --equarent-radius, 14px );
	box-shadow: 0 24px 60px rgba( 0, 0, 0, 0.35 );
	overflow: hidden;
}

.equarent-pro-reviews-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var( --equarent-line, rgba( 0, 0, 0, 0.1 ) );
}

.equarent-pro-reviews-modal__title {
	margin: 0;
	font-size: 1.15rem;
	color: var( --equarent-navy, inherit );
}

.equarent-pro-reviews-modal__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 0;
}

.equarent-pro-reviews-modal__close-icon {
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.equarent-pro-reviews-modal__close:hover,
.equarent-pro-reviews-modal__close:focus-visible {
	background: var( --equarent-soft, rgba( 0, 0, 0, 0.08 ) );
}

.equarent-pro-reviews-modal__close:focus-visible {
	outline: 2px solid var( --equarent-accent, #1981de );
	outline-offset: 2px;
}

.equarent-pro-reviews-modal__body {
	/* flex:1 + min-height:0 make the body the bounded scroll area inside the flex-column dialog — without
	   min-height:0 a flex child won't shrink below its content, so overflow-y never engages and the
	   "back to top" button (and the scroll itself) do nothing. */
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 1rem 1.25rem 1.5rem;
	scroll-behavior: smooth;
}

.equarent-pro-reviews-modal__body:focus {
	outline: none;
}

.equarent-pro-reviews-modal__count {
	margin: 0 0 1rem;
	font-weight: 600;
	color: var( --equarent-muted, inherit );
}

.equarent-pro-reviews-modal__msg {
	margin: 1.5rem 0;
	text-align: center;
	opacity: 0.8;
}

.equarent-pro-reviews-modal__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.equarent-pro-reviews-modal__rev {
	margin: 0;
	padding: 1rem 1.1rem;
	border: 1px solid var( --equarent-line, rgba( 0, 0, 0, 0.1 ) );
	border-radius: 10px;
}

.equarent-pro-reviews-modal__rev-head {
	margin-bottom: 0.4rem;
}

.equarent-pro-reviews-modal__stars {
	letter-spacing: 0.08em;
	color: #e0a800;
}

.equarent-pro-reviews-modal__rev-title {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	color: var( --equarent-navy, inherit );
}

.equarent-pro-reviews-modal__rev-body {
	margin: 0 0 0.5rem;
	padding: 0;
	border: 0;
	font-style: normal;
	white-space: pre-line;
}

.equarent-pro-reviews-modal__rev-by {
	font-size: 0.9rem;
	color: var( --equarent-muted, inherit );
}

.equarent-pro-reviews-modal__totop {
	position: absolute;
	right: 1.25rem;
	bottom: 1rem;
	font: inherit;
	font-size: 0.85rem;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	background: var( --equarent-accent, #1d2327 );
	color: #ffffff;
	box-shadow: 0 6px 16px rgba( 0, 0, 0, 0.25 );
}

.equarent-pro-reviews-modal__totop[hidden] {
	display: none;
}

@media ( prefers-reduced-motion: reduce ) {
	.equarent-pro-reviews-modal__body {
		scroll-behavior: auto;
	}
}

/* Pager (recette: 20 reviews per page, ‹ › navigation, most recent first). */
.equarent-pro-reviews-modal__pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 22px 0 6px;
}
.equarent-pro-reviews-modal__pagebtn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var( --equarent-line, #e2ebf3 );
	background: var( --equarent-paper, #fff );
	color: var( --equarent-navy, #16324a );
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.equarent-pro-reviews-modal__pagebtn:hover:not( [disabled] ) {
	background: var( --equarent-soft, #f3f8fd );
}
.equarent-pro-reviews-modal__pagebtn[disabled] {
	opacity: 0.4;
	cursor: default;
}
.equarent-pro-reviews-modal__pageind {
	min-width: 60px;
	text-align: center;
	color: var( --equarent-muted, #52708a );
	font-variant-numeric: tabular-nums;
}
