/**
 * BRD Bookings — Frontend Calendar Styles
 *
 * Airbnb-inspired date picker with BRD brand colours.
 *
 * Brand palette:
 *   Primary blue:  #51A8C5
 *   Dark navy:     #0D1835
 *   Accent teal:   #0EA8B4
 *   Light hover:   #60BEDE
 *   Text white:    #FFFFFF
 *   Range band:    rgba(81, 168, 197, 0.12)
 */

/* ============================================
   Container & Layout
   ============================================ */

.brd-booking-widget {
	max-width: 820px;
	margin: 0 auto;
	font-family: 'Poppins', sans-serif;
}

.brd-booking-heading {
	color: #0D1835;
	font-weight: 700;
	margin-bottom: 24px;
}

.brd-loading {
	text-align: center;
	padding: 60px 40px;
	color: #999;
	font-size: 15px;
}

/* ============================================
   Calendar — Airbnb-style
   ============================================ */

.brd-calendar {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	padding: 24px 16px 20px;
	margin-bottom: 28px;
	user-select: none;
}

/* Header row — title centred with nav arrows either side */
.brd-calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 4px 16px;
}

/* Month column */
.brd-calendar-month {
	padding: 0 4px;
}

/* Month title */
.brd-cal-title {
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	color: #0D1835;
	letter-spacing: -0.2px;
	flex: 1;
}

/* Navigation arrows */
.brd-cal-prev,
.brd-cal-next {
	background: none;
	border: none;
	width: 36px;
	height: 36px;
	cursor: pointer;
	font-size: 22px;
	color: #0D1835;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border-radius: 50%;
	transition: background 0.15s;
	padding: 0;
}

.brd-cal-prev:hover,
.brd-cal-next:hover {
	background: #f5f5f5;
}

.brd-cal-prev:active,
.brd-cal-next:active {
	background: #eee;
}

/* 7-column grid */
.brd-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0;
}

/* Day headers (Mo Tu We...) */
.brd-cal-dayheader {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #b0b0b0;
	padding: 0 0 8px;
	letter-spacing: 0.3px;
}

/* ============================================
   Day Cells
   ============================================ */

.brd-cal-day {
	position: relative;
	text-align: center;
	padding: 2px 0;
	cursor: pointer;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

/* The date number — styled as inline circle on selection */
.brd-cal-daynum {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	width: 38px;
	height: 38px;
	line-height: 38px;
	border-radius: 50%;
	display: inline-block;
	text-align: center;
	transition: background 0.15s, color 0.15s;
	position: relative;
	z-index: 1;
}

/* Hover — light grey circle */
.brd-cal-day:hover:not(.past):not(.blocked):not(.other-month):not(.pkg-unavail) .brd-cal-daynum {
	background: #f0f0f0;
}

/* Today — subtle underline dot */
.brd-cal-day.today .brd-cal-daynum {
	font-weight: 700;
	color: #0D1835;
}

.brd-cal-day.today .brd-cal-daynum::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #0D1835;
}

/* Past / beyond booking window */
.brd-cal-day.past {
	cursor: default;
}

.brd-cal-day.past .brd-cal-daynum {
	color: #d0d0d0;
}

.brd-cal-day.past:hover .brd-cal-daynum {
	background: transparent;
}

/* Other month (grey filler days) */
.brd-cal-day.other-month {
	cursor: default;
	visibility: hidden;
}

/* Blocked dates */
.brd-cal-day.blocked {
	cursor: not-allowed;
}

.brd-cal-day.blocked .brd-cal-daynum {
	color: #d0d0d0;
	text-decoration: line-through;
}

.brd-cal-day.blocked:hover .brd-cal-daynum {
	background: transparent;
}

/* Package mode — can't start here */
.brd-cal-day.pkg-unavail {
	cursor: not-allowed;
}

.brd-cal-day.pkg-unavail .brd-cal-daynum {
	color: #d0d0d0;
}

