/* =============================================================
   Bahamas Guest Datepicker — Custom Calendar for JFB
   Replaces the default date_picker field with an availability-aware calendar.
============================================================= */

/* Hide the original JFB date_picker input */
.bahamas-dp-hijacked {
	display: none !important;
}

/* Wrapper injected after the original field */
.bahamas-datepicker-wrap {
	width: 100%;
	font-family: inherit;
	position: relative;
}

/* ── Calendar container ── */
.bahamas-calendar {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	width: 100%;
	max-width: 340px;
}

/* ── Header (month nav) ── */
.bahamas-cal-header {
	background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
	color: #fff;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.bahamas-cal-title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.bahamas-cal-nav {
	background: rgba(255, 255, 255, 0.15) !important;
	border: none !important;
	color: #fff !important;
	width: 28px !important;
	min-width: 28px !important;
	height: 28px !important;
	min-height: 28px !important;
	border-radius: 6px !important;
	cursor: pointer;
	font-size: 14px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1 !important;
}

.bahamas-cal-nav:hover {
	background: rgba(255, 255, 255, 0.25) !important;
}

/* ── Day-of-week labels ── */
.bahamas-cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.bahamas-cal-weekday {
	text-align: center;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
	padding: 6px 0;
}

/* ── Calendar grid ── */
.bahamas-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	padding: 8px;
}

/* ── Individual day cells ── */
.bahamas-cal-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: default;
	color: #94a3b8;
	transition: all 0.15s ease;
	border: 1px solid transparent;
	position: relative;
}

/* Empty cells (before month starts) */
.bahamas-cal-day.empty {
	pointer-events: none;
}

/* Past / unavailable dates */
.bahamas-cal-day.past,
.bahamas-cal-day.unavailable {
	color: #cbd5e1;
	pointer-events: none;
	text-decoration: line-through;
}

/* Available dates */
.bahamas-cal-day.available {
	background: #e0f2fe;
	color: #0369a1;
	cursor: pointer;
	font-weight: 600;
}

.bahamas-cal-day.available:hover {
	background: #0284c7;
	color: #ffffff;
	border-color: #0284c7;
	transform: scale(1.05);
}

/* Today indicator */
.bahamas-cal-day.today {
	border-color: #0284c7;
}

.bahamas-cal-day.today::after {
	content: '';
	position: absolute;
	bottom: 3px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #0284c7;
}

/* Selected date */
.bahamas-cal-day.selected {
	background: #0284c7 !important;
	color: #ffffff !important;
	border-color: #0266a0 !important;
	transform: scale(1.05);
	box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* Loading state */
.bahamas-cal-loading {
	grid-column: 1 / -1;
	text-align: center;
	padding: 20px;
	color: #64748b;
	font-size: 12px;
}

/* ── Slot selector (shown after date click) ── */
.bahamas-slot-panel {
	border-top: 1px solid #e2e8f0;
	padding: 12px 14px;
	background: #f8fafc;
}

.bahamas-slot-title {
	font-size: 12px;
	font-weight: 700;
	color: #374151;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
}

.bahamas-slot-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 200px;
	overflow-y: auto;
}

/* Individual time slot */
.bahamas-slot-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	background: #fff;
	cursor: pointer;
	transition: all 0.15s;
	gap: 8px;
}

.bahamas-slot-item:hover:not(.bahamas-slot-unavailable) {
	border-color: #0284c7;
	background: #e0f2fe;
}

.bahamas-slot-item.bahamas-slot-selected {
	border-color: #0284c7;
	background: #0284c7;
	color: #fff;
}

.bahamas-slot-item.bahamas-slot-unavailable {
	opacity: 0.45;
	cursor: not-allowed;
	background: #f8fafc;
}

.bahamas-slot-time {
	font-size: 13px;
	font-weight: 700;
}

.bahamas-slot-meta {
	font-size: 11px;
	color: #64748b;
}

.bahamas-slot-item.bahamas-slot-selected .bahamas-slot-meta {
	color: rgba(255, 255, 255, 0.8);
}

.bahamas-slot-badge {
	font-size: 10px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 20px;
	white-space: nowrap;
}

.bahamas-slot-badge.available-badge {
	background: #dcfce7;
	color: #15803d;
}

.bahamas-slot-item.bahamas-slot-selected .bahamas-slot-badge {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.bahamas-slot-badge.sold-badge {
	background: #fee2e2;
	color: #b91c1c;
}

.bahamas-slot-badge.cancelled-badge {
	background: #f1f5f9;
	color: #64748b;
}

/* No slots message */
.bahamas-slot-empty {
	text-align: center;
	font-size: 12px;
	color: #64748b;
	padding: 10px 0;
}

/* Selected summary pill */
.bahamas-dp-summary {
	margin-top: 8px;
	padding: 7px 12px;
	background: #0284c7;
	color: #fff;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	display: none;
}
