/* 
 * Frontend Styles
 * Scheduled Website Closure & Countdown
 */

/* Notification Bar (Pre-closure phase) */
#swc-notice-bar {
	position: fixed !important;
	bottom: 0 !important;
	top: auto !important;
	left: 0 !important;
	right: 0 !important;
	background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
	color: #ffffff !important;
	padding: 15px 20px !important;
	z-index: 999998 !important;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3) !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	width: 100% !important;
	box-sizing: border-box !important;
	border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.swc-notice-bar-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	width: 100%;
}

/* Marquee */
.swc-marquee-wrapper {
	flex: 1 1 0;
	min-width: 0;
	max-width: 100%;
	overflow: visible;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 4px;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.swc-marquee {
	white-space: normal;
	display: block;
	font-weight: 500;
	font-size: 18px;
	line-height: 1.6;
	word-break: break-word;
	overflow-wrap: break-word;
}

@keyframes swc-marquee-scroll {
	0% {
		transform: translateX(100%);
	}
	100% {
		transform: translateX(-100%);
	}
}

/* Countdown Timer */
.swc-countdown {
	display: flex;
	gap: 12px;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	background: rgba(59, 130, 246, 0.1);
	padding: 8px 12px;
	border-radius: 4px;
	border-left: 3px solid #3b82f6;
	flex-wrap: wrap;
	justify-content: center;
	border: 1px solid rgba(59, 130, 246, 0.3);
}

.swc-countdown-unit {
	text-align: center;
	min-width: 50px;
}

.swc-countdown-value {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: #3b82f6;
}

.swc-countdown-label {
	display: block;
	font-size: 11px;
	color: #d1d5db;
	margin-top: 2px;
}

/* ========================================
   CLOSURE OVERLAY - FULL WIDTH BANNER
   ======================================== */

#swc-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	width: 100%;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	
	/* Banner as full-width background */
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
}

/* Dark overlay layer - sits between banner and content */
.swc-overlay-dark {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	transition: background-color 0.3s ease;
}

/* Content wrapper - sits on top of dark overlay */
.swc-overlay-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 40px 20px;
	text-align: center;
	position: relative;
	z-index: 2;
	overflow-y: auto;
	max-height: 100vh;
}

/* Closure message box - white box with content */
.swc-closure-box {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 12px;
	padding: 60px 40px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	color: #1f2937;
	width: 100%;
	max-width: 800px;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.swc-closure-box h1 {
	font-size: 48px;
	font-weight: 700;
	margin: 0 0 20px 0;
	color: #111827;
	line-height: 1.2;
}

.swc-closure-box p {
	font-size: 18px;
	line-height: 1.6;
	margin: 0 0 30px 0;
	color: #4b5563;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-wrap: break-word;
}

#swc-closure-countdown {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #ffffff;
	border: none;
	border-left: none;
	padding: 15px 20px;
	margin-top: 20px;
	justify-content: center;
}

#swc-closure-countdown .swc-countdown-unit {
	min-width: 80px;
}

#swc-closure-countdown .swc-countdown-value {
	font-size: 32px;
	color: #ffffff;
}

#swc-closure-countdown .swc-countdown-label {
	color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets and smaller desktops */
