/**
 * Booking Form Styles
 *
 * @package SH_Bookings
 */

:root {
	--sh-primary-color: #C41E3A;
	--sh-secondary-color: #1a1a1a;
	--sh-sidebar-bg: #8B4513;
	--sh-border-radius: 8px;
	--sh-transition: all 0.3s ease;
}

/* Container */
.sh-booking-form-container {
	display: flex;
	gap: 30px;
	max-width: 1200px;
	margin: 40px auto;
	padding: 0 20px;
}

/* Main Form */
.sh-booking-form-main {
	flex: 1;
	background: #fff;
	padding: 40px;
	border-radius: var(--sh-border-radius);
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	position: relative;
}

/* Progress Bar */
.sh-progress-container {
	margin-bottom: 30px;
}

.sh-progress-bar-bg {
	width: 100%;
	height: 8px;
	background: #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 10px;
}

.sh-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--sh-primary-color), #d63651);
	border-radius: 10px;
	transition: width 0.4s ease;
	width: 25%;
}

.sh-step-indicator {
	text-align: center;
	color: #666;
	font-size: 14px;
	font-weight: 600;
}

/* Steps */
.sh-step {
	display: none;
	animation: fadeIn 0.3s ease;
}

.sh-step.active {
	display: block;
}

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

.sh-step h2 {
	margin-top: 0;
	margin-bottom: 25px;
	color: var(--sh-secondary-color);
	font-size: 24px;
}

/* Form Groups */
.sh-form-group {
	margin-bottom: 20px;
}

.sh-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

.sh-form-group input,
.sh-form-group select,
.sh-form-group textarea {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #ddd;
	border-radius: var(--sh-border-radius);
	font-size: 16px;
	transition: var(--sh-transition);
	font-family: inherit;
}

.sh-form-group input:focus,
.sh-form-group select:focus,
.sh-form-group textarea:focus {
	outline: none;
	border-color: var(--sh-primary-color);
	box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.sh-form-group textarea {
	resize: vertical;
	min-height: 100px;
}

/* Calendar */
.sh-calendar {
	margin: 30px 0;
}

.sh-calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #eee;
}

.sh-calendar-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--sh-secondary-color);
}

.sh-calendar-prev,
.sh-calendar-next {
	background: #f5f5f5;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 24px;
	cursor: pointer;
	transition: var(--sh-transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.sh-calendar-prev:hover,
.sh-calendar-next:hover {
	background: var(--sh-primary-color);
	color: white;
}

.sh-calendar-days-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
	margin-bottom: 10px;
}

.sh-calendar-day-name {
	text-align: center;
	font-weight: 700;
	font-size: 12px;
	color: #666;
	padding: 10px 0;
	text-transform: uppercase;
}

.sh-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
}

.sh-calendar-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--sh-border-radius);
	cursor: pointer;
	transition: var(--sh-transition);
	font-weight: 600;
	background: #f9f9f9;
	border: 2px solid transparent;
}

.sh-calendar-day:hover:not(.disabled):not(.other-month) {
	background: var(--sh-primary-color);
	color: white;
	transform: scale(1.05);
}

.sh-calendar-day.selected {
	background: var(--sh-primary-color);
	color: white;
	border-color: var(--sh-primary-color);
	box-shadow: 0 4px 8px rgba(196, 30, 58, 0.3);
}

.sh-calendar-day.disabled {
	background: #f0f0f0;
	color: #ccc;
	cursor: not-allowed;
	opacity: 0.5;
}

.sh-calendar-day.other-month {
	opacity: 0;
	pointer-events: none;
}

/* Time Slots */
.sh-time-slots {
	margin-top: 30px;
}

.sh-time-slots-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 10px;
	margin-top: 20px;
}

.sh-time-slot {
	padding: 15px;
	text-align: center;
	border: 2px solid #ddd;
	border-radius: var(--sh-border-radius);
	cursor: pointer;
	transition: var(--sh-transition);
	font-weight: 600;
	font-size: 16px;
	background: white;
}

.sh-time-slot:hover:not(.disabled) {
	border-color: var(--sh-primary-color);
	background: #fff5f7;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sh-time-slot.selected {
	background: var(--sh-primary-color);
	color: white;
	border-color: var(--sh-primary-color);
	box-shadow: 0 4px 8px rgba(196, 30, 58, 0.3);
}

.sh-time-slot.disabled {
	background: #f5f5f5;
	color: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

/* Loading / Error States */
.sh-loading,
.sh-no-slots,
.sh-error {
	text-align: center;
	padding: 40px 20px;
	color: #666;
	font-style: italic;
}

.sh-loading {
	position: relative;
}

.sh-loading::after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #ddd;
	border-top-color: var(--sh-primary-color);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-left: 10px;
	vertical-align: middle;
}

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

