/**
 * Raffle for WooCommerce - Frontend Styles
 *
 * @package RaffleForWooCommerce
 * @since   1.0.0
 */

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.rfwc-hidden {
	display: none;
}

/* ==========================================================================
   Countdown Timer
   ========================================================================== */

.rfwc-countdown-wrapper {
	margin: 1.5em 0;
	text-align: center;
}

.rfwc-countdown-label {
	margin: 0 0 0.75em;
	font-size: 0.9em;
	font-weight: 600;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.rfwc-countdown {
	display: inline-flex;
	gap: 10px;
}

.rfwc-countdown-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 60px;
	padding: 12px 8px 10px;
	background: linear-gradient(180deg, #7f54b3 0%, #6b4299 100%);
	border-radius: 8px;
	box-shadow: 0 3px 10px rgba(127, 84, 179, 0.3);
}

.rfwc-countdown-value {
	font-size: 1.75em;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rfwc-countdown-unit {
	margin-top: 4px;
	font-size: 0.7em;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.rfwc-countdown-ended {
	padding: 1em 1.5em;
	background: #f0f0f0;
	border-radius: 8px;
	font-size: 1em;
	font-weight: 600;
	color: #666;
}

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

.rfwc-progress-wrapper {
	margin: 1.5em 0;
}

.rfwc-progress {
	max-width: 100%;
}

.rfwc-progress-bar {
	height: 12px;
	background: #e8e8e8;
	border-radius: 6px;
	overflow: hidden;
}

.rfwc-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #7f54b3 0%, #9b6bc9 100%);
	border-radius: 6px;
	min-width: 4px;
	transition: width 0.5s ease;
}

.rfwc-progress-text {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5em;
	font-size: 0.9em;
	color: #666;
}

.rfwc-progress-text strong {
	color: #333;
}

/* ==========================================================================
   Tickets Information
   ========================================================================== */

.rfwc-tickets-info {
	margin: 1em 0;
	font-size: 0.95em;
	color: #666;
}

.rfwc-tickets-info strong {
	color: #333;
}

/* ==========================================================================
   Prize Information
   ========================================================================== */

.rfwc-prize-info {
	margin: 1.5em 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
}

.rfwc-prize-info p {
	margin: 0 0 0.5em;
	font-size: 0.95em;
}

.rfwc-prize-info p:last-child {
	margin-bottom: 0;
}

.rfwc-prize-label {
	font-weight: 600;
	color: #333;
}

/* Prize Item - Used for custom and store credit types */
.rfwc-prize-item {
	display: block;
	padding: 1em 1.25em;
	margin-bottom: 0.75em;
	background: linear-gradient(135deg, #f9f5ff 0%, #f3eaff 100%);
	border: 1px solid rgba(127, 84, 179, 0.2);
	border-left: 4px solid #7f54b3;
	border-radius: 0 8px 8px 0;
}

.rfwc-prize-item:last-child {
	margin-bottom: 0;
}

.rfwc-prize-item-header {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 1em;
	margin-bottom: 0.5em;
}

.rfwc-prize-item .rfwc-prize-tier {
	display: inline-block !important;
	margin: 0 !important;
	padding: 0.25em 0.6em;
	background: #7f54b3;
	color: #fff !important;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 4px;
}

.rfwc-prize-item-value {
	font-weight: 700;
	color: #5a3d82;
	font-size: 1.25em;
	white-space: nowrap;
}

.rfwc-prize-item-value .woocommerce-Price-amount {
	color: inherit;
}

.rfwc-prize-item-description {
	margin: 0;
	padding: 0;
	font-size: 0.95em;
	color: #444;
	line-height: 1.5;
}

/* Prize Product - Used for product prize type */
.rfwc-prize-product {
	display: block;
	padding: 1em 1.25em;
	margin-bottom: 0.75em;
	background: linear-gradient(135deg, #f9f5ff 0%, #f3eaff 100%);
	border: 1px solid rgba(127, 84, 179, 0.2);
	border-left: 4px solid #7f54b3;
	border-radius: 0 8px 8px 0;
}

.rfwc-prize-product:last-child {
	margin-bottom: 0;
}

.rfwc-prize-product .rfwc-prize-tier {
	display: inline-block !important;
	margin: 0 0 0.75em 0 !important;
	padding: 0.25em 0.6em;
	background: #7f54b3;
	color: #fff !important;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 4px;
}

.rfwc-prize-product-details {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	gap: 1em;
	-webkit-box-align: start;
	-ms-flex-align: start;
	align-items: flex-start;
}

.rfwc-prize-product-image {
	-ms-flex-negative: 0;
	flex-shrink: 0;
}

.rfwc-prize-product-image img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e5e5e5;
}

.rfwc-prize-product-info {
	-webkit-box-flex: 1;
	-ms-flex: 1;
	flex: 1;
}

.rfwc-prize-product-name {
	display: block;
	font-weight: 600;
	font-size: 1em;
	color: #333;
	text-decoration: none;
}

.rfwc-prize-product-name:hover {
	color: #7f54b3;
}

.rfwc-prize-product-value {
	display: block;
	margin-top: 0.35em;
	font-size: 0.95em;
	font-weight: 600;
	color: #5a3d82;
}

.rfwc-prize-description {
	margin-top: 0.5em;
	font-size: 0.9em;
	color: #666;
}

/* ==========================================================================
   Raffle Status Notices
   ========================================================================== */

.rfwc-raffle-notice {
	margin: 1.5em 0;
	padding: 1em 1.25em;
	border-radius: 6px;
	font-size: 0.95em;
}

.rfwc-raffle-notice p {
	margin: 0;
}

.rfwc-raffle-notice.rfwc-notice-not-started {
	background: #fff8e5;
	border-left: 4px solid #ffba00;
	color: #6d5000;
}

.rfwc-raffle-notice.rfwc-notice-ended {
	background: #fbeaea;
	border-left: 4px solid #dc3232;
	color: #8b1c1c;
}

.rfwc-raffle-notice.rfwc-notice-sold-out {
	background: #e5f5fa;
	border-left: 4px solid #00a0d2;
	color: #005177;
}

.rfwc-max-tickets-notice {
	display: block;
	margin-top: 1em;
	font-size: 0.85em;
	color: #666;
}

/* ==========================================================================
   My Account - My Tickets
   ========================================================================== */

.rfwc-ticket-number {
	display: inline-block;
	padding: 0.35em 0.6em;
	background: #f0f0f0;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.95em;
	color: #333;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

.rfwc-ticket-type {
	display: block;
	margin-top: 0.4em;
	font-size: 0.85em;
	color: #7f54b3;
}

/* ==========================================================================
   Gift Checkout Fields
   ========================================================================== */

.rfwc-gift-checkout {
	margin: 1.5em 0;
	padding: 1em;
	background: #f9f5ff;
	border: 1px solid #e8deff;
	border-radius: 6px;
}

.rfwc-gift-checkout h3 {
	margin: 0 0 1em;
	font-size: 1.1em;
	color: #333;
}

.rfwc-gift-checkbox {
	margin-bottom: 0.5em;
}

.rfwc-gift-checkbox label {
	display: flex;
	align-items: center;
	gap: 0.5em;
	cursor: pointer;
}

.rfwc-gift-fields {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid #e8deff;
}

.rfwc-gift-fields .form-row {
	margin-bottom: 1em;
}

.rfwc-gift-email-note {
	margin-top: 0.5em;
	font-size: 0.85em;
	color: #666;
	font-style: italic;
}

/* ==========================================================================
   Gift Details on Order View
   ========================================================================== */

.rfwc-gift-details {
	margin: 2em 0;
}

.rfwc-gift-details h2 {
	margin-bottom: 1em;
}

.rfwc-gift-details .gift_details {
	margin-bottom: 1em;
}

.rfwc-gift-details .gift_details th {
	width: 30%;
	text-align: left;
}

.rfwc-gift-note {
	color: #666;
	font-size: 0.9em;
}

/* ==========================================================================
   Order Item Ticket Display
   ========================================================================== */

.rfwc-order-tickets {
	margin-top: 0.5em;
	padding: 0.5em 0;
	font-size: 0.9em;
	color: #666;
}

.rfwc-order-tickets strong {
	color: #333;
}

/* ==========================================================================
   Winners Display
   ========================================================================== */

.rfwc-winners-section {
	margin: 1.5em 0;
}

.rfwc-winners-section h3 {
	margin: 0 0 1em;
	font-size: 1.1em;
	color: #333;
}

.rfwc-winners-announcement {
	background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
	border: 2px solid #fbbf24;
	border-radius: 8px;
	padding: 1.5em;
}

.rfwc-winners-header {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin-bottom: 1em;
	padding-bottom: 1em;
	border-bottom: 1px solid #fbbf24;
}

.rfwc-trophy-icon {
	font-size: 2em;
}

.rfwc-winners-title {
	font-size: 1.2em;
	font-weight: 600;
	color: #92400e;
}

.rfwc-winners-list {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

.rfwc-winner-item {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 0.75em 1em;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 6px;
}

.rfwc-winner-tier {
	flex-shrink: 0;
}

.rfwc-medal {
	font-size: 1.5em;
}

.rfwc-tier-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #d97706;
	color: #fff;
	border-radius: 50%;
	font-size: 0.85em;
	font-weight: 600;
}

.rfwc-winner-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.2em;
}

.rfwc-winner-name {
	font-weight: 600;
	color: #333;
}

.rfwc-winner-ticket {
	font-size: 0.85em;
	color: #666;
	font-family: monospace;
}

.rfwc-winner-claimed {
	color: #16a34a;
	font-size: 1.2em;
}

.rfwc-draw-date {
	margin: 1em 0 0;
	font-size: 0.85em;
	color: #92400e;
	text-align: center;
}

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

@media screen and (max-width: 480px) {
	.rfwc-countdown {
		gap: 6px;
	}

	.rfwc-countdown-item {
		min-width: 50px;
		padding: 10px 6px 8px;
	}

	.rfwc-countdown-value {
		font-size: 1.4em;
	}

	.rfwc-countdown-unit {
		font-size: 0.6em;
	}

	.rfwc-winners-header {
		flex-direction: column;
		text-align: center;
	}

	.rfwc-winner-item {
		flex-wrap: wrap;
	}
}