.brd-cal-day.pkg-unavail:hover .brd-cal-daynum {
	background: transparent;
}

/* ============================================
   Range Selection — Airbnb band + circles
   ============================================ */

/* Range bands — ::before pseudo-element at circle height (38px) */
.brd-cal-day.range-start::before,
.brd-cal-day.range-end::before,
.brd-cal-day.in-range::before {
	content: '';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	height: 38px;
	z-index: 0;
	pointer-events: none;
}

/* Range start: solid band from centre to right edge */
.brd-cal-day.range-start::before {
	left: 50%;
	right: 0;
	background: rgba(81, 168, 197, 0.20);
}

.brd-cal-day.range-start .brd-cal-daynum {
	background: #51A8C5;
	color: #fff;
	font-weight: 600;
}

.brd-cal-day.range-start:hover .brd-cal-daynum {
	background: #4899b5;
}

/* Range end: solid band from left edge to centre */
.brd-cal-day.range-end::before {
	left: 0;
	right: 50%;
	background: rgba(81, 168, 197, 0.20);
}

.brd-cal-day.range-end .brd-cal-daynum {
	background: #51A8C5;
	color: #fff;
	font-weight: 600;
}

.brd-cal-day.range-end:hover .brd-cal-daynum {
	background: #4899b5;
}

/* Single day selection (start = end): no band */
.brd-cal-day.range-start.range-end::before {
	display: none;
}

/* In-range days: solid band, circle height, matching start/end */
.brd-cal-day.in-range::before {
	left: 0;
	right: 0;
	background: rgba(81, 168, 197, 0.20);
}

.brd-cal-day.in-range .brd-cal-daynum {
	color: #0D1835;
	font-weight: 500;
}

.brd-cal-day.in-range:hover .brd-cal-daynum {
	background: rgba(81, 168, 197, 0.25);
}

/* ============================================
   Availability Dots (subtle)
   ============================================ */

.brd-avail-dot {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	margin: 1px auto 0;
	position: relative;
	z-index: 1;
}

.brd-avail-dot.available {
	background: #66bb6a;
}

.brd-avail-dot.limited {
	background: #ffa726;
}

.brd-avail-dot.full {
	background: #ef5350;
}

/* Hide dots on selected range endpoints */
.brd-cal-day.range-start .brd-avail-dot,
.brd-cal-day.range-end .brd-avail-dot {
	opacity: 0;
}

/* ============================================
   Calendar Hint
   ============================================ */

.brd-cal-hint {
	text-align: center;
	font-size: 14px;
	color: #888;
	padding: 16px 0 0;
	font-weight: 500;
}

/* ============================================
   Step Indicator
   ============================================ */

.brd-steps {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
}

.brd-step {
	flex: 1;
	padding: 10px 16px;
	background: #f5f5f5;
	border-radius: 8px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #999;
	transition: all 0.2s;
}

.brd-step.active {
	background: #0D1835;
	color: #fff;
}

.brd-step.completed {
	background: #51A8C5;
	color: #fff;
}

/* ============================================
   Options Row (dive type, divers)
   ============================================ */

.brd-options {
	display: flex;
	gap: 16px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.brd-option-group {
	flex: 1;
	min-width: 180px;
}

.brd-option-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.brd-option-group select,
.brd-option-group input[type="number"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
	font-family: 'Poppins', sans-serif;
	color: #333;
	background: #fff;
	transition: border-color 0.15s;
}

.brd-option-group select:focus,
.brd-option-group input[type="number"]:focus {
	border-color: #51A8C5;
	outline: none;
	box-shadow: 0 0 0 2px rgba(81, 168, 197, 0.15);
}

/* ============================================
   Add-ons (checkbox row below dive type)
   ============================================ */

.brd-addons {
	margin-top: 8px;
	padding: 12px 16px;
	background: #f9fafb;
	border: 1px solid #eee;
	border-radius: 8px;
}

.brd-addons-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 8px;
}

.brd-addon-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	font-size: 14px;
	color: #333;
	cursor: pointer;
}