.sh-error {
	color: #dc3545;
}

/* Buttons */
.sh-button {
	background: var(--sh-primary-color);
	color: #fff;
	padding: 15px 30px;
	border: none;
	border-radius: var(--sh-border-radius);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--sh-transition);
	display: inline-block;
	text-decoration: none;
}

.sh-button:hover {
	background: #a91730;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.sh-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.sh-button-secondary {
	background: #6c757d;
	color: #fff;
}

.sh-button-secondary:hover {
	background: #5a6268;
}

.sh-form-actions {
	display: flex;
	gap: 15px;
	margin-top: 30px;
}

/* Spinner */
.sh-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

/* Notifications */
.sh-notification {
	padding: 15px 20px;
	border-radius: var(--sh-border-radius);
	margin-bottom: 20px;
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sh-notification-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.sh-notification-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

/* Confirmation */
.sh-confirmation-success {
	text-align: center;
	padding: 40px 20px;
}

.sh-confirmation-icon {
	width: 80px;
	height: 80px;
	background: #28a745;
	color: white;
	border-radius: 50%;
	font-size: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
	animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
	from {
		transform: scale(0);
	}
	to {
		transform: scale(1);
	}
}

.sh-confirmation-success h2 {
	color: #28a745;
	margin-bottom: 10px;
}

.sh-confirmation-details {
	background: #f9f9f9;
	padding: 30px;
	border-radius: var(--sh-border-radius);
	margin: 30px 0;
}

.sh-confirmation-details h3 {
	margin-top: 0;
	color: var(--sh-secondary-color);
}

.sh-confirmation-table {
	width: 100%;
	border-collapse: collapse;
}

.sh-confirmation-table th,
.sh-confirmation-table td {
	padding: 12px 0;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.sh-confirmation-table th {
	font-weight: 600;
	color: #666;
	width: 140px;
}

.sh-confirmation-table tr:last-child th,
.sh-confirmation-table tr:last-child td {
	border-bottom: none;
}

.sh-confirmation-info {
	text-align: center;
	padding: 20px;
	background: #fff9e6;
	border-radius: var(--sh-border-radius);
	border: 2px solid #ffc107;
}

.sh-confirmation-contact {
	margin-top: 15px;
	font-weight: 600;
	color: var(--sh-secondary-color);
}

/* Sidebar */
.sh-booking-form-sidebar {
	width: 350px;
	background: var(--sh-sidebar-bg);
	color: #fff;
	padding: 30px;
	border-radius: var(--sh-border-radius);
	height: fit-content;
	position: sticky;
	top: 20px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.sh-booking-form-sidebar h3 {
	margin-top: 0;
	margin-bottom: 25px;
	font-size: 20px;
	border-bottom: 2px solid rgba(255,255,255,0.3);
	padding-bottom: 15px;
}

.sh-summary {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.sh-summary-item {
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sh-summary-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.sh-summary-item strong {
	display: block;
	margin-bottom: 8px;
	opacity: 0.9;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sh-summary-item span {
	display: block;
	font-size: 18px;
	font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
	.sh-booking-form-container {
		flex-direction: column;
		padding: 0 15px;
	}

	.sh-booking-form-main {
		padding: 25px 20px;
	}

	.sh-booking-form-sidebar {
		width: 100%;
		position: static;
		order: -1;
	}

	.sh-step h2 {
		font-size: 20px;
	}

	.sh-calendar-grid {
		gap: 3px;
	}

	.sh-calendar-day {
		font-size: 14px;
	}

	.sh-time-slots-grid {
		grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
		gap: 8px;
	}

	.sh-time-slot {
		padding: 12px;
		font-size: 14px;
	}

	.sh-form-actions {
		flex-direction: column-reverse;
	}

	.sh-button {
		width: 100%;
		padding: 14px 20px;
	}

	.sh-summary-item span {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.sh-booking-form-main {
		padding: 20px 15px;
	}

	.sh-booking-form-sidebar {
		padding: 20px 15px;
	}

	.sh-calendar-day-name {
		font-size: 10px;
		padding: 8px 0;
	}

	.sh-time-slots-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Print styles */
@media print {
	.sh-booking-form-sidebar,
	.sh-button,
	.sh-calendar,
	.sh-time-slots {
		display: none;
	}

	.sh-booking-form-main {
		box-shadow: none;
		padding: 0;
	}
}
