/**
 * Booking Manager - Public & Admin Stylesheet
 *
 * @package BookingManager
 */

:root {
	--bm-primary: #2563eb;
	--bm-primary-hover: #1d4ed8;
	--bm-bg-card: #ffffff;
	--bm-border: #e2e8f0;
	--bm-text-main: #0f172a;
	--bm-text-muted: #64748b;
	--bm-success: #10b981;
	--bm-danger: #ef4444;
	--bm-warning: #f59e0b;
	--bm-radius: 8px;
}

/* Public Booking Container */
.bm-booking-container {
	max-width: 820px;
	margin: 20px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--bm-text-main);
	background: var(--bm-bg-card);
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-radius);
	padding: 28px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
}

.bm-booking-container * {
	box-sizing: border-box;
}

/* Stepper */
.bm-stepper {
	display: flex;
	justify-content: space-between;
	margin-bottom: 30px;
	position: relative;
	border-bottom: 1px solid var(--bm-border);
	padding-bottom: 18px;
}

.bm-step-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	font-size: 14px;
	color: var(--bm-text-muted);
}

.bm-step-item.bm-active {
	color: var(--bm-primary);
	font-weight: 600;
}

.bm-step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #f1f5f9;
	color: var(--bm-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
}

.bm-step-item.bm-active .bm-step-num {
	background: var(--bm-primary);
	color: #ffffff;
}

/* Section Title */
.bm-section-title {
	margin-bottom: 24px;
}

.bm-section-title h3 {
	margin: 0 0 6px 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--bm-text-main);
}

.bm-section-title p {
	margin: 0;
	color: var(--bm-text-muted);
	font-size: 14px;
}

/* Services Cards Grid */
.bm-services-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.bm-service-card {
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-radius);
	padding: 20px;
	background: #ffffff;
	transition: all 0.2s ease-in-out;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.bm-service-card:hover {
	border-color: var(--bm-primary);
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
	transform: translateY(-2px);
}

.bm-service-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 12px;
}

.bm-service-card-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--bm-text-main);
}

.bm-service-card-price {
	font-size: 16px;
	font-weight: 700;
	color: var(--bm-primary);
}

.bm-service-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--bm-text-muted);
}

.bm-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #f8fafc;
	padding: 4px 8px;
	border-radius: 4px;
}

.bm-meta-capacity {
	background: #eff6ff;
	color: var(--bm-primary);
	font-weight: 600;
}

.bm-service-desc {
	font-size: 13px;
	color: var(--bm-text-muted);
	margin-bottom: 16px;
	line-height: 1.5;
}

/* Date & Time Step Layout */
.bm-datetime-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 24px;
}

@media (max-width: 680px) {
	.bm-datetime-layout {
		grid-template-columns: 1fr;
	}
}

.bm-date-picker-box {
	background: #f8fafc;
	padding: 16px;
	border-radius: var(--bm-radius);
	border: 1px solid var(--bm-border);
}

.bm-timezone-notice {
	margin-top: 12px;
	font-size: 12px;
	color: var(--bm-text-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Slots Grid & Capacity Badges */
.bm-slots-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 10px;
	max-height: 380px;
	overflow-y: auto;
	padding-right: 4px;
}

.bm-slot-button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 10px 8px;
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-radius);
	background: #ffffff;
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: center;
}

.bm-slot-button:hover:not(:disabled) {
	border-color: var(--bm-primary);
	background: #f0f7ff;
}

.bm-slot-button.bm-slot-selected {
	border-color: var(--bm-primary);
	background: var(--bm-primary);
	color: #ffffff;
}

.bm-slot-button.bm-slot-selected .bm-slot-capacity {
	color: #e0e7ff;
}

.bm-slot-button:disabled {
	opacity: 0.5;
	background: #f1f5f9;
	cursor: not-allowed;
	border-color: #cbd5e1;
}

.bm-slot-time {
	font-size: 14px;
	font-weight: 600;
}

.bm-slot-capacity {
	font-size: 11px;
	color: var(--bm-text-muted);
	margin-top: 4px;
}

.bm-slot-full {
	color: var(--bm-danger);
	font-weight: 500;
}

/* Buttons & Inputs */
.bm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--bm-radius);
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.15s ease;
	text-decoration: none;
}

.bm-button-primary {
	background: var(--bm-primary);
	color: #ffffff;
}

.bm-button-primary:hover {
	background: var(--bm-primary-hover);
	color: #ffffff;
}

.bm-button-secondary {
	background: #f1f5f9;
	color: var(--bm-text-main);
	border-color: #cbd5e1;
}

.bm-button-secondary:hover {
	background: #e2e8f0;
}

.bm-button-outline {
	background: transparent;
	border-color: var(--bm-border);
	color: var(--bm-text-main);
}

.bm-button-outline:hover {
	border-color: var(--bm-text-muted);
}

.bm-button-danger {
	background: #fee2e2;
	color: #b91c1c;
	border-color: #fca5a5;
}

.bm-button-danger:hover {
	background: #fecaca;
}

.bm-btn-select-service {
	width: 100%;
	background: #f8fafc;
	border: 1px solid var(--bm-border);
	color: var(--bm-text-main);
}

.bm-btn-select-service:hover {
	background: var(--bm-primary);
	color: #ffffff;
	border-color: var(--bm-primary);
}

.bm-btn-back {
	background: none;
	border: none;
	color: var(--bm-primary);
	cursor: pointer;
	font-size: 13px;
	padding: 0;
	margin-bottom: 6px;
}