.brd-addon-toggle input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #51A8C5;
	cursor: pointer;
	flex-shrink: 0;
}

.brd-addon-toggle .brd-addon-name {
	font-weight: 500;
}

.brd-addon-toggle .brd-addon-price {
	color: #0EA8B4;
	font-weight: 600;
	font-size: 13px;
	margin-left: auto;
}

/* ============================================
   Slot Grid (per day)
   ============================================ */

.brd-slot-grid {
	margin-bottom: 24px;
}

.brd-day-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #f0f0f0;
	flex-wrap: wrap;
}

.brd-day-row:last-child {
	border-bottom: none;
}

.brd-day-date {
	min-width: 120px;
	font-weight: 600;
	color: #0D1835;
	font-size: 14px;
}

.brd-day-slots {
	display: flex;
	gap: 8px;
	flex: 1;
	flex-wrap: wrap;
}

.brd-slot-btn {
	padding: 8px 18px;
	border: 1px solid #ddd;
	border-radius: 24px;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	font-family: 'Poppins', sans-serif;
	transition: all 0.15s;
	position: relative;
	color: #333;
}

.brd-slot-btn:hover:not(.disabled):not(.selected) {
	border-color: #0D1835;
	color: #fff;
	background: #0D1835;
}

.brd-slot-btn.selected {
	background: #51A8C5;
	border-color: #51A8C5;
	color: #fff;
	outline: none !important;
	box-shadow: none !important;
}

.brd-slot-btn.selected:hover {
	background: #3d8fa8;
	border-color: #3d8fa8;
	color: #fff;
}

.brd-slot-btn:focus {
	outline: none !important;
	box-shadow: none !important;
}

.brd-slot-btn.disabled {
	background: #fafafa;
	color: #ccc;
	cursor: not-allowed;
	border-color: #eee;
}

.brd-slot-btn .brd-slot-label {
	display: block;
}

.brd-slot-btn .brd-slot-spots {
	display: block;
	font-size: 11px;
	font-weight: 400;
	opacity: 0.7;
}

/* SAVED FOR FUTURE PROMOTIONS — floating pill badge on slot buttons.
   Re-enable by adding the target class (e.g. 'promo') to the slot button in JS.

.brd-slot-btn.promo::after {
	content: 'Promo Text';
	position: absolute;
	top: -8px;
	right: -4px;
	background: #f0ad4e;
	color: #fff;
	font-size: 9px;
	padding: 1px 6px;
	border-radius: 8px;
	font-weight: 700;
	text-transform: uppercase;
}

.brd-slot-btn.promo.selected::after {
	background: #e09900;
}
*/

/* ============================================
   Price Summary
   ============================================ */

.brd-price-summary {
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 20px 24px;
	margin-bottom: 24px;
}

.brd-price-summary h3 {
	margin: 0 0 14px;
	color: #0D1835;
	font-size: 16px;
	font-weight: 600;
}

.brd-price-line {
	display: flex;
	justify-content: space-between;
	padding: 5px 0;
	font-size: 14px;
	color: #555;
}

.brd-price-line.total {
	border-top: 1px solid #ddd;
	margin-top: 10px;
	padding-top: 10px;
	font-weight: 700;
	font-size: 17px;
	color: #0D1835;
}

.brd-price-line .brd-price-amount {
	font-weight: 600;
	color: #333;
}

.brd-price-line.total .brd-price-amount {
	color: #0D1835;
}

.brd-price-line.brd-price-discount {
	color: #16a34a;
}

.brd-price-line.brd-price-discount .brd-price-amount {
	color: #16a34a;
	font-weight: 600;
}

/* ============================================
   Book Now Button
   ============================================ */

.brd-book-btn {
	display: block !important;
	width: 100% !important;
	padding: 25px 50px !important;
	background: #0D1835 !important;
	background-color: #0D1835 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	font-size: 20px !important;
	font-weight: 800 !important;
	font-family: 'Poppins', sans-serif !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	transition: background-color 0.3s ease !important;
	letter-spacing: 0.5px !important;
	line-height: 1.2 !important;
	text-align: center !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
}

