/* Experience Italy — reviews front end: modal, lightbox, submission.
   Brand tokens come from the child theme :root (--ei-*). */

body.ei-modal-open {
	overflow: hidden;
}

/* display:flex below would defeat the hidden attribute — reassert it. */
.rev-modal[hidden],
.rev-lightbox[hidden] {
	display: none !important;
}

/* ---- card affordance ---- */
.rev-card {
	cursor: pointer;
}

.rev-card:focus-visible {
	outline: 2px solid var(--ei-terracotta);
	outline-offset: 3px;
}

.rev-card__photos {
	display: inline-block;
	margin-top: 10px;
	font-style: normal;
	font-size: 12.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ei-terracotta);
	border-bottom: 1px solid rgba(161, 92, 56, 0.35);
	padding-bottom: 2px;
}

/* ---- review modal ---- */
.rev-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 3vw, 48px);
}

.rev-modal__scrim {
	position: absolute;
	inset: 0;
	background: rgba(24, 19, 16, 0.72);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.rev-modal__panel {
	position: relative;
	width: min(860px, 100%);
	max-height: 88vh;
	overflow-y: auto;
	background: #FFFFFF;
	padding: clamp(32px, 5vw, 64px);
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.5);
	animation: ei-modal-in 0.35s ease both;
}

@keyframes ei-modal-in {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.rev-modal__panel { animation: none; }
}

.rev-modal__close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	font-size: 30px;
	line-height: 1;
	color: #9A8C80;
	cursor: pointer;
	transition: color 0.2s ease;
}

.rev-modal__close:hover {
	color: var(--ei-terracotta);
}

.rev-modal__head {
	text-align: center;
	margin-bottom: 26px;
}

.rev-modal .ei-stars {
	display: block;
	color: #E3B28F;
	font-size: 15px;
	letter-spacing: 0.34em;
	margin-bottom: 12px;
}

.rev-modal__name {
	font-family: var(--ei-serif) !important;
	font-weight: 500 !important;
	font-size: clamp(26px, 3vw, 36px) !important;
	color: var(--ei-ink);
	margin: 0 0 8px;
}

.rev-modal__trip {
	font-size: 13.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ei-terracotta);
	margin: 0;
}

.rev-modal__body {
	font-family: var(--ei-serif);
	font-size: 18.5px;
	line-height: 1.75;
	color: #4E463F;
}

.rev-modal__body p {
	margin: 0 0 1.1em;
}

.rev-modal__gallery {
	margin-top: 36px;
	border-top: 1px solid rgba(107, 97, 88, 0.18);
	padding-top: 28px;
}

.rev-modal__gallery-title {
	font-family: var(--ei-serif);
	font-style: italic;
	font-size: 19px;
	color: #9A8C80;
	text-align: center;
	margin: 0 0 18px;
}

.rev-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}

.rev-gallery__item {
	position: relative;
	display: block;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 2px;
}

.rev-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

.rev-gallery__item:hover img {
	transform: scale(1.06);
}

.rev-gallery__item:focus-visible {
	outline: 2px solid var(--ei-terracotta);
	outline-offset: 2px;
}

/* ---- lightbox ---- */
.rev-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(12, 10, 8, 0.94);
	display: flex;
	align-items: center;
	justify-content: center;
}

.rev-lightbox img {
	max-width: min(92vw, 1400px);
	max-height: 88vh;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.rev-lightbox__close,
.rev-lightbox__nav {
	position: absolute;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.85);
	font-size: 30px;
	cursor: pointer;
	padding: 14px;
	transition: color 0.2s ease;
}

.rev-lightbox__close:hover,
.rev-lightbox__nav:hover {
	color: #FFFFFF;
}

.rev-lightbox__close {
	top: 16px;
	right: 20px;
}

.rev-lightbox__nav--prev {
	left: 16px;
}

.rev-lightbox__nav--next {
	right: 16px;
}

/* ---- submission ---- */
.rev-submit {
	max-width: 780px;
	margin: clamp(64px, 8vw, 100px) auto 0;
	text-align: center;
}

.rev-submit__script {
	font-family: var(--ei-script);
	font-size: clamp(36px, 4.5vw, 54px);
	line-height: 1.1;
	color: var(--ei-terracotta);
	margin: 0 0 8px;
}

.rev-submit__title {
	font-family: var(--ei-serif) !important;
	font-weight: 500 !important;
	font-size: clamp(30px, 3.6vw, 44px) !important;
	color: var(--ei-ink);
	margin: 0 0 16px;
}

.rev-submit__lede {
	max-width: 540px;
	margin: 0 auto 28px;
	font-size: 17px;
	line-height: 1.7;
}

/* Editorial underline form language (matches site forms) */
.rev-form {
	margin-top: clamp(32px, 4vw, 48px);
	text-align: left;
	background: #FFFFFF;
	padding: clamp(28px, 4.5vw, 56px);
	box-shadow: 0 26px 60px -34px rgba(43, 36, 32, 0.35);
}

.rev-form__hp {
	position: absolute !important;
	left: -9999px !important;
}

.rev-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 32px;
}

.rev-form__row .rev-form__field--narrow {
	max-width: 160px;
}

.rev-form__field {
	margin: 0 0 26px;
}

.rev-form__field label {
	display: block;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ei-taupe);
	margin-bottom: 6px;
}

.rev-form__field label i {
	color: var(--ei-terracotta);
	font-style: normal;
}

.rev-form__field label span {
	text-transform: none;
	letter-spacing: 0.02em;
	color: #9A8C80;
}

.rev-form__field input[type="text"],
.rev-form__field input[type="email"],
.rev-form__field select,
.rev-form__field textarea {
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(107, 97, 88, 0.35);
	border-radius: 0;
	padding: 10px 2px;
	font-family: var(--ei-sans);
	font-size: 17px;
	color: var(--ei-ink);
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rev-form__field input:focus,
.rev-form__field select:focus,
.rev-form__field textarea:focus {
	outline: none;
	border-bottom-color: var(--ei-terracotta);
	box-shadow: 0 1px 0 var(--ei-terracotta);
}

.rev-form__field textarea {
	resize: vertical;
	min-height: 120px;
	line-height: 1.7;
}

.rev-form__field input[type="file"] {
	font-size: 15px;
	padding: 8px 0;
}

.rev-form__filenote {
	display: block;
	margin-top: 6px;
	font-family: var(--ei-serif);
	font-style: italic;
	font-size: 14.5px;
	color: #9A8C80;
}

.rev-form__actions {
	margin: 8px 0 0;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.rev-form__actions span {
	font-family: var(--ei-serif);
	font-style: italic;
	font-size: 14.5px;
	color: #9A8C80;
}

/* ---- notices ---- */
.rev-notice {
	max-width: 640px;
	margin: 0 auto clamp(32px, 4vw, 48px);
	padding: 22px 28px;
	text-align: center;
	background: #FFFFFF;
	border: 1px solid rgba(161, 92, 56, 0.4);
	font-family: var(--ei-serif);
	font-size: 18px;
	color: var(--ei-ink);
}

.rev-notice--error {
	border-color: #B3453A;
}

@media (max-width: 640px) {
	.rev-form__row {
		grid-template-columns: 1fr;
	}
}
