/* Stayly Bookings — Frontend */

/* Force [hidden] to work even when the theme sets display on descendants (grid/flex beat the UA default). */
.stayly-booking-form [hidden],
.stayly-booking-form[hidden] { display: none !important; }

.stayly-booking-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--stayly-line, #e5e7eb); font-size: 14px; }

.stayly-booking-form__dates {
	display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
	margin-bottom: 8px;
}
.stayly-booking-form__date-btn {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
	padding: 10px 12px; text-align: left;
	background: #fff; border: 1px solid var(--stayly-line, #e5e7eb); border-radius: 10px;
	cursor: pointer; font: inherit; color: var(--stayly-text, #111827);
	transition: border-color .15s ease, background .15s ease;
}
.stayly-booking-form__date-btn:hover { border-color: var(--stayly-brand, #0f766e); }
.stayly-booking-form__date-btn.is-active { border-color: var(--stayly-brand, #0f766e); background: color-mix(in srgb, var(--stayly-brand, #0f766e) 6%, white); }
.stayly-booking-form__label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--stayly-muted, #6b7280); font-weight: 600; }
.stayly-booking-form__value { font-size: 14px; font-weight: 600; }

/* Calendar */
.stayly-booking-form__calendar {
	background: #fff; border: 1px solid var(--stayly-line, #e5e7eb); border-radius: 12px;
	padding: 12px; margin: 8px 0;
	position: relative;
}
.sb-cal-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.sb-cal-nav {
	background: transparent; border: 1px solid var(--stayly-line, #e5e7eb); border-radius: 6px;
	width: 30px; height: 30px; cursor: pointer; font-size: 16px; line-height: 1;
	color: var(--stayly-text, #111827);
}
.sb-cal-nav:hover { background: var(--stayly-bg-soft, #f9fafb); }

.sb-cal-months { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 480px) { .sb-cal-months { grid-template-columns: 1fr; } }

.sb-cal-title { text-align: center; font-weight: 700; margin: 4px 0 8px; font-size: 13px; }
.sb-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 10px; text-align: center; color: var(--stayly-muted, #6b7280); margin-bottom: 4px; font-weight: 600; letter-spacing: .04em; }
.sb-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.sb-cal-day {
	aspect-ratio: 1 / 1;
	border: 0; background: transparent; border-radius: 6px;
	cursor: pointer; font: inherit; font-size: 12px;
	color: var(--stayly-text, #111827);
	transition: background .12s ease, color .12s ease;
	padding: 0;
}
.sb-cal-day:hover:not(:disabled) { background: color-mix(in srgb, var(--stayly-brand, #0f766e) 12%, white); }
.sb-cal-day.is-empty { visibility: hidden; }
.sb-cal-day.is-past, .sb-cal-day:disabled { color: #d1d5db; cursor: not-allowed; text-decoration: line-through; }
.sb-cal-day.is-booked { color: #d1d5db; cursor: not-allowed; text-decoration: line-through; background: repeating-linear-gradient(45deg, transparent, transparent 3px, #f3f4f6 3px, #f3f4f6 4px); }
.sb-cal-day.is-in-range { background: color-mix(in srgb, var(--stayly-brand, #0f766e) 18%, white); border-radius: 0; }
.sb-cal-day.is-start, .sb-cal-day.is-end {
	background: var(--stayly-brand, #0f766e) !important;
	color: #fff !important; font-weight: 700;
	text-decoration: none !important;
}

/* Summary + fields */
.stayly-booking-form__summary { padding: 10px 0; border-top: 1px solid var(--stayly-line, #e5e7eb); margin-top: 8px; }
.stayly-booking-form__row { display: flex; justify-content: space-between; align-items: baseline; }
.stayly-booking-form__row strong { font-size: 16px; color: var(--stayly-brand, #0f766e); }

.stayly-booking-form__fields { display: grid; gap: 8px; margin-top: 12px; }
.stayly-booking-form__fields label { display: flex; flex-direction: column; gap: 3px; }
.stayly-booking-form__fields label > span { font-size: 12px; font-weight: 600; color: var(--stayly-muted, #6b7280); letter-spacing: .02em; }
.stayly-booking-form__fields input,
.stayly-booking-form__fields textarea {
	width: 100%; padding: 9px 11px;
	border: 1px solid var(--stayly-line, #e5e7eb); border-radius: 8px;
	font: inherit; background: #fff; color: var(--stayly-text, #111827);
}
.stayly-booking-form__fields textarea { resize: vertical; min-height: 60px; }
.stayly-booking-form__fields input:focus,
.stayly-booking-form__fields textarea:focus { outline: 2px solid var(--stayly-brand, #0f766e); outline-offset: 1px; }

.stayly-booking-form__submit { width: 100%; margin-top: 4px; }
.stayly-booking-form__submit:disabled { opacity: .6; cursor: wait; }

.stayly-booking-form__message {
	padding: 10px 12px; border-radius: 8px; margin-top: 10px;
	font-size: 13px; line-height: 1.4;
}
.stayly-booking-form__message.is-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.stayly-booking-form__message.is-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.stayly-booking-form__message.is-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.stayly-booking-form__hint { font-size: 11px; color: var(--stayly-muted, #6b7280); margin: 10px 0 0; text-align: center; }

/* Login / verification gate — replaces the calendar when the visitor is not eligible to book */
.stayly-booking-gate {
	margin-top: 14px; padding: 18px 14px 16px;
	background: var(--stayly-bg-soft, #f9fafb);
	border: 1px dashed var(--stayly-line, #e5e7eb);
	border-radius: 12px;
	text-align: center;
}
.stayly-booking-gate__icon { font-size: 28px; margin-bottom: 6px; line-height: 1; }
.stayly-booking-gate__title { margin: 0 0 4px; font-size: 15px; color: var(--stayly-text, #111827); }
.stayly-booking-gate__body { margin: 0 0 12px; font-size: 13px; color: var(--stayly-muted, #6b7280); line-height: 1.45; }
.stayly-booking-gate__actions { display: flex; flex-direction: column; gap: 8px; }
.stayly-booking-gate--verify { background: color-mix(in srgb, #f59e0b 8%, white); border-color: color-mix(in srgb, #f59e0b 25%, white); }
