/* SU Raffle System – Frontend Styles */

.su-raffle-wrap {
	max-width: 680px;
	margin: 0 auto 2em;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #333;
	line-height: 1.6;
}

.su-raffle-header-image {
	margin-bottom: 1.5em;
	border-radius: 12px;
	overflow: hidden;
	line-height: 0;
}
.su-raffle-header-image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	max-height: 280px;
}
.su-raffle-header {
	text-align: center;
	margin-bottom: 1.5em;
}
.su-raffle-header h2 {
	font-size: 1.6em;
	margin: 0 0 0.3em;
	color: #222;
}
.su-raffle-header p {
	color: #666;
	font-size: 1em;
	margin: 0;
}

/* Best Chance Box */
.su-raffle-best-chance {
	background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
	border: 2px solid #4caf50;
	border-radius: 10px;
	padding: 1em 1.2em;
	margin-bottom: 1.5em;
	position: relative;
}
.su-raffle-best-chance-badge {
	display: inline-block;
	background: #2e7d32;
	color: #fff;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.2em 0.6em;
	border-radius: 4px;
	margin-bottom: 0.4em;
}
.su-raffle-best-chance strong {
	color: #1b5e20;
}
.su-raffle-best-chance .su-raffle-best-chance-badge + strong {
	display: block;
	margin-top: 0.3em;
}
.su-raffle-checklist li.su-raffle-best {
	background: rgba(76, 175, 80, 0.08);
	border-radius: 4px;
	margin: 0 -0.5em;
	padding: 0.5em 0.5em 0.5em 0;
}
.su-raffle-action-count {
	color: #2e7d32;
	font-weight: 600;
	margin-left: 0.3em;
}
.su-raffle-best-tag {
	display: inline-block;
	background: #4caf50;
	color: #fff;
	font-size: 0.7em;
	font-weight: 600;
	padding: 0.15em 0.5em;
	border-radius: 10px;
	margin-left: 0.5em;
	vertical-align: middle;
}

/* Prize box */
.su-raffle-prize-box {
	display: flex;
	align-items: center;
	gap: 0.8em;
	background: linear-gradient(135deg, #fff7e6, #fff3d6);
	border: 1px solid #f0d68a;
	border-radius: 10px;
	padding: 1em 1.2em;
	margin-bottom: 1.5em;
}
.su-raffle-prize-icon {
	font-size: 2em;
	flex-shrink: 0;
}
.su-raffle-prize-info {
	font-size: 0.95em;
}

/* Success badge */
.su-raffle-success-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	background: #e8f5e9;
	color: #2e7d32;
	font-weight: 600;
	padding: 0.4em 1em;
	border-radius: 20px;
	font-size: 0.95em;
	margin-top: 0.5em;
}

/* Stats */
.su-raffle-stats-row {
	display: flex;
	justify-content: center;
	gap: 2em;
	margin: 1em 0;
}
.su-raffle-stat {
	text-align: center;
}
.su-raffle-stat-number {
	display: block;
	font-size: 2.2em;
	font-weight: 700;
	color: #c2185b;
	line-height: 1.1;
}
.su-raffle-stat-label {
	font-size: 0.85em;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Form */
.su-raffle-form {
	max-width: 440px;
	margin: 0 auto;
}
.su-raffle-field {
	margin-bottom: 1em;
}
.su-raffle-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin-bottom: 0.3em;
	color: #444;
}
.su-raffle-field input[type="email"],
.su-raffle-field input[type="text"] {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1em;
	box-sizing: border-box;
	transition: border-color 0.2s;
}
.su-raffle-field input:focus {
	border-color: #c2185b;
	outline: none;
	box-shadow: 0 0 0 2px rgba(194, 24, 91, 0.15);
}
.su-raffle-field-readonly input {
	background: #f5f5f5;
	color: #888;
}

.su-raffle-consent {
	font-size: 0.85em;
	color: #666;
}
.su-raffle-consent label {
	font-weight: 400;
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
}
.su-raffle-consent input[type="checkbox"] {
	margin-top: 0.2em;
	flex-shrink: 0;
}

