/* Guest Review Box – front end. Fonts inherit from the theme. */
:root {
	--grb-star: #c9962b;
	--grb-accent: #8b1e1e;
}
.grb-form-wrap,
.grb-reviews {
	--grb-ink: #1f2421;
	--grb-muted: #6a6e6b;
	--grb-line: rgba(31, 36, 33, 0.14);
	--grb-card: #fff;
	--grb-soft: #f7f3ec;
	--grb-soft: color-mix(in srgb, var(--grb-accent) 6%, #fff);
	--grb-radius: 14px;
	--grb-danger: #b42318;
	color: var(--grb-ink);
	box-sizing: border-box;
}
.grb-form-wrap *,
.grb-reviews *,
.grb-lightbox * {
	box-sizing: border-box;
}
.grb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
[hidden] { display: none !important; }
.grb-admin-note {
	padding: 10px 14px;
	border: 1px dashed #b42318;
	color: #b42318;
	font-size: 14px;
}

/* ---------- Stars ---------- */
.grb-stars {
	position: relative;
	display: inline-block;
	line-height: 0;
	white-space: nowrap;
	vertical-align: middle;
}
.grb-stars svg {
	width: 18px;
	height: 18px;
	margin-right: 2px;
}
.grb-stars--lg svg { width: 24px; height: 24px; }
.grb-stars__base svg { fill: rgba(31, 36, 33, 0.16); }
.grb-stars__fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
}
.grb-stars__fill svg { fill: var(--grb-star); }

/* ---------- Buttons ---------- */
.grb-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid var(--grb-accent);
	border-radius: 999px;
	background: var(--grb-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: filter 0.15s, transform 0.15s, background 0.15s;
}
.grb-btn:hover { filter: brightness(1.08); }
.grb-btn:active { transform: translateY(1px); }
.grb-btn:focus-visible { outline: 3px solid var(--grb-star); outline-offset: 2px; }
.grb-btn--ghost {
	background: transparent;
	color: var(--grb-accent);
}
.grb-btn--ghost:hover { background: var(--grb-soft); filter: none; }
.grb-btn[disabled] { opacity: 0.65; cursor: progress; }
.grb-btn.is-loading .grb-btn__label::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	vertical-align: -2px;
	animation: grb-spin 0.7s linear infinite;
}
@keyframes grb-spin { to { transform: rotate(360deg); } }

/* ---------- Form ---------- */
.grb-form-wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: clamp(20px, 4vw, 36px);
	background: var(--grb-card);
	border: 1px solid var(--grb-line);
	border-radius: var(--grb-radius);
	box-shadow: 0 10px 30px -18px rgba(31, 36, 33, 0.35);
}
.grb-form-head { margin-bottom: 22px; }
.grb-form-title { margin: 0 0 6px; line-height: 1.2; }
.grb-form-intro { margin: 0; color: var(--grb-muted); }
.grb-form { margin: 0; }
.grb-field {
	margin: 0 0 20px;
	padding: 0;
	border: 0;
	min-width: 0;
}
.grb-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}
.grb-label {
	display: block;
	margin: 0 0 7px;
	padding: 0;
	font-weight: 600;
	font-size: 0.95em;
}
.grb-req { color: var(--grb-accent); }
.grb-form input[type="text"],
.grb-form input[type="email"],
.grb-form textarea,
.grb-form select {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid var(--grb-line);
	border-radius: 10px;
	background: #fff;
	color: var(--grb-ink);
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.grb-form textarea { min-height: 140px; resize: vertical; }
.grb-form input:focus,
.grb-form textarea:focus,
.grb-form select:focus {
	outline: none;
	border-color: var(--grb-accent);
	box-shadow: 0 0 0 3px rgba(139, 30, 30, 0.14);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--grb-accent) 18%, transparent);
}
.grb-hint {
	margin: 6px 0 0;
	color: var(--grb-muted);
	font-size: 0.85em;
}
.grb-hint--small { font-size: 0.75em; }
.grb-hint a { color: inherit; }
.grb-counter {
	margin-top: 4px;
	text-align: right;
	color: var(--grb-muted);
	font-size: 0.8em;
}
.grb-error {
	margin: 6px 0 0;
	color: var(--grb-danger);
	font-size: 0.875em;
	font-weight: 500;
}
.grb-error:empty { display: none; }
.grb-field.has-error input[type="text"],
.grb-field.has-error input[type="email"],
.grb-field.has-error textarea,
.grb-field.has-error select,
.grb-field.has-error .grb-drop {
	border-color: var(--grb-danger);
}
.grb-alert {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-left: 4px solid var(--grb-danger);
	border-radius: 8px;
	background: #fef3f2;
	color: var(--grb-danger);
}
.grb-alert p { margin: 0; }
.grb-alert p + p { margin-top: 4px; }

