/**
 * Public Styles
 *
 * @package    Amsotech_Competitions
 * @subpackage Amsotech_Competitions/public/assets/css
 */

/* ================================================
   Force Light Mode for Competition Elements
   ================================================ */

/* Override dark mode for all competition elements */
.amsotech-competition-notice,
.amsotech-competition-skill-based,
.amsotech-competition-closed,
.amsotech-competition-winner-announcement,
.amsotech-competition-entry-requirements,
.amsotech-competition-description,
.amsotech-competition-progress-wrapper,
.amsotech-competition-countdown-block,
.amsotech-competition-prizes-block,
.prize-card,
.winner-item,
.tc-modal,
.modal-content {
	color-scheme: light !important;
	background-color: #fff !important;
	color: #333 !important;
}

/* Ensure text remains readable in light mode */
.prize-name,
.countdown-label,
.countdown-value,
.closed-text,
.milestone-text {
	color: #333 !important;
}

/* Prize values use custom blue color defined in main styles */

/* Block headings have custom color (blue) defined in main styles */

/* Specific background overrides for colored sections */
.amsotech-competition-skill-based {
	background: #e8f4f8 !important;
	color: #0a4d6e !important;
}

.amsotech-competition-skill-based strong {
	color: #2271b1 !important;
}

.amsotech-competition-closed,
.amsotech-competition-countdown-block.amsotech-competition-closed {
	background: #fff3cd !important;
	color: #856404 !important;
}

.closed-text {
	color: #856404 !important;
}

/* Removed - now using gradient backgrounds defined in main styles */

.prize-card {
	background: #ffffff !important;
	border-color: #ddd !important;
}

/* ================================================
   Competition Notices
   ================================================ */

.amsotech-competition-notice {
	padding: 15px 20px;
	margin: 15px 0;
	border-radius: 8px;
	border-left: 4px solid;
}

.amsotech-competition-notice strong {
	display: block;
	margin-bottom: 8px;
	font-size: 16px;
	font-weight: 700;
}

.amsotech-competition-notice p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

/* Skill-Based Competition Notice */
.amsotech-competition-skill-based {
	background: #e8f4f8;
	border-color: #2271b1;
	color: #0a4d6e;
}

.amsotech-competition-skill-based strong {
	color: #2271b1;
}

/* Competition Closed Notice */
.amsotech-competition-closed {
	background: #fff3cd;
	border-color: #ffb900;
	color: #856404;
}

/* ================================================
   Competition Entry Requirements (Product Page)
   ================================================ */

.amsotech-competition-entry-requirements {
	margin: 25px 0;
	padding: 25px;
	background: #f8f9fa;
	border: 2px solid #ddd;
	border-radius: 8px;
}

.amsotech-competition-entry-requirements h4 {
	margin: 0 0 15px 0;
	font-size: 16px;
	font-weight: 700;
	color: #333;
}

.amsotech-competition-entry-requirements .description {
	margin: 0 0 20px 0;
	font-size: 14px;
	color: #666;
}

.requirement-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 15px 0;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s ease;
	padding: 10px;
	border-radius: 4px;
}

.requirement-label:hover {
	background: rgba(0, 0, 0, 0.03);
}

.requirement-label input[type="checkbox"] {
	margin: 0;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.requirement-label span {
	flex: 1;
	line-height: 1.5;
}

.requirement-label small {
	display: block;
	margin-top: 5px;
	color: #666;
	font-size: 12px;
}

.requirement-label.required-checkbox {
	border: 1px solid #ddd;
	background: #fff;
}

.requirement-label.required-checkbox span::after {
	content: ' *';
	color: #d63638;
	font-weight: 700;
}

.view-tc-modal {
	color: #2271b1;
	text-decoration: underline;
	cursor: pointer;
}

.view-tc-modal:hover {
	color: #135e96;
}

.required-notice {
	margin: 15px 0 0 0;
	padding: 10px;
	background: #fff3cd;
	border-radius: 4px;
	font-size: 12px;
	color: #856404;
}

.required-indicator {
	color: #d63638;
	font-weight: 700;
}

/* Disabled add-to-cart button state */
.single_add_to_cart_button.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #999 !important;
	border-color: #999 !important;
}