/* Buttons */
.su-raffle-btn {
	display: inline-block;
	padding: 0.7em 1.8em;
	border: none;
	border-radius: 8px;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background 0.2s, transform 0.1s;
}
.su-raffle-btn-primary {
	background: #c2185b;
	color: #fff;
}
.su-raffle-btn-primary:hover,
.su-raffle-btn-primary:focus,
.su-raffle-btn-primary:visited {
	background: #ad1457;
	color: #fff;
	transform: translateY(-1px);
}

/* Error / Notice */
.su-raffle-error {
	background: #fce4ec;
	color: #b71c1c;
	padding: 0.8em 1em;
	border-radius: 6px;
	margin-bottom: 1em;
	font-size: 0.9em;
}
.su-raffle-notice {
	background: #f5f5f5;
	padding: 1.5em;
	border-radius: 8px;
	text-align: center;
	color: #666;
}
.su-raffle-notice a {
	color: #c2185b;
	font-weight: 600;
}
.su-raffle-ended {
	background: #fff3e0;
	color: #e65100;
}

/* Progress bar */
.su-raffle-actions-progress {
	margin: 1.5em 0;
}
.su-raffle-actions-progress h3 {
	font-size: 1.1em;
	margin: 0 0 0.8em;
}
.su-raffle-progress-bar {
	position: relative;
	background: #eee;
	border-radius: 20px;
	height: 28px;
	overflow: hidden;
	margin-bottom: 1em;
}
.su-raffle-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #c2185b, #e91e63);
	border-radius: 20px;
	transition: width 0.6s ease;
	min-width: 2px;
}
.su-raffle-progress-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 0.8em;
	font-weight: 700;
	color: #333;
}

/* Checklist */
.su-raffle-checklist {
	list-style: none;
	padding: 0;
	margin: 0;
}
.su-raffle-checklist li {
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.5em 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.95em;
}
.su-raffle-checklist li:last-child {
	border-bottom: none;
}
.su-raffle-check {
	font-size: 1.1em;
	width: 1.4em;
	text-align: center;
	flex-shrink: 0;
}
.su-raffle-done .su-raffle-check {
	color: #2e7d32;
}
.su-raffle-open .su-raffle-check {
	color: #bbb;
}
.su-raffle-open {
	color: #999;
}

/* Table */
.su-raffle-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
	margin-top: 0.5em;
}
.su-raffle-table th {
	background: #f8f8f8;
	text-align: left;
	padding: 0.6em 0.8em;
	font-weight: 600;
	color: #555;
	border-bottom: 2px solid #eee;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.su-raffle-table td {
	padding: 0.6em 0.8em;
	border-bottom: 1px solid #f0f0f0;
}
.su-raffle-table code {
	background: #f5f5f5;
	padding: 0.15em 0.4em;
	border-radius: 4px;
	font-size: 0.9em;
	font-weight: 600;
	color: #c2185b;
}
.su-raffle-ticket-invalidated td {
	opacity: 0.5;
	text-decoration: line-through;
}

/* Badges */
.su-raffle-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 10px;
	font-size: 0.8em;
	font-weight: 600;
}
.su-raffle-badge-valid {
	background: #e8f5e9;
	color: #2e7d32;
}
.su-raffle-badge-won {
	background: #fff3e0;
	color: #e65100;
}
.su-raffle-badge-invalid {
	background: #f5f5f5;
	color: #999;
}

/* Countdown */
.su-raffle-countdown {
	text-align: center;
	padding: 1em;
	margin-top: 1.5em;
	background: #fce4ec;
	border-radius: 8px;
	font-size: 0.95em;
	color: #c2185b;
}
.su-raffle-countdown-timer {
	font-weight: 700;
	font-size: 1.2em;
}

