/**
 * Rank & Rent Automator – Buchungs-Modal.
 *
 * Nutzt die dynamischen Farbvariablen (--rra-primary etc.), die per Inline-CSS
 * auf .rra-page UND .rra-modal gesetzt werden. Alle Verwendungen haben eine
 * feste Fallback-Farbe, falls das Inline-CSS einmal nicht lädt.
 */

/* Overlay */
.rra-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	background: rgba(15, 23, 42, 0.6);
	overflow-y: auto;
}

/* Sichtbar per JS (.is-open) oder ohne JS per :target */
.rra-modal.is-open,
.rra-modal:target {
	display: flex;
}

.rra-modal__dialog {
	position: relative;
	background: #ffffff;
	color: #1f2937;
	width: 100%;
	max-width: 560px;
	border-radius: 16px;
	padding: 34px 32px;
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
	font-family: inherit;
}

.rra-modal__close {
	position: absolute;
	top: 12px;
	right: 18px;
	font-size: 30px;
	line-height: 1;
	color: #9ca3af;
	text-decoration: none;
}

.rra-modal__close:hover {
	color: #111827;
}

.rra-modal__title {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 800;
	color: #111827;
	padding-right: 24px;
}

.rra-modal__subtitle {
	margin: 0 0 20px;
	color: #6b7280;
	font-size: 15px;
}

.rra-modal__notice {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 14px;
	margin-bottom: 16px;
}

/* Formular */
.rra-form__row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 14px;
}

.rra-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 480px) {
	.rra-form__grid {
		grid-template-columns: 1fr;
	}
}

.rra-form label {
	font-size: 14px;
	font-weight: 600;
	color: #374151;
}

.rra-form input,
.rra-form textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font: inherit;
	font-size: 15px;
	color: #111827;
	background: #ffffff;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.rra-form input:focus,
.rra-form textarea:focus {
	outline: none;
	border-color: var(--rra-primary, #2563eb);
	box-shadow: 0 0 0 3px var(--rra-primary-light, #e5ecfd);
}

.rra-form textarea {
	resize: vertical;
}

.rra-form input[type="file"] {
	padding: 9px 12px;
	background: #f9fafb;
}

.rra-form__price {
	font-size: 16px;
	font-weight: 700;
	color: #111827;
	margin: 6px 0 14px;
}

.rra-form__legal {
	font-size: 12.5px;
	color: #6b7280;
	margin: 14px 0 0;
	line-height: 1.5;
	text-align: center;
}

/* Honeypot (visuell versteckt, für Bots sichtbar) */
.rra-hp {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Toast (Statusmeldung nach Rückkehr/Abbruch) */
.rra-toast {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100000;
	max-width: 90%;
	padding: 14px 20px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.4);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.rra-toast--info {
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

.rra-toast--warning {
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
}

.rra-toast--hide {
	opacity: 0;
	transform: translate(-50%, -16px);
}

@media (prefers-reduced-motion: reduce) {
	.rra-form input,
	.rra-form textarea,
	.rra-toast {
		transition: none;
	}
}