/* Honeypot */
.grb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Star picker: DOM order is 5..1, displayed reversed so siblings light up. */
.grb-rate {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
	vertical-align: middle;
}
.grb-rate input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}
.grb-rate label {
	display: inline-flex;
	padding: 2px;
	border-radius: 6px;
	cursor: pointer;
	line-height: 0;
}
.grb-rate svg {
	width: 38px;
	height: 38px;
	fill: rgba(31, 36, 33, 0.14);
	transition: fill 0.12s, transform 0.12s;
}
.grb-rate label:hover svg,
.grb-rate label:hover ~ label svg,
.grb-rate input:checked ~ label svg {
	fill: var(--grb-star);
}
.grb-rate:hover input:checked ~ label svg { fill: rgba(31, 36, 33, 0.14); }
.grb-rate:hover label:hover svg,
.grb-rate:hover label:hover ~ label svg { fill: var(--grb-star); }
.grb-rate label:hover svg { transform: scale(1.1); }
.grb-rate input:focus-visible + label { outline: 2px solid var(--grb-accent); outline-offset: 1px; }
.grb-rate__text {
	display: inline-block;
	margin-left: 10px;
	color: var(--grb-muted);
	font-weight: 600;
	vertical-align: middle;
}

/* Month / year */
.grb-monthyear {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 10px;
	max-width: 380px;
}

/* Stay type pills */
.grb-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.grb-pill { position: relative; margin: 0; cursor: pointer; }
.grb-pill input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.grb-pill span {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--grb-line);
	border-radius: 999px;
	background: #fff;
	font-size: 0.95em;
	line-height: 1.2;
	transition: all 0.15s;
}
.grb-pill:hover span { border-color: var(--grb-accent); }
.grb-pill input:checked + span {
	border-color: var(--grb-accent);
	background: var(--grb-accent);
	color: #fff;
}
.grb-pill input:focus-visible + span { outline: 2px solid var(--grb-star); outline-offset: 2px; }
.grb-other { display: none; margin-top: 10px; max-width: 380px; }
.grb-other.is-open,
.grb-field:has(input[value="__other"]:checked) .grb-other { display: block; }

/* Photos */
.grb-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.grb-drop {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	border: 2px dashed var(--grb-line);
	border-radius: 12px;
	background: var(--grb-soft);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.grb-drop:hover,
.grb-drop.is-over { border-color: var(--grb-accent); }
.grb-file:focus-visible + .grb-previews,
.grb-drop:focus-within { outline: 2px solid var(--grb-accent); }
.grb-drop svg { flex: none; width: 34px; height: 34px; fill: var(--grb-accent); }
.grb-drop strong { display: block; color: var(--grb-accent); }
.grb-drop small { display: block; color: var(--grb-muted); font-size: 0.82em; }
.grb-previews {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}
.grb-previews:empty { display: none; }
.grb-previews li {
	position: relative;
	aspect-ratio: 1;
	margin: 0;
	border-radius: 10px;
	overflow: hidden;
	background: #eee;
}
.grb-previews img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grb-previews button {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 16px;
	line-height: 26px;
	cursor: pointer;
}

/* Consent */
.grb-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	cursor: pointer;
	font-size: 0.92em;
}
.grb-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--grb-accent); }
.grb-check a { color: var(--grb-accent); }

.grb-captcha:empty { min-height: 0; }
.grb-actions { margin-top: 8px; }

/* Success */
.grb-success {
	padding: 28px 10px;
	text-align: center;
}
.grb-success svg {
	width: 56px;
	height: 56px;
	padding: 12px;
	border-radius: 50%;
	background: var(--grb-soft);
	fill: var(--grb-accent);
}
.grb-success__msg { margin: 14px auto 18px; max-width: 460px; font-size: 1.05em; }

/* ---------- Reviews display ---------- */
.grb-reviews { margin: 0 auto; }
.grb-reviews__heading { margin: 0 0 20px; text-align: center; }

.grb-summary {
	display: grid;
	grid-template-columns: auto minmax(0, 340px);
	gap: 18px 40px;
	align-items: center;
	justify-content: center;
	margin: 0 0 28px;
	padding: 22px 26px;
	border: 1px solid var(--grb-line);
	border-radius: var(--grb-radius);
	background: var(--grb-soft);
}
.grb-summary__score { display: grid; justify-items: center; gap: 6px; text-align: center; }
.grb-summary__avg { font-size: 3em; font-weight: 700; line-height: 1; }
.grb-summary__count { color: var(--grb-muted); font-size: 0.9em; }
.grb-summary__bars { margin: 0; padding: 0; list-style: none; }
.grb-summary__bars li {
	display: grid;
	grid-template-columns: 30px 1fr 34px;
	gap: 10px;
	align-items: center;
	margin: 4px 0;
	font-size: 0.85em;
}
.grb-summary__n { color: var(--grb-muted); text-align: right; }
.grb-bar { height: 8px; border-radius: 99px; background: rgba(31, 36, 33, 0.1); overflow: hidden; }
.grb-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grb-star); }

