/**
 * Nordstranda Bookings — Frontend Form + Calendar Styles
 *
 * @package NordstrandaBookings
 */

.ncb-booking-wrap {
	max-width: 680px;
	margin: 0 auto;
}

.ncb-booking-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ncb-form-row--half {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.ncb-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #1d2327;
}

.ncb-req {
	color: #dc3545;
}

.ncb-field input,
.ncb-field select,
.ncb-field textarea {
	width: 100%;
	padding: 10px 14px;
	font-size: 15px;
	line-height: 1.5;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.ncb-field input:focus,
.ncb-field select:focus,
.ncb-field textarea:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
	outline: none;
}

.ncb-field textarea {
	resize: vertical;
	min-height: 80px;
}

.ncb-field select {
	appearance: auto;
}

/* Submit button inherits theme .btn-submit — only override disabled state */
.ncb-booking-form .btn-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Feedback */
#ncb-feedback:empty {
	display: none;
}

.ncb-feedback {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.5;
}

.ncb-feedback--success {
	background: #d1e7dd;
	color: #0a3622;
	border: 1px solid #198754;
}

.ncb-feedback--error {
	background: #f8d7da;
	color: #842029;
	border: 1px solid #dc3545;
}

/* ── Calendar ─────────────────────────────────────────────────── */

.ncb-calendar-section {
	margin: 4px 0;
}

.ncb-cal-hint {
	padding: 32px 24px;
	text-align: center;
	color: #6c757d;
	background: #f8f9fa;
	border: 2px dashed #dee2e6;
	border-radius: 8px;
	font-size: 14px;
}

.ncb-cal-nav {
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
}

.ncb-cal-nav button {
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	width: 36px;
	height: 36px;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #495057;
	transition: background 0.15s;
}

.ncb-cal-nav button:hover {
	background: #f0f0f0;
}

.ncb-cal-months {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.ncb-cal-month {
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 12px;
	background: #fff;
}

.ncb-cal-month-title {
	text-align: center;
	font-weight: 700;
	font-size: 15px;
	padding: 4px 0 10px;
	color: #1d2327;
}

.ncb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.ncb-cal-header {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: #6c757d;
	padding: 4px 0 6px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.ncb-cal-day {
	text-align: center;
	padding: 8px 2px;
	font-size: 14px;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.12s, color 0.12s;
	user-select: none;
	line-height: 1;
}

.ncb-cal-day:hover:not(.ncb-cal-day--disabled):not(.ncb-cal-day--empty) {
	background: #e9ecef;
}

.ncb-cal-day--empty {
	cursor: default;
}

.ncb-cal-day--past {
	color: #ccc;
	cursor: default;
}

.ncb-cal-day--blocked {
	background: #f8d7da;
	color: #842029;
	cursor: not-allowed;
	text-decoration: line-through;
}

.ncb-cal-day--today {
	font-weight: 700;
	box-shadow: inset 0 0 0 2px #2271b1;
}

.ncb-cal-day--arrival,
.ncb-cal-day--departure {
	background: #198754 !important;
	color: #fff !important;
	font-weight: 700;
}

.ncb-cal-day--in-range {
	background: #d1e7dd;
	color: #0a3622;
}

/* Date summary */
#ncb-date-summary {
	margin-top: 12px;
	padding: 10px 14px;
	background: #d1e7dd;
	border: 1px solid #a3cfbb;
	border-radius: 6px;
	font-size: 14px;
	color: #0a3622;
	display: none;
}

/* Legend */
.ncb-cal-legend {
	display: flex;
	gap: 16px;
	margin-top: 10px;
	font-size: 12px;
	color: #6c757d;
	flex-wrap: wrap;
}

.ncb-cal-legend-item {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ncb-cal-dot {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
}

.ncb-cal-dot--available {
	background: #fff;
	border: 1px solid #dee2e6;
}

.ncb-cal-dot--blocked {
	background: #f8d7da;
	border: 1px solid #dc3545;
}

.ncb-cal-dot--selected {
	background: #198754;
}

/* ── Theme integration (dark calendar on booking page) ───────── */

.booking-calendar-wrap #ncb-calendar .ncb-cal-months {
	gap: 1.5rem;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-month {
	background: var(--dark, #2c3e3b);
	border-color: rgba(255,255,255,0.08);
	border-radius: 2px;
	padding: 1.4rem;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-month-title {
	font-family: var(--ff-display, serif);
	color: #fff;
	font-size: 1.1rem;
	font-weight: 400;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-header {
	color: rgba(255,255,255,0.4);
	font-size: 0.6rem;
	letter-spacing: 0.1em;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-day {
	color: rgba(255,255,255,0.75);
	font-size: 0.82rem;
	border-radius: 2px;
	padding: 0.5rem 0;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-day:hover:not(.ncb-cal-day--disabled):not(.ncb-cal-day--empty) {
	background: rgba(138,197,137,0.3);
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-day--past {
	color: rgba(255,255,255,0.2);
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-day--blocked {
	background: rgba(185, 75, 65, 0.2);
	color: rgba(255,255,255,0.3);
	text-decoration: line-through;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-day--today {
	box-shadow: inset 0 0 0 2px rgba(138,197,137,0.6);
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-day--arrival,
.booking-calendar-wrap #ncb-calendar .ncb-cal-day--departure {
	background: var(--summer, #e6c862) !important;
	color: var(--dark, #2c3e3b) !important;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-day--in-range {
	background: rgba(230,200,98,0.25);
	color: rgba(255,255,255,0.9);
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-nav button {
	width: 28px;
	height: 28px;
	background: rgba(255,255,255,0.1);
	border: none;
	border-radius: 2px;
	color: #fff;
	font-size: 0.8rem;
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-nav button:hover {
	background: rgba(255,255,255,0.2);
}

.booking-calendar-wrap #ncb-calendar .ncb-cal-hint {
	background: var(--dark, #2c3e3b);
	border-color: rgba(255,255,255,0.1);
	border-radius: 2px;
	color: rgba(255,255,255,0.5);
}

.booking-calendar-wrap .ncb-cal-dot--available {
	background: rgba(255,255,255,0.15);
	border-color: rgba(255,255,255,0.4);
}

.booking-calendar-wrap .ncb-cal-dot--blocked {
	background: rgba(185, 75, 65, 0.35);
	border-color: rgba(185, 75, 65, 0.6);
}

.booking-calendar-wrap .ncb-cal-dot--selected {
	background: var(--summer, #e6c862);
}

.booking-calendar-wrap .ncb-cal-legend {
	color: rgba(255,255,255,0.45);
}

/* Responsive */
@media (max-width: 600px) {
	.ncb-form-row--half {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.ncb-cal-months {
		grid-template-columns: 1fr;
	}

	.ncb-booking-form .btn-submit {
		width: 100%;
		text-align: center;
	}
}
