/**
 * Booking System Frontend Styling
 * Brandsmaya New Theme
 */

/* Modal Backdrop */
.booking-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.booking-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Modal Content Box */
.booking-modal-content {
	background: rgba(26, 26, 26, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(235, 36, 36, 0.08);
	border-radius: 24px;
	width: 90%;
	max-width: 650px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	padding: 40px;
	color: var(--color-white);
	transform: scale(0.95) translateY(20px);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.booking-modal-overlay.active .booking-modal-content {
	transform: scale(1) translateY(0);
}

/* Custom Scrollbar for Modal Content */
.booking-modal-content::-webkit-scrollbar {
	width: 6px;
}
.booking-modal-content::-webkit-scrollbar-track {
	background: transparent;
}
.booking-modal-content::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}

/* Close Button */
.booking-modal-close {
	position: absolute;
	top: 25px;
	right: 25px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--color-white);
	transition: var(--transition-smooth);
	z-index: 10;
}

.booking-modal-close:hover {
	background: var(--color-primary);
	border-color: var(--color-primary);
	transform: rotate(90deg);
}

/* Title & Header */
.booking-header {
	margin-bottom: 30px;
	text-align: center;
}

.booking-main-title {
	font-size: 2.2rem;
	font-weight: 800;
	margin-bottom: 10px;
	letter-spacing: -0.02em;
	background: linear-gradient(135deg, #FFF 0%, rgba(255, 255, 255, 0.7) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.booking-subtitle {
	font-size: var(--size-16);
	opacity: 0.7;
	max-width: 460px;
	margin: 0 auto;
	line-height: 1.5;
}

/* Step Indicator */
.booking-steps {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-bottom: 30px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	padding-bottom: 15px;
}

.booking-step-tab {
	font-size: var(--size-14);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.4;
	transition: var(--transition-smooth);
	position: relative;
	padding-bottom: 8px;
}

.booking-step-tab.active {
	opacity: 1;
	color: var(--color-primary);
}

.booking-step-tab.active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--color-primary);
	box-shadow: 0 0 10px var(--color-primary);
}

/* Form Sections */
.booking-form-section {
	display: none;
	animation: fadeIn 0.4s ease forwards;
}

.booking-form-section.active {
	display: block;
}

/* Calendar styling */
.calendar-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.calendar-month-title {
	font-size: var(--size-18);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.calendar-nav-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: var(--color-white);
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--transition-smooth);
}

.calendar-nav-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.2);
}

.calendar-nav-btn:disabled {
	opacity: 0.25;
	cursor: not-allowed;
}

.calendar-nav-btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* Grid Layout */
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
	margin-bottom: 20px;
}

.calendar-day-header {
	text-align: center;
	font-size: var(--size-12);
	font-weight: 700;
	opacity: 0.4;
	text-transform: uppercase;
	padding: 5px 0;
}

.calendar-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: var(--size-15);
	font-weight: 500;
	cursor: pointer;
	transition: var(--transition-smooth);
	user-select: none;
	border: 1px solid transparent;
}

.calendar-day:hover:not(.empty):not(.disabled) {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.15);
}

.calendar-day.today {
	color: var(--color-primary);
	font-weight: 700;
	border-color: rgba(235, 36, 36, 0.3);
}

.calendar-day.selected {
	background: var(--color-primary) !important;
	color: var(--color-white) !important;
	font-weight: 700;
	box-shadow: 0 0 15px rgba(235, 36, 36, 0.4);
	border-color: var(--color-primary);
}

.calendar-day.disabled {
	opacity: 0.15;
	cursor: not-allowed;
	pointer-events: none;
}

.calendar-day.empty {
	cursor: default;
	pointer-events: none;
}

/* Slots Grid styling */
.slots-container {
	margin-top: 25px;
}

.slots-title {
	font-size: var(--size-16);
	font-weight: 700;
	margin-bottom: 15px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.9;
}

.slots-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 25px;
}

.slot-btn {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	color: var(--color-white);
	padding: 12px 10px;
	border-radius: 10px;
	font-size: var(--size-14);
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: var(--transition-smooth);
}

.slot-btn:hover:not(.disabled) {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.15);
	transform: translateY(-2px);
}