.grb-grid {
	display: grid;
	/* Up to --grb-cols columns, but never narrower than 260px: adapts to the container width. */
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(260px, calc((100% - (var(--grb-cols, 3) - 1) * 22px) / var(--grb-cols, 3)))), 1fr));
	gap: 22px;
	align-items: start;
}
.grb-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	padding: 22px;
	border: 1px solid var(--grb-line);
	border-radius: var(--grb-radius);
	background: var(--grb-card);
	box-shadow: 0 8px 24px -20px rgba(31, 36, 33, 0.5);
}
.grb-layout-grid .grb-grid { align-items: stretch; }
.grb-card--featured { border-color: var(--grb-star); box-shadow: 0 0 0 1px var(--grb-star), 0 8px 24px -20px rgba(31, 36, 33, 0.5); }
.grb-card__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.grb-card__date { margin-left: auto; color: var(--grb-muted); font-size: 0.82em; }
.grb-badge {
	padding: 3px 9px;
	border-radius: 99px;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.grb-badge--featured { background: var(--grb-star); color: #fff; }
.grb-card__title { margin: 0; font-size: 1.15em; line-height: 1.3; }
.grb-card__text { color: var(--grb-ink); line-height: 1.65; }
.grb-card__text p { margin: 0 0 0.7em; }
.grb-card__text p:last-of-type { margin-bottom: 0; }
.grb-readmore {
	margin-top: 4px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--grb-accent);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.grb-photos {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
}
.grb-photo {
	position: relative;
	display: block;
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	background: #eee;
}
.grb-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s;
}
.grb-photo:hover img { transform: scale(1.06); }
.grb-photo[data-more]::after {
	content: attr(data-more);
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-weight: 700;
	font-size: 1.1em;
}
.grb-photo--hidden { display: none; }
.grb-card__foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; }
.grb-avatar {
	flex: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--grb-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1.05em;
}
.grb-card__who { display: grid; line-height: 1.3; }
.grb-card__name { font-weight: 700; }
.grb-card__loc { color: var(--grb-muted); font-size: 0.86em; }
.grb-card__stay {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.grb-card__stay li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 5px 11px;
	border-radius: 99px;
	background: var(--grb-soft);
	color: var(--grb-ink);
	font-size: 0.8em;
}
.grb-card__stay svg { width: 14px; height: 14px; fill: var(--grb-accent); }
.grb-reply {
	padding: 12px 14px;
	border-left: 3px solid var(--grb-accent);
	border-radius: 0 8px 8px 0;
	background: var(--grb-soft);
	font-size: 0.92em;
}
.grb-reply strong { display: block; margin-bottom: 4px; color: var(--grb-accent); font-size: 0.9em; }
.grb-reply p { margin: 0; }
.grb-more-wrap { margin-top: 26px; text-align: center; }
.grb-empty { text-align: center; color: var(--grb-muted); }

/* List layout: meta on the left, review on the right */
.grb-layout-list .grb-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 768px) {
	.grb-layout-list .grb-card {
		display: grid;
		grid-template-columns: 210px minmax(0, 1fr);
		grid-template-areas:
			"foot head"
			"foot title"
			"stay text"
			"stay photos"
			"stay reply";
		grid-auto-rows: auto;
		gap: 10px 32px;
		align-content: start;
	}
	.grb-layout-list .grb-card__head { grid-area: head; }
	.grb-layout-list .grb-card__title { grid-area: title; }
	.grb-layout-list .grb-card__text { grid-area: text; }
	.grb-layout-list .grb-photos { grid-area: photos; grid-template-columns: repeat(auto-fill, 96px); }
	.grb-layout-list .grb-reply { grid-area: reply; }
	.grb-layout-list .grb-card__foot { grid-area: foot; align-self: start; margin-top: 0; padding-top: 0; }
	.grb-layout-list .grb-card__stay { grid-area: stay; flex-direction: column; align-items: flex-start; align-self: start; }
}

@media (max-width: 640px) {
	.grb-row { grid-template-columns: 1fr; }
	.grb-summary { grid-template-columns: 1fr; padding: 18px; }
	.grb-rate svg { width: 34px; height: 34px; }
	.grb-btn { width: 100%; }
	.grb-more-wrap .grb-btn { width: auto; }
}

/* ---------- Lightbox ---------- */
.grb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 56px 12px;
	background: rgba(10, 12, 11, 0.92);
}
.grb-lightbox img {
	max-width: min(1200px, 100%);
	max-height: 100%;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.grb-lightbox button {
	position: absolute;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.grb-lightbox button:hover { background: rgba(255, 255, 255, 0.28); }
.grb-lightbox button:focus-visible { outline: 2px solid #fff; }
.grb-lb-close { top: 10px; right: 10px; }
.grb-lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.grb-lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.grb-lb-count { position: absolute; bottom: 16px; left: 0; right: 0; color: #ddd; text-align: center; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
	.grb-form-wrap *, .grb-reviews * { transition: none !important; animation: none !important; }
}
