/**
 * QuickCal Slot Hold Timer Styles
 *
 * Styles for the countdown timer that appears when reserving a slot.
 *
 * @package QuickCal
 * @since 1.9.0
 */

/* ==========================================================================
   Slot Hold Timer Component
   ========================================================================== */

.quickcal-slot-hold-timer {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 15px;
	margin: 15px 0;
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
	border: 1px solid #a5d6a7;
	border-radius: 8px;
	animation: slideIn 0.3s ease;
}

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

.quickcal-slot-hold-timer .slot-hold-icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #4caf50;
	border-radius: 50%;
	color: #fff;
	font-size: 18px;
}

.quickcal-slot-hold-timer .slot-hold-content {
	flex: 1;
	min-width: 0;
}

.quickcal-slot-hold-timer .slot-hold-title {
	font-weight: 600;
	font-size: 14px;
	color: #2e7d32;
	margin-bottom: 4px;
}

.quickcal-slot-hold-timer .slot-hold-countdown {
	font-size: 24px;
	font-weight: 700;
	color: #1b5e20;
	margin-bottom: 4px;
}

.quickcal-slot-hold-timer .slot-hold-countdown .countdown-time {
	font-family: 'Courier New', Courier, monospace;
	letter-spacing: 1px;
}

.quickcal-slot-hold-timer .slot-hold-countdown .countdown-label {
	font-size: 12px;
	font-weight: 400;
	color: #388e3c;
	margin-left: 6px;
	text-transform: lowercase;
}

.quickcal-slot-hold-timer .slot-hold-message {
	font-size: 12px;
	color: #388e3c;
	line-height: 1.4;
}

/* ==========================================================================
   Warning State (< 2 minutes remaining)
   ========================================================================== */

.quickcal-slot-hold-timer.warning {
	background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
	border-color: #ffb74d;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
	}
	50% {
		box-shadow: 0 0 0 8px rgba(255, 152, 0, 0);
	}
}

.quickcal-slot-hold-timer.warning .slot-hold-icon {
	background: #ff9800;
}

.quickcal-slot-hold-timer.warning .slot-hold-title {
	color: #e65100;
}

.quickcal-slot-hold-timer.warning .slot-hold-countdown {
	color: #bf360c;
}

.quickcal-slot-hold-timer.warning .slot-hold-countdown .countdown-label,
.quickcal-slot-hold-timer.warning .slot-hold-message {
	color: #f57c00;
}

/* ==========================================================================
   Expired State
   ========================================================================== */

.quickcal-slot-hold-timer.expired {
	background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
	border-color: #ef9a9a;
	animation: none;
}

.quickcal-slot-hold-timer.expired .slot-hold-icon {
	background: #f44336;
}

.quickcal-slot-hold-timer.expired .slot-hold-title {
	color: #c62828;
}

.quickcal-slot-hold-timer.expired .slot-hold-countdown {
	color: #b71c1c;
}

.quickcal-slot-hold-timer.expired .slot-hold-countdown .countdown-label,
.quickcal-slot-hold-timer.expired .slot-hold-message {
	color: #d32f2f;
}

/* ==========================================================================
   Expiration Notice (shown after form closes)
   ========================================================================== */

.quickcal-hold-expired-notice {
	padding: 15px 20px;
	margin: 15px 0;
	background: #fff3e0;
	border: 1px solid #ffb74d;
	border-radius: 6px;
	color: #e65100;
	font-size: 14px;
	text-align: center;
	animation: fadeIn 0.3s ease;
}

.quickcal-hold-expired-notice i {
	margin-right: 8px;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ==========================================================================
   Admin Styles
   ========================================================================== */

.booked-modal .quickcal-slot-hold-timer {
	margin: 15px 20px;
}

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

@media (max-width: 480px) {
	.quickcal-slot-hold-timer {
		padding: 12px;
		gap: 10px;
	}

	.quickcal-slot-hold-timer .slot-hold-icon {
		width: 32px;
		height: 32px;
		font-size: 14px;
	}

	.quickcal-slot-hold-timer .slot-hold-countdown {
		font-size: 20px;
	}
}
