/* Trigger — placed in header left column via JS */
.pera-rate-header-slot {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.pera-rate-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.45rem 0.85rem;
	border: 1px solid rgba(201, 162, 93, 0.85);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(6px);
	color: #f3e6c8;
	font-family: "Jost", system-ui, sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.pera-rate-trigger:hover,
.pera-rate-trigger:focus-visible {
	background: rgba(0, 0, 0, 0.55);
	box-shadow: 0 4px 20px rgba(201, 162, 93, 0.25);
	transform: translateY(-1px);
	outline: none;
}

.pera-rate-trigger__icon {
	color: #c9a25d;
	font-size: 0.95rem;
	line-height: 1;
}

@media (max-width: 480px) {
	/* Logo on top row; rate + language on second row — no overlap on S viewports */
	.site-header.banner-header .container.grid.grid-cols-3 {
		grid-template-columns: 1fr auto;
		grid-template-rows: auto auto;
		gap: 0.65rem 0.5rem;
		padding-top: 1rem !important;
		padding-bottom: 0.75rem !important;
	}

	.site-header .grid > div:nth-child(1).pera-rate-header-slot {
		grid-row: 2;
		grid-column: 1;
		justify-content: flex-start;
		min-width: 0;
	}

	.site-header .grid > div:nth-child(2) {
		grid-row: 1;
		grid-column: 1 / -1;
	}

	.site-header .grid > div:nth-child(2) img {
		max-width: min(220px, 72vw);
		height: auto;
		margin-left: auto;
		margin-right: auto;
	}

	.site-header .grid > div:nth-child(3) {
		grid-row: 2;
		grid-column: 2;
		align-self: center;
	}

	.pera-rate-trigger {
		padding: 0.38rem 0.6rem;
		font-size: 0.65rem;
		max-width: 100%;
	}

	.pera-rate-trigger__text {
		display: inline;
		white-space: nowrap;
	}
}

body.pera-rate-open {
	overflow: hidden;
}

.pera-rate-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(10, 8, 6, 0.72);
	backdrop-filter: blur(4px);
	animation: peraRateFadeIn 0.25s ease;
}

.pera-rate-dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: min(90vh, 640px);
	overflow: auto;
	padding: 1.5rem 1.35rem 1.25rem;
	border-radius: 16px;
	background: linear-gradient(165deg, #1a1510 0%, #0f0d0a 100%);
	border: 1px solid rgba(201, 162, 93, 0.35);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
	color: #f5f0e6;
	font-family: "Jost", system-ui, sans-serif;
	animation: peraRateSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pera-rate-close {
	position: absolute;
	top: 0.65rem;
	right: 0.75rem;
	border: 0;
	background: transparent;
	color: #c9a25d;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
}

.pera-rate-progress {
	height: 4px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
	margin-bottom: 0.65rem;
}

.pera-rate-progress__bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #a67c3d, #e8c882);
	transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pera-rate-step-indicator {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	color: rgba(245, 240, 230, 0.55);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pera-rate-title {
	margin: 0 0 1.25rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.65rem;
	font-weight: 500;
	line-height: 1.25;
	color: #f3e6c8;
}

.pera-rate-body {
	min-height: 120px;
	opacity: 0;
	transform: translateX(12px);
	transition: opacity 0.28s ease, transform 0.28s ease;
}

.pera-rate-body--in {
	opacity: 1;
	transform: translateX(0);
}

.pera-rate-stars {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.5rem 0 1rem;
}

.pera-rate-star {
	border: 0;
	background: transparent;
	font-size: 2.35rem;
	line-height: 1;
	color: rgba(255, 255, 255, 0.2);
	cursor: pointer;
	transition: transform 0.15s ease, color 0.15s ease, filter 0.15s ease;
	padding: 0.15rem;
}

.pera-rate-star.is-active,
.pera-rate-star:hover,
.pera-rate-star:focus-visible {
	color: #e8c882;
	filter: drop-shadow(0 0 8px rgba(232, 200, 130, 0.45));
	transform: scale(1.08);
	outline: none;
}

.pera-rate-yesno {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.pera-rate-yesno-btn {
	padding: 0.85rem 1rem;
	border-radius: 10px;
	border: 1px solid rgba(201, 162, 93, 0.45);
	background: rgba(255, 255, 255, 0.04);
	color: #f5f0e6;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.pera-rate-yesno-btn.is-selected,
.pera-rate-yesno-btn:hover {
	background: rgba(201, 162, 93, 0.2);
	border-color: #c9a25d;
	transform: translateY(-1px);
}

/* Theme sets input/textarea:focus { color: #111 } — override so typed text stays visible */
.pera-rate-dialog input.pera-rate-text,
.pera-rate-dialog input.pera-rate-text:focus,
.pera-rate-dialog input.pera-rate-text:focus-visible,
.pera-rate-dialog input.pera-rate-text:active,
.pera-rate-dialog textarea.pera-rate-comment,
.pera-rate-dialog textarea.pera-rate-comment:focus,
.pera-rate-dialog textarea.pera-rate-comment:focus-visible,
.pera-rate-dialog textarea.pera-rate-comment:active {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.35) !important;
	color: #f5f0e6 !important;
	-webkit-text-fill-color: #f5f0e6 !important;
	caret-color: #e8c882;
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.45;
	resize: vertical;
	min-height: 100px;
	opacity: 1;
}

.pera-rate-dialog input.pera-rate-text {
	min-height: auto;
}

.pera-rate-dialog input.pera-rate-text::placeholder,
.pera-rate-dialog textarea.pera-rate-comment::placeholder {
	color: rgba(245, 240, 230, 0.45);
	opacity: 1;
}

.pera-rate-dialog textarea.pera-rate-comment:focus,
.pera-rate-dialog textarea.pera-rate-comment:focus-visible {
	outline: none;
	border-color: rgba(201, 162, 93, 0.75);
	box-shadow: 0 0 0 2px rgba(201, 162, 93, 0.2);
}

.pera-rate-actions {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.pera-rate-btn {
	flex: 1;
	padding: 0.75rem 1rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.15s ease;
}

.pera-rate-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pera-rate-btn--ghost {
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: transparent;
	color: #f5f0e6;
}

.pera-rate-btn--primary {
	border: 0;
	background: linear-gradient(135deg, #a67c3d, #d4b068);
	color: #1a1208;
}

.pera-rate-btn--primary:hover:not(:disabled) {
	transform: translateY(-1px);
}

.pera-rate-thanks {
	margin: 0 0 0.5rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.5rem;
	color: #e8c882;
}

.pera-rate-thanks-sub {
	margin: 0;
	color: rgba(245, 240, 230, 0.85);
	font-size: 1rem;
	line-height: 1.5;
}

.pera-rate-review-fallback {
	margin: 1.25rem 0 0;
	text-align: center;
}

.pera-rate-review-fallback .pera-rate-btn {
	width: 100%;
}

@keyframes peraRateFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes peraRateSlideUp {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}
