/**
 * WebWizBD 15-Minute Strategy Call Scheduler - Refined Modal Styles
 * Scope: #webwizbd-booking-modal
 * Rules: Zero !important flags (Clean CSS nesting & specificity)
 */

/* 1. Root Modal Overlay & Scroll Containment */
#webwizbd-booking-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

#webwizbd-booking-modal *,
#webwizbd-booking-modal *::before,
#webwizbd-booking-modal *::after {
	box-sizing: border-box;
}

#webwizbd-booking-modal.is-active {
	opacity: 1;
	visibility: visible;
}

/* Background Lock (Applied to html and body) */
html.wb-modal-open,
body.wb-modal-open {
	overflow: hidden;
	height: 100%;
}

/* Backdrop Blur */
#webwizbd-booking-modal .wb-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 1;
}

/* 2. Modal Dialog Window */
#webwizbd-booking-modal .wb-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 780px;
	max-height: calc(100vh - 48px);
	margin: auto;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
	z-index: 2;
	overflow: hidden;
	transform: scale(0.97) translateY(8px);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#webwizbd-booking-modal.is-active .wb-modal-dialog {
	transform: scale(1) translateY(0);
}

/* 3. Modal Header */
#webwizbd-booking-modal .wb-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 22px 26px 14px;
	border-bottom: 1px solid #f1f5f9;
	background: #ffffff;
	flex-shrink: 0;
}

#webwizbd-booking-modal .wb-header-left {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

#webwizbd-booking-modal .wb-badge-pill {
	display: inline-block;
	align-self: flex-start;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #2563eb;
	background: #eff6ff;
	border: 1px solid #dbeafe;
	padding: 3px 10px;
	border-radius: 999px;
}

#webwizbd-booking-modal .wb-modal-title {
	font-family: inherit;
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
	line-height: 1.25;
}

#webwizbd-booking-modal .wb-modal-close-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #64748b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	transition: all 0.2s ease;
	flex-shrink: 0;
	margin-left: 12px;
}

#webwizbd-booking-modal .wb-modal-close-btn:hover {
	background: #fee2e2;
	border-color: #fecaca;
	color: #dc2626;
	transform: rotate(90deg);
}

/* 4. Horizontal Step Progress Bar */
#webwizbd-booking-modal .wb-wizard-steps {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	padding: 10px 26px;
	background: #f8fafc;
	border-bottom: 1px solid #f1f5f9;
	flex-shrink: 0;
}

#webwizbd-booking-modal .wb-step-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	color: #64748b;
	transition: all 0.2s ease;
}

#webwizbd-booking-modal .wb-step-num {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #475569;
	font-size: 11px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

#webwizbd-booking-modal .wb-step-txt {
	letter-spacing: 0.02em;
}

#webwizbd-booking-modal .wb-step-pill.is-active {
	color: #2563eb;
}

#webwizbd-booking-modal .wb-step-pill.is-active .wb-step-num {
	background: #2563eb;
	color: #ffffff;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

#webwizbd-booking-modal .wb-step-pill.is-completed {
	color: #16a34a;
}

#webwizbd-booking-modal .wb-step-pill.is-completed .wb-step-num {
	background: #16a34a;
	color: #ffffff;
}

#webwizbd-booking-modal .wb-step-divider {
	width: 28px;
	height: 1px;
	background: #cbd5e1;
}

/* 5. Wizard Views Body Container */
#webwizbd-booking-modal .wb-wizard-views {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 20px 26px 24px;
}

#webwizbd-booking-modal .wb-wizard-views::-webkit-scrollbar {
	width: 6px;
}

#webwizbd-booking-modal .wb-wizard-views::-webkit-scrollbar-track {
	background: #f8fafc;
}

#webwizbd-booking-modal .wb-wizard-views::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

#webwizbd-booking-modal .wb-step-view {
	display: none;
}

#webwizbd-booking-modal .wb-step-view.is-active {
	display: block;
	animation: wbFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wbFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 6. Step 1: 2-Column Responsive Layout */
#webwizbd-booking-modal .wb-step1-body {
	display: grid;
	grid-template-columns: 290px 1fr;
	gap: 22px;
	align-items: start;
}

@media (max-width: 680px) {
	#webwizbd-booking-modal .wb-step1-body {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* Left Column: Compact Calendar */
#webwizbd-booking-modal .wb-cal-column {
	width: 100%;
	max-width: 290px;
	margin: 0 auto;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 12px 12px 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

#webwizbd-booking-modal .wb-calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	padding: 0 4px;
}

#webwizbd-booking-modal .wb-calendar-month-label {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

#webwizbd-booking-modal .wb-cal-prev,
#webwizbd-booking-modal .wb-cal-next {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	color: #475569;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.15s ease;
}