@media (max-width: 900px) {
	.swc-closure-box {
		padding: 50px 35px;
		max-width: 700px;
	}

	.swc-closure-box h1 {
		font-size: 40px;
	}

	.swc-closure-box p {
		font-size: 16px;
	}

	#swc-closure-countdown .swc-countdown-value {
		font-size: 28px;
	}

	#swc-closure-countdown .swc-countdown-unit {
		min-width: 70px;
	}
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
	#swc-overlay {
		background-attachment: scroll;
	}

	#swc-notice-bar {
		top: 0 !important;
		bottom: auto !important;
		padding: 12px 15px !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
		border-top: none !important;
	}

	.swc-notice-bar-content {
		gap: 12px;
		justify-content: center;
		flex-wrap: wrap;
		width: 100%;
	}

	.swc-marquee-wrapper {
		min-width: 100%;
		width: 100%;
		flex-basis: 100%;
		overflow: visible;
	}

	.swc-marquee {
		white-space: normal;
		display: block;
		animation: none;
		font-weight: 500;
		font-size: 18px;
		line-height: 1.6;
		word-break: break-word;
		overflow-wrap: break-word;
	}

	.swc-countdown {
		font-size: 12px;
		gap: 8px;
		padding: 6px 10px;
		width: 100%;
	}

	.swc-countdown-value {
		font-size: 14px;
	}

	.swc-countdown-label {
		font-size: 10px;
	}

	.swc-overlay-content {
		padding: 30px 15px;
	}

	.swc-closure-box {
		padding: 40px 25px;
		max-width: 90%;
		border-radius: 8px;
	}

	.swc-closure-box h1 {
		font-size: 32px;
		margin-bottom: 15px;
	}

	.swc-closure-box p {
		font-size: 15px;
		margin-bottom: 20px;
	}

	#swc-closure-countdown {
		padding: 12px 15px;
		margin-top: 15px;
	}

	#swc-closure-countdown .swc-countdown-value {
		font-size: 22px;
	}

	#swc-closure-countdown .swc-countdown-unit {
		min-width: 55px;
	}
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
	#swc-notice-bar {
		top: 0 !important;
		bottom: auto !important;
		padding: 10px 12px !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		box-sizing: border-box !important;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
		border-top: none !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
	}

	body {
		padding-top: 0;
	}

	.swc-notice-bar-content {
		flex-direction: column;
		gap: 10px;
		width: 100%;
	}

	.swc-marquee-wrapper {
		min-width: 100%;
		width: 100%;
		padding: 6px 10px;
		flex-basis: 100%;
		overflow: visible;
	}

	.swc-marquee {
		white-space: normal;
		display: block;
		animation: none;
		font-weight: 500;
		font-size: 16px;
		line-height: 1.6;
		word-break: break-word;
		overflow-wrap: break-word;
	}

	.swc-countdown {
		width: 100%;
		justify-content: center;
		padding: 8px 10px;
		gap: 6px;
		font-size: 11px;
	}

	.swc-countdown-value {
		font-size: 12px;
	}

	.swc-countdown-label {
		font-size: 9px;
	}

	.swc-overlay-content {
		padding: 20px 12px;
	}

	.swc-closure-box {
		padding: 30px 20px;
		max-width: 95%;
		border-radius: 6px;
	}

	.swc-closure-box h1 {
		font-size: 26px;
		margin-bottom: 12px;
	}

	.swc-closure-box p {
		font-size: 14px;
		margin-bottom: 15px;
		line-height: 1.5;
	}

	#swc-closure-countdown {
		padding: 10px 12px;
		margin-top: 12px;
		gap: 4px;
	}

	#swc-closure-countdown .swc-countdown-value {
		font-size: 18px;
	}

	#swc-closure-countdown .swc-countdown-unit {
		min-width: 48px;
	}

	#swc-closure-countdown .swc-countdown-label {
		font-size: 8px;
	}
}

/* Extra small devices (320px) */
@media (max-width: 360px) {
	.swc-closure-box {
		padding: 25px 15px;
	}

	.swc-closure-box h1 {
		font-size: 22px;
		margin-bottom: 10px;
	}

	.swc-closure-box p {
		font-size: 13px;
		margin-bottom: 12px;
	}

	#swc-closure-countdown {
		padding: 8px 10px;
	}

	#swc-closure-countdown .swc-countdown-value {
		font-size: 16px;
	}

	#swc-closure-countdown .swc-countdown-unit {
		min-width: 42px;
	}

	.swc-countdown-label {
		font-size: 8px;
	}
}

/* Prevent scrollbar on body during closure */
body.swc-closure-active {
	overflow: hidden;
	height: 100vh;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.swc-marquee {
		animation: none;
		transform: translateX(0);
	}
}

/* Print Styles */
@media print {
	#swc-notice-bar,
	#swc-overlay {
		display: none !important;
	}
}