/* ================================================
   Terms & Conditions Modal
   ================================================ */

.amsotech-competition-tc-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.7);
	animation: fadeIn 0.3s ease;
}

.amsotech-competition-tc-modal .modal-content {
	background-color: #fff;
	margin: 5% auto;
	padding: 30px;
	border-radius: 8px;
	width: 90%;
	max-width: 800px;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	animation: slideIn 0.3s ease;
}

.amsotech-competition-tc-modal h2 {
	margin: 0 0 20px 0;
	font-size: 24px;
	color: #333;
}

.amsotech-competition-tc-modal .close {
	color: #aaa;
	float: right;
	font-size: 32px;
	font-weight: 700;
	line-height: 20px;
	cursor: pointer;
	transition: color 0.2s;
}

.amsotech-competition-tc-modal .close:hover,
.amsotech-competition-tc-modal .close:focus {
	color: #000;
}

.amsotech-competition-tc-modal .tc-content {
	line-height: 1.8;
	color: #333;
}

.amsotech-competition-tc-modal .tc-content h3 {
	margin: 25px 0 15px 0;
	font-size: 18px;
	color: #2271b1;
}

.amsotech-competition-tc-modal .tc-content p {
	margin: 0 0 15px 0;
}

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

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

/* ================================================
   Progress Bar Widget
   ================================================ */

.amsotech-competition-progress-widget {
	margin: 30px 0;
	padding: 30px;
	background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
	border: 2px solid #bbdefb;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
	position: relative;
	overflow: hidden;
}

.amsotech-competition-progress-widget::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
	pointer-events: none;
}

.amsotech-competition-progress-widget h4 {
	margin: 0 0 20px 0;
	font-size: 20px;
	font-weight: 700;
	color: #1976d2;
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
	z-index: 1;
}

.amsotech-competition-progress-widget h4::before {
	content: '📊';
	font-size: 24px;
	display: inline-block;
	animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

/* Countdown Timer */
.progress-countdown {
	margin-bottom: 30px;
	position: relative;
	z-index: 1;
}

.countdown-timer {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
	position: relative;
	z-index: 1;
}

.countdown-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 15px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	min-width: 80px;
}

.countdown-value {
	font-size: 36px;
	font-weight: 700;
	color: #2271b1;
	line-height: 1;
}

.countdown-label {
	font-size: 12px;
	text-transform: uppercase;
	color: #666;
	margin-top: 5px;
}

/* Progress Bar */
.progress-bar-section {
	margin: 30px 0;
	position: relative;
	z-index: 1;
}

.progress-bar-wrapper {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
}

.progress-info {
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
	font-size: 14px;
	font-weight: 600;
}

.progress-bar {
	height: 40px;
	background: #e0e0e0;
	border-radius: 20px;
	overflow: hidden;
	position: relative;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #2271b1, #46b450);
	transition: width 0.5s ease;
	border-radius: 20px;
}

.progress-percentage {
	text-align: center;
	margin-top: 10px;
	font-size: 24px;
	font-weight: 700;
	color: #2271b1;
}

.entries-remaining {
	text-align: center;
	margin-top: 15px;
	padding: 10px;
	background: #fff3cd;
	border-radius: 4px;
	font-weight: 600;
}

.remaining-count {
	font-size: 20px;
	color: #856404;
}

/* ================================================
   Prize Cards
   ================================================ */

.prize-information {
	margin-top: 30px;
}

.prize-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
}