.slot-btn.selected {
	background: var(--color-primary);
	border-color: var(--color-primary);
	box-shadow: 0 0 15px rgba(235, 36, 36, 0.3);
	color: var(--color-white);
}

.slot-btn.disabled {
	opacity: 0.2;
	background: rgba(255, 255, 255, 0.01);
	border-color: transparent;
	text-decoration: line-through;
	cursor: not-allowed;
	pointer-events: none;
}

/* User Form Details styling */
.form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-bottom: 20px;
}

.form-group-full {
	grid-column: span 2;
}

.booking-form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.booking-label {
	font-size: var(--size-14);
	font-weight: 600;
	opacity: 0.8;
}

.booking-input {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 14px 18px;
	border-radius: 12px;
	color: var(--color-white);
	font-size: var(--size-16);
	font-family: var(--font-family);
	transition: var(--transition-smooth);
	width: 100%;
	box-sizing: border-box;
}

.booking-input:focus {
	outline: none;
	border-color: var(--color-primary);
	background: rgba(255, 255, 255, 0.07);
	box-shadow: 0 0 10px rgba(235, 36, 36, 0.15);
}

textarea.booking-input {
	resize: vertical;
	min-height: 100px;
}

/* Selected Summary Card */
.booking-summary-bar {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 12px;
	padding: 15px 20px;
	margin-bottom: 25px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.summary-details {
	display: flex;
	gap: 20px;
}

.summary-item {
	font-size: var(--size-14);
	opacity: 0.8;
}

.summary-item strong {
	color: var(--color-primary);
	font-weight: 700;
}

/* Action row */
.booking-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
	gap: 15px;
}

.btn-booking-back {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--color-white);
	padding: 14px 28px;
	border-radius: 12px;
	font-size: var(--size-15);
	font-weight: 700;
	cursor: pointer;
	transition: var(--transition-smooth);
}

.btn-booking-back:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.3);
}

.btn-booking-submit {
	background: var(--color-primary);
	border: 1px solid var(--color-primary);
	color: var(--color-white);
	padding: 14px 32px;
	border-radius: 12px;
	font-size: var(--size-15);
	font-weight: 700;
	cursor: pointer;
	transition: var(--transition-smooth);
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: center;
}

.btn-booking-submit:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(235, 36, 36, 0.3);
}

.btn-booking-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Form Error Message */
.booking-error-msg {
	color: #ef4444;
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.2);
	border-radius: 10px;
	padding: 12px 15px;
	font-size: var(--size-14);
	margin-bottom: 20px;
	display: none;
	animation: shake 0.3s ease;
}

/* Loading Spinner */
.booking-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	display: none;
}

/* Success Card styling */
.booking-success-card {
	text-align: center;
	padding: 30px 10px;
	display: none;
	animation: scaleUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.booking-success-icon-wrap {
	width: 80px;
	height: 80px;
	background: rgba(16, 185, 129, 0.1);
	border: 1px solid rgba(16, 185, 129, 0.25);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 25px auto;
	color: #10b981;
}

.booking-success-icon-wrap svg {
	width: 40px;
	height: 40px;
	stroke-width: 2.5px;
}

.booking-success-title {
	font-size: var(--size-26);
	font-weight: 800;
	margin-bottom: 15px;
	color: var(--color-white);
}

.booking-success-desc {
	font-size: var(--size-16);
	opacity: 0.8;
	line-height: 1.6;
	max-width: 450px;
	margin: 0 auto 30px auto;
}

.btn-success-close {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: var(--color-white);
	padding: 12px 30px;
	border-radius: 10px;
	font-size: var(--size-14);
	font-weight: 700;
	cursor: pointer;
	transition: var(--transition-smooth);
}

.btn-success-close:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.25);
}

/* Animations */
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

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

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

/* Responsive Rules */
@media (max-width: 768px) {
	.booking-modal-content {
		padding: 30px 20px;
	}
	
	.slots-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.form-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.form-group-full {
		grid-column: span 1;
	}
}

@media (max-width: 480px) {
	.booking-main-title {
		font-size: var(--size-26);
	}
	
	.slots-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.booking-actions {
		flex-direction: column-reverse;
	}
	
	.booking-actions button {
		width: 100%;
	}
	
	.booking-summary-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}