#webwizbd-booking-modal .wb-cal-prev:hover:not(:disabled),
#webwizbd-booking-modal .wb-cal-next:hover:not(:disabled) {
	background: #f1f5f9;
	color: #0f172a;
	border-color: #cbd5e1;
}

#webwizbd-booking-modal .wb-cal-prev:disabled,
#webwizbd-booking-modal .wb-cal-next:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

#webwizbd-booking-modal .wb-calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: #94a3b8;
	margin-bottom: 6px;
}

#webwizbd-booking-modal .wb-calendar-days-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

#webwizbd-booking-modal .wb-day-cell {
	width: 34px;
	height: 32px;
	border-radius: 8px;
	border: 1px solid transparent;
	background: #f8fafc;
	color: #1e293b;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	position: relative;
	padding: 0;
	margin: 0 auto;
}

#webwizbd-booking-modal .wb-day-cell.is-empty {
	background: transparent;
	border-color: transparent;
	cursor: default;
}

#webwizbd-booking-modal .wb-day-cell:hover:not(:disabled):not(.is-empty) {
	background: #eff6ff;
	color: #2563eb;
	border-color: #bfdbfe;
}

#webwizbd-booking-modal .wb-day-cell.is-selected {
	background: #2563eb;
	color: #ffffff;
	border-color: #2563eb;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

#webwizbd-booking-modal .wb-day-cell.is-today::after {
	content: '';
	position: absolute;
	bottom: 3px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #2563eb;
}

#webwizbd-booking-modal .wb-day-cell.is-selected.is-today::after {
	background: #ffffff;
}

#webwizbd-booking-modal .wb-day-cell:disabled {
	opacity: 0.28;
	cursor: not-allowed;
	background: transparent;
	color: #94a3b8;
}

#webwizbd-booking-modal .wb-tz-indicator {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: #64748b;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	padding: 5px 8px;
	border-radius: 6px;
	margin-top: 10px;
}

#webwizbd-booking-modal .wb-tz-name {
	color: #0f172a;
}

/* Right Column: Available Slots */
#webwizbd-booking-modal .wb-slots-section {
	display: flex;
	flex-direction: column;
	min-height: 260px;
}

#webwizbd-booking-modal .wb-slots-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f1f5f9;
}

#webwizbd-booking-modal .wb-slots-title {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

#webwizbd-booking-modal .wb-slots-date-label {
	font-size: 12px;
	font-weight: 600;
	color: #2563eb;
	background: #eff6ff;
	padding: 2px 8px;
	border-radius: 6px;
}

#webwizbd-booking-modal .wb-slots-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	max-height: 245px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-right: 4px;
}

#webwizbd-booking-modal .wb-slots-grid::-webkit-scrollbar {
	width: 5px;
}

#webwizbd-booking-modal .wb-slots-grid::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 4px;
}

#webwizbd-booking-modal .wb-slots-grid::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

#webwizbd-booking-modal .wb-slot-chip {
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	cursor: pointer;
	text-align: center;
	transition: all 0.15s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

#webwizbd-booking-modal .wb-slot-chip .wb-slot-time {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
}

#webwizbd-booking-modal .wb-slot-chip .wb-slot-tz {
	font-size: 10px;
	font-weight: 600;
	color: #64748b;
}

#webwizbd-booking-modal .wb-slot-chip:hover:not(:disabled) {
	border-color: #93c5fd;
	background: #f8fafc;
	transform: translateY(-1px);
}

#webwizbd-booking-modal .wb-slot-chip.is-selected {
	background: #2563eb;
	border-color: #2563eb;
	box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
}

#webwizbd-booking-modal .wb-slot-chip.is-selected .wb-slot-time, #webwizbd-booking-modal .wb-slot-chip.is-selected .wb-slot-tz {
    color: #0f172a;
}

#webwizbd-booking-modal .wb-slot-chip:disabled {
	opacity: 0.35;
	background: #f8fafc;
	cursor: not-allowed;
	border-color: #e2e8f0;
}

#webwizbd-booking-modal .wb-slots-placeholder {
	grid-column: span 2;
	padding: 30px 16px;
	text-align: center;
	color: #64748b;
	font-size: 13px;
	background: #f8fafc;
	border-radius: 10px;
	border: 1px dashed #e2e8f0;
}

/* 7. Step 1 Footer Action */
#webwizbd-booking-modal .wb-step1-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-top: 16px;
	margin-top: 16px;
	border-top: 1px solid #f1f5f9;
}

#webwizbd-booking-modal .wb-step1-next-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 24px;
	border-radius: 10px;
	background: #2563eb;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

#webwizbd-booking-modal .wb-step1-next-btn:hover:not(:disabled) {
	background: #1d4ed8;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

#webwizbd-booking-modal .wb-step1-next-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* 8. Step 2: Form & Input Styles */
#webwizbd-booking-modal .wb-selected-slot-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-radius: 10px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	margin-bottom: 18px;
}