.prize-card {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prize-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.prize-position {
	font-size: 48px;
	font-weight: 700;
	color: #2271b1;
	min-width: 60px;
	text-align: center;
	line-height: 1;
}

.prize-content {
	flex: 1;
}

.prize-name {
	font-size: 14px;
	font-weight: 600;
	color: #666;
	margin-bottom: 5px;
}

.prize-value {
	font-size: 28px;
	font-weight: 700;
	color: #222;
	line-height: 1.3;
}

.prize-value .current-value {
	display: block;
	margin-bottom: 4px;
	color: #222;
}

.prize-value del {
	display: block;
	color: #999;
	font-size: 18px;
	opacity: 0.7;
	margin-top: 2px;
}

.prize-milestone {
	font-size: 12px;
	color: #666;
	margin-top: 10px;
	padding: 8px;
	background: #fff3cd;
	border-radius: 4px;
}

/* Milestone Progress (Exciting!) */
.prize-milestone-progress {
	margin-top: 15px;
	padding: 12px;
	background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
	border-radius: 8px;
	border: 2px solid #2271b1;
	box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
	animation: milestone-pulse 2s ease-in-out infinite;
	transition: opacity 0.4s ease-in-out;
	opacity: 0;
}

@keyframes milestone-pulse {
	0%, 100% { box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2); }
	50% { box-shadow: 0 4px 16px rgba(34, 113, 177, 0.4); }
}