.brd-book-btn:hover {
	background: #51A8C5 !important;
	background-color: #51A8C5 !important;
	border: none !important;
	color: #fff !important;
}

.brd-book-btn:disabled {
	background: #d0d0d0 !important;
	background-color: #d0d0d0 !important;
	cursor: not-allowed !important;
	border: none !important;
}

.brd-book-btn.loading {
	position: relative;
	color: transparent;
}

.brd-book-btn.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 22px;
	margin: -11px 0 0 -11px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: brd-spin 0.6s linear infinite;
}

@keyframes brd-spin {
	to { transform: rotate(360deg); }
}

/* ============================================
   Upsell Banner (e.g. Photography Coaching)
   ============================================ */

.brd-upsell-banner {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	background: linear-gradient(135deg, #f0f9fc 0%, #e8f4f8 100%);
	border: 1px solid #cce7f0;
	border-radius: 12px;
	padding: 20px 22px;
	margin-top: 20px;
}

.brd-upsell-icon {
	font-size: 28px;
	line-height: 1;
	flex-shrink: 0;
}

.brd-upsell-content {
	flex: 1;
}

.brd-upsell-title {
	font-size: 15px;
	font-weight: 700;
	color: #0D1835;
	margin-bottom: 4px;
}

.brd-upsell-text {
	font-size: 13px;
	color: #555;
	line-height: 1.5;
	margin: 0 0 10px;
}

.brd-upsell-link {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: #51A8C5;
	text-decoration: none;
	transition: color 0.15s;
}

.brd-upsell-link:hover {
	color: #0D1835;
}

/* ============================================
   Booking Confirmation
   ============================================ */

.brd-confirmation {
	text-align: center;
	padding: 40px 20px;
}

.brd-confirmation-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	background: #0EA8B4;
	color: #fff;
	border-radius: 50%;
	font-size: 32px;
	line-height: 64px;
	font-weight: 700;
}

.brd-confirmation-title {
	font-size: 20px;
	font-weight: 700;
	color: #0D1835;
	margin: 0 0 8px;
}

.brd-confirmation-text {
	font-size: 14px;
	color: #555;
	margin: 0 0 24px;
}

.brd-confirmation-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.brd-btn-add-more,
.brd-btn-go-cart {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 0 !important;
	font-family: 'Poppins', sans-serif !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	cursor: pointer;
	text-decoration: none !important;
	outline: none !important;
	box-shadow: none !important;
	transition: background 0.15s, color 0.15s;
}

.brd-btn-add-more:focus,
.brd-btn-go-cart:focus {
	outline: none !important;
	box-shadow: none !important;
}

.brd-btn-add-more {
	background: #fff;
	color: #0D1835;
	border: 2px solid #0D1835;
}

.brd-btn-add-more:hover {
	background: #0D1835;
	color: #fff;
}

.brd-btn-go-cart {
	background: #0D1835;
	color: #fff;
	border: 2px solid #0D1835;
}

.brd-btn-go-cart:hover {
	background: #51A8C5;
	border-color: #51A8C5;
	color: #fff;
}

/* ============================================
   Error / Notice
   ============================================ */

.brd-notice {
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 16px;
	font-size: 14px;
}

.brd-notice.error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
}

.brd-notice.success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

/* ============================================
   Package Mode — Package Cards
   ============================================ */

.brd-package-selector {
	margin-bottom: 24px;
}