/* Teaser */
.su-raffle-teaser {
	margin: 1.5em 0;
}
.su-raffle-teaser-inner {
	display: flex;
	align-items: center;
	gap: 1em;
	background: linear-gradient(135deg, #fce4ec, #f8bbd0);
	border-radius: 12px;
	padding: 1.2em 1.5em;
}
.su-raffle-teaser-image {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 10px;
	overflow: hidden;
}
.su-raffle-teaser-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.su-raffle-teaser-icon {
	font-size: 2em;
	flex-shrink: 0;
}
.su-raffle-teaser-text {
	flex: 1;
}
.su-raffle-teaser-text strong {
	display: block;
	font-size: 1.05em;
	color: #880e4f;
}
.su-raffle-teaser-text p {
	margin: 0.2em 0 0;
	font-size: 0.9em;
	color: #ad1457;
}
.su-raffle-teaser-best {
	color: #2e7d32 !important;
	font-weight: 600;
	font-size: 0.85em !important;
	margin-top: 0.3em !important;
}
.su-raffle-teaser-banner .su-raffle-teaser-inner {
	border-radius: 0;
	padding: 0.8em 1.5em;
}
.su-raffle-teaser-inline .su-raffle-teaser-inner {
	background: transparent;
	border: 2px solid #f48fb1;
	padding: 0.8em 1em;
}

/* Login required */
.su-raffle-login-required {
	text-align: center;
	padding: 1.5em;
	background: #f5f5f5;
	border-radius: 8px;
}
.su-raffle-login-required p {
	margin: 0 0 1em;
	color: #666;
}

.su-raffle-empty {
	text-align: center;
	color: #999;
	padding: 2em;
}

/* Popup */
.su-raffle-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.su-raffle-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
.su-raffle-popup-content {
	position: relative;
	background: #fff;
	border-radius: 16px;
	padding: 2.5em 2em;
	max-width: 420px;
	width: 90%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: suRafflePopupIn 0.3s ease;
}
@keyframes suRafflePopupIn {
	from { opacity: 0; transform: scale(0.9) translateY(20px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}
.su-raffle-popup-close {
	position: absolute;
	top: 0.5em;
	right: 0.8em;
	background: none;
	border: none;
	font-size: 1.6em;
	color: #999;
	cursor: pointer;
	line-height: 1;
	padding: 0.2em;
}
.su-raffle-popup-close:hover {
	color: #333;
}
.su-raffle-popup-image {
	margin: -2.5em -2em 1em -2em;
	border-radius: 16px 16px 0 0;
	overflow: hidden;
	line-height: 0;
}
.su-raffle-popup-image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	max-height: 180px;
}
.su-raffle-popup-icon {
	font-size: 3em;
	display: block;
	margin-bottom: 0.3em;
}
.su-raffle-popup-content h3 {
	font-size: 1.3em;
	margin: 0 0 0.4em;
	color: #222;
}
.su-raffle-popup-content p {
	color: #666;
	margin: 0 0 1em;
	font-size: 0.95em;
}
.su-raffle-popup-best {
	color: #2e7d32 !important;
	font-size: 0.9em !important;
	margin: -0.5em 0 1em !important;
}
.su-raffle-popup-prize {
	background: #fff7e6;
	border: 1px solid #f0d68a;
	border-radius: 8px;
	padding: 0.6em 1em;
	margin-bottom: 1.2em;
	color: #bf360c;
	font-size: 1.1em;
}

/* Responsive */
@media (max-width: 600px) {
	.su-raffle-teaser-inner {
		flex-direction: column;
		text-align: center;
	}
	.su-raffle-progress-bar {
		height: auto;
		min-height: 28px;
		overflow: visible;
	}
	.su-raffle-progress-text {
		position: relative;
		top: auto;
		left: auto;
		transform: none;
		display: block;
		padding: 0.4em 0.6em;
		font-size: 0.75em;
		white-space: nowrap;
	}
	.su-raffle-table {
		font-size: 0.8em;
	}
	.su-raffle-table th:nth-child(3),
	.su-raffle-table td:nth-child(3) {
		display: none;
	}
	.su-raffle-popup-content {
		padding: 2em 1.5em;
	}
}
