/**
 * Status Display Styles — Frontend (Template-Farben)
 *
 * Dark theme matching the site design:
 * Primary: #B19E63 (Gold), Secondary: #54595F, Text: #F8F8F8, Accent: #25282B
 *
 * @package AS_Camp_Availability_Integration
 * @since   1.3.59
 * @updated 1.3.77
 */

/* ── Status Box Base ─────────────────────────────────────────────── */

.as-cai-status-box {
	background: #25282B;
	border-radius: 14px;
	padding: 24px;
	margin: 20px 0;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(177, 158, 99, 0.15);
	transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
	color: #F8F8F8;
}

.as-cai-status-box.updating {
	opacity: 0.6;
	pointer-events: none;
}

/* ── Status Header ───────────────────────────────────────────────── */

.status-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.status-icon {
	font-size: 28px;
	line-height: 1;
}

.status-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	color: #F8F8F8;
	letter-spacing: -0.02em;
}

/* ── Availability Details ────────────────────────────────────────── */

.status-details {
	margin-bottom: 16px;
}

.availability-main {
	font-size: 16px;
	margin-bottom: 10px;
	color: #F8F8F8;
}

.availability-main strong {
	font-weight: 700;
	color: #F8F8F8;
}

.availability-breakdown {
	display: flex;
	gap: 8px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.reserved-badge,
.sold-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.reserved-badge {
	background: rgba(177, 158, 99, 0.2);
	color: #B19E63;
}

.sold-badge {
	background: rgba(177, 158, 99, 0.2);
	color: #B19E63;
}

/* ── Progress Bar ────────────────────────────────────────────────── */

.availability-progress {
	margin-bottom: 14px;
}

.progress-bar {
	height: 8px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	margin-bottom: 6px;
}

.progress-available {
	background: #B19E63;
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 4px;
}

.progress-reserved {
	background: rgba(177, 158, 99, 0.4);
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-labels {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: rgba(248, 248, 248, 0.6);
}

.label-available {
	font-weight: 600;
}

/* ── Reservation Timer ───────────────────────────────────────────── */

.reservation-timer {
	background: rgba(177, 158, 99, 0.1);
	border: 1px solid rgba(177, 158, 99, 0.25);
	border-left: 3px solid #B19E63;
	padding: 12px 14px;
	border-radius: 8px;
	margin-bottom: 12px;
}

.timer-label {
	display: block;
	font-size: 12px;
	color: rgba(248, 248, 248, 0.6);
	margin-bottom: 4px;
}

.timer-countdown {
	font-size: 18px;
	font-weight: 700;
	color: #B19E63;
	font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}

.timer-countdown.expired {
	color: #6dab56;
}

/* ── Urgency Badge ───────────────────────────────────────────────── */

.urgency-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: rgba(177, 158, 99, 0.12);
	border: 1px solid rgba(177, 158, 99, 0.25);
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	color: #B19E63;
}

.pulse-dot {
	width: 8px;
	height: 8px;
	background: #B19E63;
	border-radius: 50%;
	animation: as-cai-pulse 1.5s ease-in-out infinite;
}

@keyframes as-cai-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(1.2); }
}

/* ── Status-Specific Styles ──────────────────────────────────────── */

.status-available {
	border-left: 3px solid #B19E63;
}

.status-available .status-title {
	color: #B19E63;
}

.status-available .status-icon {
	color: #B19E63;
}

.status-limited {
	border-left: 3px solid #B19E63;
}

.status-limited .status-title {
	color: #B19E63;
}

.status-critical {
	border-left: 3px solid #c4433e;
	animation: as-cai-subtle-pulse 2s ease-in-out infinite;
}

.status-critical .status-title {
	color: #c4433e;
}

@keyframes as-cai-subtle-pulse {
	0%, 100% { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
	50% { box-shadow: 0 2px 16px rgba(196, 67, 62, 0.35); }
}

.status-reserved-full {
	border-left: 3px solid #54595F;
}

.status-reserved-full .status-title {
	color: rgba(248, 248, 248, 0.7);
}

.status-reserved-full {
	border-left: 3px solid #54595F;
}

.status-reserved-full .status-title {
	color: rgba(248, 248, 248, 0.7);
}

.status-sold-out {
	border-left: 3px solid #c4433e;
}

.status-sold-out .status-title {
	color: #c4433e;
	font-weight: 700;
}

.status-sold-out .status-icon {
	color: #c4433e;
}

/* Hide "Parzelle auswählen" button when sold out */
.status-sold-out ~ .stachesepl-single-add-to-cart-button-wrapper,
.status-sold-out ~ .stachesepl-add-to-cart-button-root {
	display: none !important;
}

/* ── Action Buttons ──────────────────────────────────────────────── */

.status-action {
	margin-bottom: 12px;
}

.as-cai-waitlist-button,
.as-cai-notify-button,
.as-cai-refresh-button {
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
	margin-right: 6px;
	margin-bottom: 6px;
	font-family: inherit;
	letter-spacing: -0.01em;
}

.as-cai-waitlist-button:hover,
.as-cai-notify-button:hover,
.as-cai-refresh-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.as-cai-waitlist-button:active,
.as-cai-notify-button:active,
.as-cai-refresh-button:active {
	transform: translateY(0);
}

.as-cai-waitlist-button {
	background: rgba(177, 158, 99, 0.85);
	color: #fff;
}

.as-cai-waitlist-button:hover {
	background: #B19E63;
}

.as-cai-notify-button {
	background: #B19E63;
	color: #fff;
}

.as-cai-notify-button:hover {
	background: #9d8c55;
}

.as-cai-refresh-button {
	background: transparent;
	color: rgba(248, 248, 248, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.15);
}

.as-cai-refresh-button:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: #B19E63;
	color: #F8F8F8;
}