.brd-package-cards {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.brd-package-card {
	padding: 18px 22px;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: all 0.15s;
}

.brd-package-card:hover {
	border-color: #51A8C5;
	box-shadow: 0 2px 8px rgba(81, 168, 197, 0.1);
}

.brd-package-card.selected {
	border-color: #51A8C5;
	background: rgba(81, 168, 197, 0.06);
	box-shadow: 0 0 0 1px #51A8C5;
}

.brd-package-card-name {
	font-size: 17px;
	font-weight: 600;
	color: #0D1835;
	margin-bottom: 6px;
}

.brd-package-card-meta {
	display: flex;
	gap: 14px;
	align-items: center;
	font-size: 14px;
	color: #555;
	margin-bottom: 6px;
}

.brd-package-duration {
	background: #f0f0f0;
	padding: 3px 12px;
	border-radius: 20px;
	font-weight: 600;
	font-size: 13px;
	color: #555;
}

.brd-package-price {
	font-weight: 700;
	color: #0EA8B4;
}

.brd-package-card-desc {
	font-size: 13px;
	color: #888;
	line-height: 1.5;
}

/* ============================================
   Package Mode — Schedule
   ============================================ */

.brd-package-schedule {
	margin-bottom: 24px;
}

.brd-package-schedule h3 {
	color: #0D1835;
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px;
}

.brd-schedule-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
}

.brd-schedule-row:last-child {
	border-bottom: none;
}

.brd-schedule-day {
	font-weight: 600;
	color: #0D1835;
	min-width: 52px;
}

.brd-schedule-date {
	flex: 1;
	color: #555;
}

.brd-schedule-status {
	font-size: 16px;
	font-weight: 700;
}

.brd-schedule-ok .brd-schedule-status {
	color: #66bb6a;
}

.brd-schedule-unavail {
	background: #fef2f2;
	border-radius: 8px;
}

.brd-schedule-unavail .brd-schedule-status {
	color: #ef5350;
}

.brd-schedule-unavail .brd-schedule-date {
	color: #b91c1c;
}

/* ============================================
   Package Mode — Options
   ============================================ */

.brd-package-options {
	margin-top: 16px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 680px) {
	.brd-calendar {
		padding: 16px 8px 14px;
		border-radius: 12px;
	}

	.brd-calendar-month {
		padding: 0;
	}

	/* Smaller day cells */
	.brd-cal-daynum {
		width: 34px;
		height: 34px;
		line-height: 34px;
		font-size: 13px;
	}

	.brd-cal-dayheader {
		font-size: 11px;
		padding: 0 0 6px;
	}

	.brd-cal-title {
		font-size: 15px;
	}

	.brd-avail-dot {
		width: 3px;
		height: 3px;
	}

	/* Other mobile adjustments */
	.brd-options {
		flex-direction: column;
	}

	.brd-day-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.brd-day-slots {
		width: 100%;
	}

	.brd-slot-btn {
		flex: 1;
		text-align: center;
	}

	.brd-steps {
		flex-direction: column;
	}

	.brd-package-card-meta {
		flex-direction: column;
		gap: 6px;
		align-items: flex-start;
	}

	.brd-addons {
		padding: 10px 12px;
	}

	.brd-addon-toggle {
		font-size: 13px;
	}

	.brd-upsell-banner {
		padding: 16px;
		gap: 12px;
	}

	.brd-upsell-icon {
		font-size: 24px;
	}

	.brd-confirmation-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.brd-diver-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.brd-diver-cert {
		width: 100%;
	}
}

/* ============================================
   Diver Details (certification dropdowns)
   ============================================ */

.brd-diver-details {
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 20px 24px;
	margin-bottom: 24px;
}

.brd-diver-details h3 {
	margin: 0 0 14px;
	color: #0D1835;
	font-size: 16px;
	font-weight: 600;
}

.brd-diver-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 10px;
}

.brd-diver-row:last-child {
	margin-bottom: 0;
}

.brd-diver-label {
	min-width: 70px;
	font-size: 14px;
	font-weight: 600;
	color: #0D1835;
}

.brd-diver-cert {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	font-family: 'Poppins', sans-serif;
	color: #333;
	background: #fff;
	transition: border-color 0.15s;
}

.brd-diver-cert:focus {
	border-color: #51A8C5;
	outline: none;
	box-shadow: 0 0 0 2px rgba(81, 168, 197, 0.15);
}