.milestone-target {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.milestone-icon {
	font-size: 18px;
}

.milestone-text {
	font-size: 15px;
	font-weight: 700;
	color: #2271b1;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.milestone-bar {
	height: 8px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 4px;
	overflow: hidden;
	margin: 8px 0;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.milestone-fill {
	height: 100%;
	background: linear-gradient(90deg, #2271b1 0%, #0073aa 100%);
	border-radius: 4px;
	transition: width 0.5s ease-out;
	box-shadow: 0 0 8px rgba(34, 113, 177, 0.6);
	animation: milestone-shimmer 2s linear infinite;
}

@keyframes milestone-shimmer {
	0% { background-position: -100% 0; }
	100% { background-position: 100% 0; }
}

.milestone-countdown {
	font-size: 11px;
	font-weight: 600;
	color: #0073aa;
	text-align: right;
	margin-top: 4px;
}

/* Excitement when almost at milestone! */
.milestone-almost-there {
	animation: milestone-excitement 0.5s ease-in-out infinite alternate !important;
	border-color: #0073aa !important;
}

@keyframes milestone-excitement {
	0% {
		transform: scale(1);
		box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
	}
	100% {
		transform: scale(1.02);
		box-shadow: 0 6px 20px rgba(34, 113, 177, 0.6);
	}
}

.milestone-almost-there .milestone-icon {
	animation: milestone-celebrate 0.3s ease-in-out infinite !important;
}

@keyframes milestone-celebrate {
	0%, 100% { transform: rotate(-15deg) scale(1.1); }
	50% { transform: rotate(15deg) scale(1.2); }
}

.milestone-almost-there .milestone-text {
	color: #0073aa !important;
	font-size: 14px !important;
}

/* ================================================
   Winner Announcement
   ================================================ */

.amsotech-competition-winner-announcement {
	padding: 30px;
	margin: 30px 0;
	background: linear-gradient(135deg, #46b450 0%, #2271b1 100%);
	color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.amsotech-competition-winner-announcement h3 {
	margin: 0 0 20px 0;
	font-size: 28px;
	font-weight: 700;
}

.winner-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.winner-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	margin: 15px 0;
	background: rgba(255, 255, 255, 0.9);
	color: #333;
	border-radius: 8px;
}

.winner-prize {
	font-size: 18px;
	font-weight: 700;
	color: #2271b1;
}

.winner-name-line {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
}

.winner-name-line strong {
	font-size: 14px;
	color: #333;
	flex-shrink: 0;
}

.winner-name {
	font-size: 20px;
	font-weight: 700;
	color: #46b450;
}

.winner-location {
	font-size: 14px;
	color: #666;
	padding-left: 64px;
	font-weight: normal;
}

.prize-value {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.current-value {
	font-size: 24px;
	font-weight: 700;
	color: #46b450;
}

.starting-value {
	font-size: 16px;
	color: #999;
	margin-top: -2px;
}

.starting-value del {
	text-decoration: line-through;
	opacity: 0.7;
}

.winner-details {
	text-align: right;
}

.winner-value {
	font-size: 24px;
	font-weight: 700;
	color: #46b450;
}

.winner-stats {
	margin-top: 20px;
	padding: 20px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	text-align: center;
}

.winner-stats p {
	margin: 5px 0;
	font-size: 14px;
}

.entry-number-line,
.order-number-line {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
}

.entry-number-line strong,
.order-number-line strong {
	font-size: 14px;
	color: #333;
	width: 110px;
	flex-shrink: 0;
}

.entry-number-line .badge,
.order-ref {
	font-size: 14px;
	color: #666;
	font-weight: normal;
}

/* ================================================
   Loading States
   ================================================ */

.progress-loading {
	text-align: center;
	padding: 20px;
	color: #666;
}

.spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #2271b1;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ================================================
   Responsive Design
   ================================================ */

@media (max-width: 768px) {
	.amsotech-competition-entry-requirements {
		padding: 20px;
	}

	.requirement-label {
		padding: 8px;
	}

	.amsotech-competition-countdown-block {
		padding: 15px;
	}

	.countdown-timer {
		gap: 8px;
	}

	.countdown-item {
		min-width: 55px;
		padding: 8px;
	}

	.countdown-value {
		font-size: 24px;
	}

	.prize-cards {
		grid-template-columns: 1fr;
	}

	.prize-card {
		flex-direction: column;
		text-align: center;
	}

	.prize-content {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.prize-name,
	.prize-value {
		text-align: center;
	}

	.milestone-target {
		justify-content: center;
	}

	.milestone-countdown {
		text-align: center;
	}

	.winner-item {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}

	.winner-details {
		text-align: center;
	}

	.amsotech-competition-tc-modal .modal-content {
		width: 95%;
		padding: 20px;
		margin: 10% auto;
	}
}

@media (max-width: 480px) {
	.amsotech-competition-notice h3 {
		font-size: 16px;
	}

	.amsotech-competition-winner-announcement h3 {
		font-size: 22px;
	}

	.countdown-value {
		font-size: 20px;
	}

	.prize-position {
		font-size: 36px;
	}

	.prize-value {
		font-size: 22px;
	}
}

/* ================================================
   Dark Mode Support - DISABLED
   Keeping light mode for all competition elements
   ================================================ */

/* @media (prefers-color-scheme: dark) {
	.amsotech-competition-entry-requirements {
		background: #2a2a2a;
		border-color: #3a3a3a;
		color: #e0e0e0;
	}

	.amsotech-competition-entry-requirements h4 {
		color: #e0e0e0;
	}

	.requirement-label {
		color: #e0e0e0;
	}

	.requirement-label.required-checkbox {
		background: #1e1e1e;
		border-color: #3a3a3a;
	}

	.amsotech-competition-tc-modal .modal-content {
		background-color: #2a2a2a;
		color: #e0e0e0;
	}

	.amsotech-competition-tc-modal h2 {
		color: #e0e0e0;
	}

	.amsotech-competition-progress-widget {
		background: #2a2a2a;
		border-color: #3a3a3a;
		color: #e0e0e0;
	}

	.amsotech-competition-progress-widget h4 {
		color: #e0e0e0;
	}

	.countdown-item,
	.progress-bar-wrapper,
	.prize-card {
		background: #1e1e1e;
		color: #e0e0e0;
	}

	.winner-item {
		background: rgba(255, 255, 255, 0.1);
		color: #e0e0e0;
	}

	.prize-name {
		color: #b0b0b0;
	}

	.prize-value {
		color: #e0e0e0;
	}

	.prize-value .current-value {
		color: #e0e0e0;
	}

	.prize-value del {
		color: #666;
	}

	.countdown-label {
		color: #b0b0b0;
	}

	.progress-info {
		color: #e0e0e0;
	}

	.milestone-text {
		color: #6fb1e0;
	}

	.milestone-countdown {
		color: #6fb1e0;
	}

	.winner-prize {
		color: #6fb1e0;
	}

	.winner-name {
		color: #6ec776;
	}

	.winner-value {
		color: #6ec776;
	}

	.winner-info strong,
	.entry-info strong {
		color: #e0e0e0;
	}

	.draw-stats {
		color: #e0e0e0;
	}

	.amsotech-competition-countdown-block,
	.amsotech-competition-prizes-block {
		background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
		border-color: #3a3a3a;
		color: #e0e0e0;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	}

	.amsotech-competition-countdown-block h4,
	.amsotech-competition-prizes-block h4 {
		color: #ffffff;
	}

	.announcement-header h3 {
		color: #fff;
	}
} */

/* ================================================
   Competition Header Section (Top of Page)
   ================================================ */

.amsotech-competition-header-section {
	margin-bottom: 30px;
}

/* ================================================
   Shortcode Blocks
   ================================================ */

/* Countdown Block */
.amsotech-competition-countdown-block {
	margin: 20px 0;
	padding: 25px;
	background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
	border: 2px solid #bbdefb;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
	position: relative;
	overflow: hidden;
}

.amsotech-competition-countdown-block::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
	pointer-events: none;
}

.amsotech-competition-countdown-block h4 {
	margin: 0 0 20px 0;
	font-size: 20px;
	font-weight: 700;
	color: #1976d2;
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
	z-index: 1;
}

.amsotech-competition-countdown-block h4::before {
	content: '⏱️';
	font-size: 24px;
	display: inline-block;
	animation: countdown-pulse 2s ease-in-out infinite;
}

@keyframes countdown-pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

/* Closed Countdown */
.amsotech-competition-countdown-block.amsotech-competition-closed {
	background: #fff3cd;
	border-color: #ffb900;
}

.countdown-closed {
	text-align: center;
	padding: 20px 0;
}

.closed-message {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 15px 30px;
	background: #fff;
	border: 2px solid #ffb900;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.closed-icon {
	font-size: 32px;
	line-height: 1;
}

.closed-text {
	font-size: 28px;
	font-weight: 700;
	color: #856404;
	letter-spacing: 2px;
}

/* Prizes Block */
.amsotech-competition-prizes-block {
	margin: 20px 0;
	padding: 25px;
	background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
	border: 2px solid #bbdefb;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
	position: relative;
	overflow: hidden;
}

.amsotech-competition-prizes-block::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
	pointer-events: none;
}

.amsotech-competition-prizes-block h4 {
	margin: 0 0 20px 0;
	font-size: 20px;
	font-weight: 700;
	color: #1976d2;
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
	z-index: 1;
}

.amsotech-competition-prizes-block h4::before {
	content: '🏆';
	font-size: 24px;
	display: inline-block;
	animation: prize-pulse 2s ease-in-out infinite;
}

@keyframes prize-pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

.amsotech-competition-prizes-block .prize-cards {
	display: flex;
	flex-direction: column;
	gap: 15px;
	position: relative;
	z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.amsotech-competition-header-section {
		padding: 0 15px;
	}
}

/* ================================================
   Print Styles
   ================================================ */

@media print {
	.amsotech-competition-tc-modal .close,
	.view-tc-modal,
	.single_add_to_cart_button {
		display: none;
	}

	.amsotech-competition-tc-modal {
		position: static;
		background: none;
	}

	.amsotech-competition-tc-modal .modal-content {
		box-shadow: none;
		max-height: none;
	}
}