.bm-input,
.bm-form-group input,
.bm-form-group select,
.bm-form-group textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-radius);
	font-size: 14px;
	color: var(--bm-text-main);
	background: #ffffff;
}

.bm-input:focus,
.bm-form-group input:focus,
.bm-form-group select:focus,
.bm-form-group textarea:focus {
	outline: none;
	border-color: var(--bm-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.bm-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 600px) {
	.bm-form-grid {
		grid-template-columns: 1fr;
	}
}

.bm-form-group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.bm-form-group label {
	font-size: 13px;
	font-weight: 500;
	color: var(--bm-text-main);
}

.bm-col-2 {
	grid-column: span 2;
}

/* Confirmation Card */
.bm-confirmation-card {
	text-align: center;
	padding: 20px 10px;
}

.bm-confirmation-icon {
	width: 64px;
	height: 64px;
	background: #dcfce7;
	color: #15803d;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	margin: 0 auto 16px auto;
}

.bm-confirmation-heading {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 8px 0;
}

.bm-confirmation-sub {
	color: var(--bm-text-muted);
	font-size: 14px;
	margin: 0 0 24px 0;
}

.bm-receipt-box {
	max-width: 480px;
	margin: 0 auto 24px auto;
	background: #f8fafc;
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-radius);
	padding: 18px;
	text-align: left;
}

.bm-receipt-item {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px dashed var(--bm-border);
	font-size: 14px;
}

.bm-receipt-item:last-child {
	border-bottom: none;
}

.bm-receipt-label {
	color: var(--bm-text-muted);
}

.bm-receipt-value {
	font-weight: 600;
	color: var(--bm-text-main);
}

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

/* Admin Styles */
.bm-admin-wrap {
	margin: 20px 20px 0 0;
}

.bm-header-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.bm-subtitle {
	margin: 4px 0 0 0;
	color: #64748b;
	font-size: 13px;
}

.bm-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

.bm-stat-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 16px;
	display: flex;
	align-items: center;
	gap: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bm-stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bm-icon-blue { background: #dbeafe; color: #1d4ed8; }
.bm-icon-teal { background: #ccfbf1; color: #0f766e; }
.bm-icon-amber { background: #fef3c7; color: #b45309; }
.bm-icon-green { background: #dcfce7; color: #15803d; }
.bm-icon-purple { background: #f3e8ff; color: #7e22ce; }
.bm-icon-emerald { background: #d1fae5; color: #047857; }

.bm-stat-label {
	display: block;
	font-size: 12px;
	color: #64748b;
	font-weight: 500;
}

.bm-stat-value {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.bm-panel {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bm-panel-info {
	background: #f0fdf4;
	border-color: #bbf7d0;
}

.bm-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.bm-panel-header h2,
.bm-panel-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

/* Status Pills */
.bm-status-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: capitalize;
}

.bm-status-confirmed { background: #dcfce7; color: #15803d; }
.bm-status-pending { background: #fef3c7; color: #b45309; }
.bm-status-rescheduled { background: #dbeafe; color: #1d4ed8; }
.bm-status-completed { background: #e2e8f0; color: #475569; }
.bm-status-cancelled { background: #fee2e2; color: #b91c1c; }
.bm-status-no-show { background: #f1f5f9; color: #64748b; }

.bm-payment-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: capitalize;
}

.bm-payment-paid { background: #dcfce7; color: #15803d; }
.bm-payment-unpaid { background: #fee2e2; color: #b91c1c; }
.bm-payment-pending { background: #fef3c7; color: #b45309; }

.bm-badge {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 500;
}

.bm-badge-capacity { background: #eff6ff; color: #2563eb; }
.bm-badge-free { background: #ecfdf5; color: #059669; }
.bm-badge-location { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.bm-badge-closed { background: #fee2e2; color: #b91c1c; }

.bm-subtext {
	font-size: 12px;
	color: #64748b;
}

/* Modals */
.bm-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.bm-modal-content {
	background: #ffffff;
	border-radius: 10px;
	max-width: 580px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
}

.bm-modal-lg {
	max-width: 760px;
}

.bm-modal-header {
	padding: 16px 20px;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.bm-modal-header h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
}

.bm-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #64748b;
}

.bm-modal-body {
	padding: 20px;
	overflow-y: auto;
}

.bm-modal-footer {
	padding: 14px 20px;
	border-top: 1px solid #e2e8f0;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	background: #f8fafc;
	border-radius: 0 0 10px 10px;
}

/* Overbooking Banner */
.bm-overbooking-banner {
	background: #fffbeb;
	border: 1px solid #fde68a;
	padding: 12px;
	border-radius: 6px;
	margin-top: 15px;
}

/* Calendar Grid */
.bm-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	background: #e2e8f0;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
}

.bm-calendar-day-header {
	background: #f8fafc;
	padding: 8px;
	font-weight: 600;
	font-size: 12px;
	text-align: center;
	color: #475569;
}

.bm-calendar-cell {
	background: #ffffff;
	min-height: 100px;
	padding: 6px;
	display: flex;
	flex-direction: column;
}

.bm-cell-empty {
	background: #f8fafc;
}

.bm-cell-today {
	background: #eff6ff;
}

.bm-cell-date-num {
	font-weight: 600;
	font-size: 12px;
	color: #475569;
	margin-bottom: 4px;
}

.bm-cal-slot-chip {
	font-size: 11px;
	padding: 3px 5px;
	border-radius: 4px;
	margin-bottom: 3px;
	display: flex;
	justify-content: space-between;
}

.bm-chip-avail {
	background: #dcfce7;
	color: #15803d;
}

.bm-chip-full {
	background: #fee2e2;
	color: #b91c1c;
}
