/**
 * Caviar Reservations: front-end booking form styles.
 * Palette sampled directly from caviar.co.ke (black sections, brass-gold
 * nav/link accent #a5926b, coral-red primary CTA #ed4848) so the form reads
 * as part of the same site rather than a bolted-on widget.
 * Scoped entirely under .cr-widget so it cannot leak into the theme.
 */

.cr-widget {
	--cr-gold: #a5926b;
	--cr-gold-soft: #c7b696;
	--cr-gold-deep: #8a7752;
	--cr-coral: #ed4848;
	--cr-coral-hover: #f4524d;
	--cr-coral-deep: #c93a3a;
	--cr-bg: #000000;
	--cr-surface: #151513;
	--cr-surface-2: #201f1c;
	--cr-line: rgba(255, 255, 255, 0.09);
	--cr-line-strong: rgba(165, 146, 107, 0.5);
	--cr-text: #f5f3ee;
	--cr-muted: #9c988e;
	--cr-radius: 14px;
	--cr-radius-sm: 10px;

	box-sizing: border-box;
	max-width: min(1760px, 94vw);
	width: 100%;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 48px);
	background: var(--cr-bg);
	background-image:
		radial-gradient(ellipse 80% 55% at 50% -10%, rgba(165, 146, 107, 0.12), transparent 70%);
	border: 1px solid var(--cr-line);
	border-radius: 20px;
	color: var(--cr-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.cr-widget *,
.cr-widget *::before,
.cr-widget *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- Hero */

.cr-hero {
	text-align: center;
	margin: 0 0 28px;
}

.cr-hero__title {
	margin: 0 0 10px;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--cr-text);
}

.cr-hero__accent {
	color: var(--cr-gold);
}

.cr-hero__subtitle {
	margin: 0;
	font-size: 15px;
	color: var(--cr-muted);
}

/* ---------------------------------------------------------------- Tabs */

.cr-tabs {
	display: flex;
	gap: 6px;
	max-width: 460px;
	margin: 0 auto 32px;
	padding: 5px;
	background: var(--cr-surface);
	border: 1px solid var(--cr-line);
	border-radius: 999px;
}

.cr-tab {
	flex: 1;
	appearance: none;
	background: none;
	border: none;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cr-muted);
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease;
}

.cr-tab:hover {
	color: var(--cr-gold-soft);
}

.cr-tab.is-active {
	background: var(--cr-gold);
	color: #17140d;
}

.cr-tab:focus-visible {
	outline: 2px solid var(--cr-gold);
	outline-offset: 2px;
}

/* -------------------------------------------------------------- Layout */

.cr-layout {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.cr-widget--solo .cr-layout {
	grid-template-columns: minmax(0, 1fr);
	max-width: 720px;
	margin: 0 auto;
}

/* --------------------------------------------------------------- Aside */

.cr-aside {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.cr-aside__media {
	margin: 0;
	border: 1px solid var(--cr-line);
	border-radius: var(--cr-radius);
	overflow: hidden;
	background: var(--cr-surface);
}

.cr-aside__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.cr-card {
	padding: 20px 22px;
	background: var(--cr-surface);
	border: 1px solid var(--cr-line);
	border-radius: var(--cr-radius);
}

.cr-card__title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 600;
	color: var(--cr-text);
}

.cr-card__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.cr-card__list li {
	position: relative;
	padding-left: 18px;
	font-size: 14px;
	color: var(--cr-muted);
}

.cr-card__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--cr-gold);
}

.cr-card__text {
	margin: 0;
	font-size: 14px;
	color: var(--cr-muted);
}

.cr-card--policy {
	border-color: rgba(165, 146, 107, 0.22);
}

/* -------------------------------------------------------------- Panels */

.cr-panels {
	min-width: 0;
	padding: clamp(20px, 3vw, 30px);
	background: var(--cr-surface);
	border: 1px solid var(--cr-line);
	border-radius: var(--cr-radius);
}

.cr-panel {
	display: none;
}

.cr-panel.is-active {
	display: block;
	animation: cr-fade-in 0.22s ease;
}