/* ── Status Meta ─────────────────────────────────────────────────── */

.status-meta {
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 11px;
	color: rgba(248, 248, 248, 0.4);
}

.auto-refresh-indicator {
	float: right;
}

.auto-refresh-indicator.pulse {
	color: #B19E63;
	font-weight: 600;
}

/* ── Toast Notifications ─────────────────────────────────────────── */

.as-cai-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 14px 20px;
	background: #25282B;
	color: #F8F8F8;
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	z-index: 9999;
	opacity: 0;
	transform: translateX(120%);
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
}

.as-cai-toast.show {
	opacity: 1;
	transform: translateX(0);
}

.toast-available {
	border-left: 3px solid #B19E63;
}

.toast-limited {
	border-left: 3px solid #B19E63;
}

.toast-critical {
	border-left: 3px solid #c4433e;
}

.toast-reserved-full {
	border-left: 3px solid #54595F;
}

.toast-sold-out {
	border-left: 3px solid #c4433e;
}

/* ── Warteliste / Benachrichtigungs-Modal ─────────────────────────── */

.as-cai-modal-overlay {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 20px !important;
	background: rgba(0, 0, 0, 0) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 999999 !important;
	transition: background 0.3s ease;
	box-sizing: border-box !important;
}

.as-cai-modal-overlay.show {
	background: rgba(0, 0, 0, 0.6) !important;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.as-cai-modal {
	background: #fff !important;
	border-radius: 16px !important;
	padding: 32px !important;
	max-width: 420px !important;
	width: 100% !important;
	margin: auto !important;
	position: relative !important;
	text-align: center !important;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
	transform: scale(0.9) translateY(20px);
	opacity: 0;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	color: #25282B !important;
	box-sizing: border-box !important;
}

.as-cai-modal-overlay.show .as-cai-modal {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.as-cai-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 22px;
	color: #a1a1aa;
	cursor: pointer;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	line-height: 1;
}

.as-cai-modal-close:hover {
	background: #f4f4f5;
	color: #25282B;
}

.as-cai-modal-icon {
	font-size: 40px;
	margin-bottom: 12px;
	line-height: 1;
}

.as-cai-modal-success-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(177, 158, 99, 0.12);
	color: #B19E63;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	margin: 0 auto 12px;
}

.as-cai-modal-title {
	font-size: 20px;
	font-weight: 700;
	color: #25282B;
	margin: 0 0 8px 0;
	letter-spacing: -0.02em;
}

.as-cai-modal-text {
	font-size: 14px;
	color: #54595F;
	line-height: 1.5;
	margin: 0 0 20px 0;
}

.as-cai-modal-label {
	display: block;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: #25282B;
	margin-bottom: 6px;
}

.as-cai-modal-input {
	width: 100%;
	padding: 12px 14px;
	border: 2px solid #e4e4e7;
	border-radius: 10px;
	font-size: 15px;
	color: #25282B;
	background: #fafafa;
	transition: all 0.15s;
	font-family: inherit;
	box-sizing: border-box;
}

.as-cai-modal-input:focus {
	outline: none;
	border-color: #B19E63;
	background: #fff;
	box-shadow: 0 0 0 4px rgba(177, 158, 99, 0.12);
}

.as-cai-modal-input::placeholder {
	color: #a1a1aa;
}

.as-cai-modal-error {
	text-align: left;
	font-size: 13px;
	color: #c4433e;
	margin-top: 6px;
	font-weight: 500;
}

.as-cai-modal-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.as-cai-modal-btn-cancel {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #e4e4e7;
	background: #fff;
	color: #54595F;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	font-family: inherit;
}

.as-cai-modal-btn-cancel:hover {
	background: #f4f4f5;
	border-color: #d4d4d8;
}

.as-cai-modal-btn-submit {
	flex: 1.5;
	padding: 12px 16px;
	border: none;
	background: #B19E63;
	color: #fff;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	font-family: inherit;
}

.as-cai-modal-btn-submit:hover {
	background: #9d8c55;
	box-shadow: 0 4px 12px rgba(177, 158, 99, 0.3);
	transform: translateY(-1px);
}

.as-cai-modal-btn-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.as-cai-modal-btn-done {
	flex: 1;
}

/* ── Mobile Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
	.as-cai-status-box {
		padding: 16px;
		border-radius: 10px;
	}

	.status-title {
		font-size: 16px;
	}

	.availability-main {
		font-size: 14px;
	}

	.availability-breakdown {
		flex-direction: column;
		gap: 6px;
	}

	.as-cai-toast {
		right: 10px;
		left: 10px;
	}

	.as-cai-waitlist-button,
	.as-cai-notify-button,
	.as-cai-refresh-button {
		display: block;
		width: 100%;
		margin-right: 0;
	}

	.as-cai-modal {
		padding: 24px;
		margin: 10px;
	}

	.as-cai-modal-actions {
		flex-direction: column;
	}

	.as-cai-modal-btn-cancel,
	.as-cai-modal-btn-submit {
		flex: 1;
	}
}