#webwizbd-booking-modal .wb-slot-banner-left {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #1e40af;
}

#webwizbd-booking-modal .wb-slot-change-btn {
	background: none;
	border: none;
	color: #2563eb;
	font-size: 12px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	padding: 4px 8px;
}

#webwizbd-booking-modal .wb-slot-change-btn:hover {
	color: #1d4ed8;
}

#webwizbd-booking-modal .wb-form-row {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	margin-bottom: 14px;
}

@media (max-width: 580px) {
	#webwizbd-booking-modal .wb-form-row {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

#webwizbd-booking-modal .wb-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

#webwizbd-booking-modal .wb-form-group label {
	font-size: 12px;
	font-weight: 700;
	color: #334155;
}

#webwizbd-booking-modal .wb-req {
	color: #ef4444;
}

#webwizbd-booking-modal .wb-opt {
	font-weight: 500;
	color: #94a3b8;
}

#webwizbd-booking-modal .wb-form-group input,
#webwizbd-booking-modal .wb-form-group select,
#webwizbd-booking-modal .wb-form-group textarea {
	width: 100%;
	padding: 10px 14px;
	border-radius: 9px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	font-size: 14px;
	color: #0f172a;
	outline: none;
	font-family: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}

#webwizbd-booking-modal .wb-form-group textarea {
	resize: vertical;
	min-height: 65px;
}

#webwizbd-booking-modal .wb-form-group input:focus,
#webwizbd-booking-modal .wb-form-group select:focus,
#webwizbd-booking-modal .wb-form-group textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#webwizbd-booking-modal .wb-form-group-full {
	margin-bottom: 16px;
}

#webwizbd-booking-modal .wb-error-message {
	padding: 10px 14px;
	background: #fee2e2;
	border: 1px solid #fecaca;
	color: #991b1b;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 14px;
}

#webwizbd-booking-modal .wb-step2-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 16px;
	margin-top: 16px;
	border-top: 1px solid #f1f5f9;
}

#webwizbd-booking-modal .wb-step2-back-btn {
	padding: 10px 18px;
	border-radius: 9px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #475569;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
}

#webwizbd-booking-modal .wb-step2-back-btn:hover {
	background: #f8fafc;
	color: #0f172a;
	border-color: #94a3b8;
}

#webwizbd-booking-modal .wb-submit-booking-btn {
	padding: 11px 24px;
	border-radius: 9px;
	border: none;
	background: #2563eb;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

#webwizbd-booking-modal .wb-submit-booking-btn:hover:not(:disabled) {
	background: #1d4ed8;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

#webwizbd-booking-modal .wb-submit-booking-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* 9. Step 3: Success View */
#webwizbd-booking-modal .wb-success-card {
	text-align: center;
	padding: 14px 6px;
}

#webwizbd-booking-modal .wb-success-icon-wrap {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #dcfce7;
	color: #16a34a;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 14px;
	border: 4px solid #f0fdf4;
}

#webwizbd-booking-modal .wb-success-icon {
	width: 28px;
	height: 28px;
}

#webwizbd-booking-modal .wb-succ-heading {
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 6px 0;
}

#webwizbd-booking-modal .wb-succ-subheading {
	font-size: 13px;
	color: #64748b;
	margin: 0 auto 18px;
	max-width: 420px;
	line-height: 1.45;
}

#webwizbd-booking-modal .wb-succ-details-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 20px;
	max-width: 460px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

#webwizbd-booking-modal .wb-succ-detail-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 13px;
	border-bottom: 1px solid #f1f5f9;
}

#webwizbd-booking-modal .wb-succ-detail-row:last-child {
	border-bottom: none;
}

#webwizbd-booking-modal .wb-succ-label {
	color: #64748b;
}

#webwizbd-booking-modal .wb-succ-val {
	color: #0f172a;
	font-weight: 700;
}

#webwizbd-booking-modal .wb-success-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-bottom: 18px;
}

@media (max-width: 500px) {
	#webwizbd-booking-modal .wb-success-actions {
		flex-direction: column;
	}
}

#webwizbd-booking-modal .wb-gcal-btn,
#webwizbd-booking-modal .wb-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.15s;
}

#webwizbd-booking-modal .wb-gcal-btn {
	background: #2563eb;
	color: #ffffff;
}

#webwizbd-booking-modal .wb-gcal-btn:hover {
	background: #1d4ed8;
}

#webwizbd-booking-modal .wb-whatsapp-btn {
	background: #16a34a;
	color: #ffffff;
}

#webwizbd-booking-modal .wb-whatsapp-btn:hover {
	background: #15803d;
}

#webwizbd-booking-modal .wb-done-btn {
	padding: 8px 24px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #475569;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
}

#webwizbd-booking-modal .wb-done-btn:hover {
	background: #f1f5f9;
	color: #0f172a;
}