@keyframes cr-fade-in {
	from { opacity: 0; transform: translateY(5px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.cr-widget *,
	.cr-widget *::before,
	.cr-widget *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* -------------------------------------------------------------- Fields */

.cr-field {
	margin-bottom: 18px;
	min-width: 0;
}

.cr-grid {
	display: grid;
	gap: 0 16px;
}

.cr-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cr-field > label {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 7px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--cr-muted);
}

.cr-req {
	color: var(--cr-gold);
}

.cr-ico {
	width: 15px;
	height: 15px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cr-widget input[type="text"],
.cr-widget input[type="email"],
.cr-widget input[type="tel"],
.cr-widget input[type="date"],
.cr-widget input[type="url"],
.cr-widget select,
.cr-widget textarea {
	width: 100%;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--cr-text);
	background: var(--cr-surface-2);
	border: 1px solid var(--cr-line);
	border-radius: var(--cr-radius-sm);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cr-widget textarea {
	resize: vertical;
	min-height: 96px;
}

.cr-widget select {
	appearance: none;
	padding-right: 38px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a978f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px 16px;
	cursor: pointer;
}

.cr-widget option {
	background: #1a1a1d;
	color: var(--cr-text);
}

.cr-widget ::placeholder {
	color: #6d6a63;
	opacity: 1;
}

.cr-widget input:hover,
.cr-widget select:hover,
.cr-widget textarea:hover {
	border-color: rgba(255, 255, 255, 0.18);
}

.cr-widget input:focus,
.cr-widget select:focus,
.cr-widget textarea:focus {
	outline: none;
	background: #2a2a2e;
	border-color: var(--cr-line-strong);
	box-shadow: 0 0 0 3px rgba(165, 146, 107, 0.16);
}

/* Make the native date picker indicator visible on dark. */
.cr-widget input[type="date"]::-webkit-calendar-picker-indicator {
	filter: invert(0.75);
	cursor: pointer;
}

.cr-hint {
	margin: 7px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: #7e7b74;
}

.cr-notice {
	margin: 0 0 20px;
	padding: 12px 15px;
	font-size: 13.5px;
	color: var(--cr-gold-soft);
	background: rgba(165, 146, 107, 0.08);
	border: 1px solid rgba(165, 146, 107, 0.2);
	border-radius: var(--cr-radius-sm);
}

/* ---------------------------------------------------------- Time slots */

.cr-slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
	min-height: 48px;
}

.cr-slots__empty,
.cr-slots__message {
	grid-column: 1 / -1;
	margin: 0;
	padding: 14px;
	font-size: 13.5px;
	text-align: center;
	color: var(--cr-muted);
	background: var(--cr-surface-2);
	border: 1px dashed var(--cr-line);
	border-radius: var(--cr-radius-sm);
}

.cr-slot {
	appearance: none;
	padding: 11px 6px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--cr-text);
	background: var(--cr-surface-2);
	border: 1px solid var(--cr-line);
	border-radius: var(--cr-radius-sm);
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.cr-slot:hover {
	border-color: var(--cr-line-strong);
	color: var(--cr-gold-soft);
}

.cr-slot:focus-visible {
	outline: 2px solid var(--cr-gold);
	outline-offset: 2px;
}

.cr-slot.is-selected {
	background: var(--cr-gold);
	border-color: var(--cr-gold);
	color: #17140d;
	font-weight: 600;
}

.cr-slot[disabled] {
	opacity: 0.35;
	cursor: not-allowed;
	text-decoration: line-through;
}

/* ------------------------------------------------------------- Buttons */

.cr-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	margin-top: 6px;
	padding: 15px 20px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #ffffff;
	background: var(--cr-coral);
	border: none;
	border-radius: var(--cr-radius-sm);
	cursor: pointer;
	transition: background 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.cr-submit:hover {
	background: var(--cr-coral-hover);
}

.cr-submit:active {
	transform: translateY(1px);
	background: var(--cr-coral-deep);
}

.cr-submit:focus-visible {
	outline: 2px solid var(--cr-gold-soft);
	outline-offset: 3px;
}

.cr-submit[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
	filter: none;
}

.cr-submit--secondary {
	color: var(--cr-gold-soft);
	background: transparent;
	border: 1px solid var(--cr-line-strong);
}

.cr-submit--secondary:hover {
	background: rgba(165, 146, 107, 0.1);
	filter: none;
}

.cr-footnote {
	margin: 12px 0 0;
	font-size: 12px;
	text-align: center;
	color: #7e7b74;
}

/* ------------------------------------------------------------ Feedback */

.cr-feedback {
	display: none;
	margin-top: 16px;
	padding: 13px 15px;
	font-size: 14px;
	border-radius: var(--cr-radius-sm);
	border: 1px solid transparent;
}

.cr-feedback.is-success {
	display: block;
	color: #8fe0ab;
	background: rgba(58, 158, 96, 0.12);
	border-color: rgba(58, 158, 96, 0.35);
}

.cr-feedback.is-error {
	display: block;
	color: #f2a3a3;
	background: rgba(190, 60, 60, 0.12);
	border-color: rgba(190, 60, 60, 0.35);
}

.cr-feedback.is-loading {
	display: block;
	color: var(--cr-muted);
	background: var(--cr-surface-2);
	border-color: var(--cr-line);
}

/* -------------------------------------------------- Manage reservation */

.cr-manage-result {
	margin-top: 18px;
	padding: 20px;
	background: var(--cr-surface-2);
	border: 1px solid var(--cr-line);
	border-radius: var(--cr-radius);
}

.cr-manage-result dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 9px 20px;
	margin: 0 0 18px;
	font-size: 14px;
}

.cr-manage-result dt {
	color: var(--cr-muted);
}

.cr-manage-result dd {
	margin: 0;
	font-weight: 600;
	color: var(--cr-text);
	text-transform: capitalize;
}

.cr-cancel-btn {
	padding: 11px 18px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: #f2a3a3;
	background: transparent;
	border: 1px solid rgba(190, 60, 60, 0.5);
	border-radius: var(--cr-radius-sm);
	cursor: pointer;
	transition: background 0.18s ease;
}

.cr-cancel-btn:hover {
	background: rgba(190, 60, 60, 0.15);
}

.cr-cancel-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* --------------------------------------------------------- Breakpoints */

@media (max-width: 880px) {
	.cr-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.cr-aside {
		order: 2;
	}

	.cr-panels {
		order: 1;
	}
}

@media (max-width: 560px) {
	.cr-widget {
		padding: 20px 16px;
		border-radius: 14px;
	}

	.cr-grid--2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.cr-tabs {
		flex-direction: column;
		border-radius: var(--cr-radius-sm);
	}

	.cr-tab {
		border-radius: 8px;
	}

	.cr-slots {
		grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	}

	/* iOS zooms in on focus for inputs under 16px. */
	.cr-widget input,
	.cr-widget select,
	.cr-widget textarea {
		font-size: 16px;
	}
}
