/*
 * Simple Donate — Frontend Styles
 * Theme variables are injected inline via PHP (class-sd-public.php).
 * All values reference CSS custom properties set in :root.
 */

/* ============================================================
   CSS CUSTOM PROPERTIES — defaults (dark-gaming theme)
   ============================================================ */
:root {
	--sd-bg:           #0f0f23;
	--sd-card-bg:      #1a1a3e;
	--sd-primary:      #8B5CF6;
	--sd-secondary:    #06B6D4;
	--sd-text:         #ffffff;
	--sd-text-muted:   #94a3b8;
	--sd-button-bg:    linear-gradient(135deg, #8B5CF6, #06B6D4);
	--sd-button-text:  #ffffff;
	--sd-border:       rgba(139, 92, 246, 0.3);
	--sd-input-bg:     #0f0f23;
	--sd-progress-bg:  rgba(255, 255, 255, 0.1);
	--sd-font:         'Inter', sans-serif;
	--sd-radius:       16px;
	--sd-card-radius:  12px;
}

/* ============================================================
   TRIGGER BUTTON
   ============================================================ */
.sd-widget {
	display: inline-block;
}

.sd-trigger-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--sd-button-bg);
	color: var(--sd-button-text);
	border: none;
	border-radius: var(--sd-radius);
	padding: 14px 32px;
	font-family: var(--sd-font);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	letter-spacing: 0.02em;
}
.sd-trigger-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.1);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.sd-trigger-btn:active {
	transform: translateY(0);
}

/* ============================================================
   INLINE PANEL  ([simple_donate_full])
   ============================================================ */
.sd-inline-wrap {
	background: var(--sd-bg);
	color: var(--sd-text);
	font-family: var(--sd-font);
	border-radius: var(--sd-radius);
	border: 1px solid var(--sd-border);
	padding: 28px 24px 24px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
	max-width: 600px;
	margin: 0 auto;
	position: relative;
}

/* Hero inside inline panel sits flush at the top */
.sd-hero-media--inline {
	margin: -28px -24px 20px;
	border-radius: var(--sd-radius) var(--sd-radius) 0 0;
	overflow: hidden;
}

/* Shoutout wall in inline mode: no border-top gap, shows below the form */
.sd-shoutout-wall--inline {
	margin-top: 28px;
	border-top: 1px solid var(--sd-border);
	padding-top: 20px;
}
.sd-shoutout-wall--inline .sd-shoutout-feed {
	max-height: 400px;
}

/* "Donate again" button after success */
.sd-inline-wrap .sd-close-success {
	background: var(--sd-card-bg);
	border: 1px solid var(--sd-border);
	border-radius: var(--sd-card-radius);
	color: var(--sd-text);
	font-family: var(--sd-font);
	font-size: 14px;
	padding: 10px 24px;
	cursor: pointer;
	transition: background 0.15s;
}
.sd-inline-wrap .sd-close-success:hover {
	background: var(--sd-primary);
	color: #fff;
	border-color: var(--sd-primary);
}

/* ============================================================
   OVERLAY & MODAL
   ============================================================ */
.sd-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: sd-fade-in 0.2s ease;
}
.sd-overlay[hidden] {
	display: none;
}

.sd-modal {
	background: var(--sd-bg);
	color: var(--sd-text);
	font-family: var(--sd-font);
	border-radius: var(--sd-radius);
	border: 1px solid var(--sd-border);
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	position: relative;
	padding: 28px 24px 24px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
	animation: sd-slide-up 0.25s ease;
	scrollbar-width: thin;
	scrollbar-color: var(--sd-border) transparent;
}
.sd-modal::-webkit-scrollbar { width: 4px; }
.sd-modal::-webkit-scrollbar-track { background: transparent; }
.sd-modal::-webkit-scrollbar-thumb { background: var(--sd-border); border-radius: 4px; }

/* ============================================================
   CLOSE BUTTON
   ============================================================ */
.sd-close-btn {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 32px;
	height: 32px;
	background: var(--sd-card-bg);
	border: 1px solid var(--sd-border);
	border-radius: 50%;
	color: var(--sd-text-muted);
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: background 0.15s, color 0.15s;
	z-index: 2;
}
.sd-close-btn:hover { background: var(--sd-primary); color: #fff; }

/* ============================================================
   HERO MEDIA
   ============================================================ */
.sd-hero-media {
	margin: -28px -24px 20px;
	border-radius: var(--sd-radius) var(--sd-radius) 0 0;
	overflow: hidden;
	max-height: 200px;
}
.sd-hero-media img,
.sd-hero-media video {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}
.sd-hero-media iframe {
	width: 100%;
	height: 200px;
	border: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.sd-header { margin-bottom: 20px; }
.sd-title {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 6px;
	color: var(--sd-text);
	line-height: 1.2;
}
.sd-subtitle {
	font-size: 14px;
	color: var(--sd-text-muted);
	margin: 0;
}

/* ============================================================
   GOAL PROGRESS BAR
   ============================================================ */
.sd-goal-bar { margin-bottom: 20px; }
.sd-goal-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--sd-text-muted);
	margin-bottom: 6px;
}
.sd-goal-pct { font-weight: 700; color: var(--sd-secondary); }
.sd-progress-track {
	height: 8px;
	background: var(--sd-progress-bg);
	border-radius: 100px;
	overflow: hidden;
}
.sd-progress-fill {
	height: 100%;
	background: var(--sd-button-bg);
	border-radius: 100px;
	transition: width 1s ease;
}
.sd-goal-amounts {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--sd-text-muted);
	margin-top: 4px;
}

/* ============================================================
   TABS (One-Off / Monthly)
   ============================================================ */
.sd-tabs {
	display: flex;
	background: var(--sd-card-bg);
	border-radius: 100px;
	padding: 3px;
	gap: 3px;
	margin-bottom: 20px;
	border: 1px solid var(--sd-border);
}
.sd-tab {
	flex: 1;
	background: transparent;
	border: none;
	border-radius: 100px;
	color: var(--sd-text-muted);
	font-family: var(--sd-font);
	font-size: 14px;
	font-weight: 600;
	padding: 8px 16px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.sd-tab-active,
.sd-tab:hover {
	background: var(--sd-primary);
	color: #fff;
}

/* ============================================================
   TIER CARDS — horizontal scrollable with arrows
   ============================================================ */
.sd-tiers-outer {
	position: relative;
	margin-bottom: 16px;
	/* Arrows sit outside the clipped scroll area, so we need them visible */
}

.sd-tiers-scroll-wrapper {
	overflow-x: auto;
	overflow-y: hidden;
	/* Horizontal padding reserves space for arrows so first/last card isn't hidden behind them */
	padding: 8px 40px 12px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
}
.sd-tiers-scroll-wrapper::-webkit-scrollbar { display: none; }
.sd-tiers-scroll-wrapper.dragging { cursor: grabbing; }

.sd-tiers-track {
	display: flex;
	gap: 12px;
	width: max-content;
}

/* Scroll arrows — positioned over the padding zone so cards never overlap them */
.sd-scroll-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--sd-card-bg);
	border: 1px solid var(--sd-border);
	color: var(--sd-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
	transition: background 0.15s, opacity 0.2s, transform 0.15s;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	padding: 0;
}
.sd-scroll-arrow:hover {
	background: var(--sd-primary);
	border-color: var(--sd-primary);
	color: #fff;
	transform: translateY(-50%) scale(1.1);
}
.sd-scroll-arrow--left  { left: 4px; }
.sd-scroll-arrow--right { right: 4px; }
.sd-scroll-arrow[hidden] { display: none; }

.sd-tier-card {
	background: var(--sd-card-bg);
	border: 2px solid var(--sd-border);
	border-radius: var(--sd-card-radius);
	padding: 18px 14px;
	min-width: 120px;
	width: 120px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: var(--sd-text);
	font-family: var(--sd-font);
	scroll-snap-align: start;
}
.sd-tier-card:hover {
	border-color: var(--sd-primary);
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.sd-tier-card.sd-tier-selected {
	border-color: var(--sd-primary);
	background: var(--sd-primary);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
}
.sd-tier-emoji  { font-size: 28px; line-height: 1; }
.sd-tier-label  { font-size: 13px; font-weight: 600; color: inherit; }
.sd-tier-amount { font-size: 18px; font-weight: 800; color: inherit; }

/* ============================================================
   CUSTOM AMOUNT INPUT
   ============================================================ */
.sd-custom-amount-row {
	display: flex;
	align-items: center;
	background: var(--sd-input-bg);
	border: 1px solid var(--sd-border);
	border-radius: calc(var(--sd-card-radius) - 2px);
	padding: 10px 14px;
	margin-bottom: 16px;
	gap: 6px;
	transition: border-color 0.2s;
}
.sd-custom-amount-row:focus-within { border-color: var(--sd-primary); }
.sd-currency-symbol { color: var(--sd-text-muted); font-weight: 700; font-size: 15px; }
.sd-custom-amount-input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: var(--sd-text);
	font-family: var(--sd-font);
	font-size: 16px;
	font-weight: 700;
}
.sd-custom-amount-input::placeholder { color: var(--sd-text-muted); font-weight: 400; }

/* ============================================================
   DONOR INFO FIELDS — name & email side by side
   ============================================================ */
.sd-donor-info {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 16px;
}
.sd-input-field {
	background: var(--sd-input-bg);
	border: 1px solid var(--sd-border);
	border-radius: calc(var(--sd-card-radius) - 2px);
	color: var(--sd-text);
	font-family: var(--sd-font);
	font-size: 14px;
	padding: 10px 14px;
	outline: none;
	transition: border-color 0.2s;
	width: 100%;
	box-sizing: border-box;
}
.sd-input-field:focus { border-color: var(--sd-primary); }
.sd-input-field::placeholder { color: var(--sd-text-muted); }

/* ============================================================
   SHOUTOUT SECTION (below form, above wall)
   ============================================================ */
.sd-shoutout-section { margin-bottom: 16px; }

.sd-shoutout-input-wrap {
	position: relative;
}
.sd-shoutout-input {
	width: 100%;
	background: var(--sd-input-bg);
	border: 1px solid var(--sd-border);
	border-radius: calc(var(--sd-card-radius) - 2px);
	color: var(--sd-text);
	font-family: var(--sd-font);
	font-size: 14px;
	padding: 10px 70px 10px 14px;
	resize: none;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.2s;
}
.sd-shoutout-input:focus { border-color: var(--sd-primary); }
.sd-shoutout-input::placeholder { color: var(--sd-text-muted); }

.sd-char-count {
	position: absolute;
	bottom: 8px;
	right: 44px;
	font-size: 11px;
	color: var(--sd-text-muted);
}
.sd-gif-btn {
	position: absolute;
	bottom: 7px;
	right: 10px;
	background: var(--sd-card-bg);
	border: 1px solid var(--sd-border);
	border-radius: 6px;
	color: var(--sd-primary);
	font-size: 11px;
	font-weight: 800;
	padding: 3px 6px;
	cursor: pointer;
	font-family: var(--sd-font);
	transition: background 0.15s, border-color 0.15s;
}
.sd-gif-btn:hover { background: var(--sd-primary); color: #fff; border-color: var(--sd-primary); }

/* GIF Preview */
.sd-gif-preview {
	position: relative;
	display: inline-block;
	margin-top: 8px;
}
.sd-gif-preview[hidden] { display: none; }
.sd-gif-preview-img {
	max-height: 120px;
	border-radius: 8px;
	display: block;
}
.sd-gif-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* GIF Picker */
.sd-gif-picker {
	background: var(--sd-card-bg);
	border: 1px solid var(--sd-border);
	border-radius: var(--sd-card-radius);
	padding: 12px;
	margin-top: 8px;
}
.sd-gif-picker[hidden] { display: none; }
.sd-gif-search-bar { margin-bottom: 10px; }
.sd-gif-search {
	width: 100%;
	background: var(--sd-input-bg);
	border: 1px solid var(--sd-border);
	border-radius: 8px;
	color: var(--sd-text);
	font-family: var(--sd-font);
	font-size: 13px;
	padding: 8px 12px;
	outline: none;
	box-sizing: border-box;
}
.sd-gif-search:focus { border-color: var(--sd-primary); }
.sd-gif-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	max-height: 200px;
	overflow-y: auto;
}
.sd-gif-item {
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 1;
	background: var(--sd-input-bg);
}
.sd-gif-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-gif-item:hover { opacity: 0.85; }
.sd-gif-loader { font-size: 12px; color: var(--sd-text-muted); text-align: center; padding: 12px; }

/* ============================================================
   OPTIONS ROW — Cover fees | Anonymous | Monthly
   ============================================================ */
.sd-options-row {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.sd-option-pill {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
	padding: 9px 10px;
	border-radius: 100px;
	border: 1px solid var(--sd-border);
	background: var(--sd-card-bg);
	cursor: pointer;
	font-family: var(--sd-font);
	font-size: 12px;
	font-weight: 600;
	color: var(--sd-text-muted);
	transition: border-color 0.2s, background 0.2s, color 0.2s;
	user-select: none;
	text-align: center;
	line-height: 1.3;
}
.sd-option-pill:hover {
	border-color: var(--sd-primary);
	color: var(--sd-text);
}
.sd-option-pill input[type="checkbox"] {
	display: none; /* hidden — the pill itself is the visual indicator */
}

/* Active states */
.sd-option-pill.sd-pill-active,
.sd-option-pill:has(input:checked) {
	border-color: var(--sd-primary);
	background: color-mix(in srgb, var(--sd-primary) 18%, transparent);
	color: var(--sd-text);
}

/* Monthly pill gets the secondary colour when active — makes it stand out */
.sd-monthly-pill.sd-pill-active,
.sd-monthly-pill:has(input:checked) {
	border-color: var(--sd-secondary);
	background: color-mix(in srgb, var(--sd-secondary) 18%, transparent);
	color: var(--sd-text);
}

/* ============================================================
   AMOUNT DISPLAY
   ============================================================ */
.sd-amount-display {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--sd-card-bg);
	border: 1px solid var(--sd-border);
	border-radius: calc(var(--sd-card-radius) - 2px);
	padding: 10px 16px;
	margin-bottom: 14px;
	font-size: 14px;
}
.sd-amount-display[hidden] { display: none; }
.sd-amount-display-label { color: var(--sd-text-muted); }
.sd-amount-display-value { font-weight: 800; font-size: 18px; color: var(--sd-text); }

/* ============================================================
   STRIPE PAYMENT ELEMENT
   ============================================================ */
.sd-payment-element {
	margin-bottom: 16px;
}
.sd-payment-element[hidden] { display: none; }

/* ============================================================
   ERROR MESSAGE
   ============================================================ */
.sd-error-msg {
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.4);
	border-radius: 8px;
	color: #fca5a5;
	font-size: 13px;
	padding: 10px 14px;
	margin-bottom: 14px;
}
.sd-error-msg[hidden] { display: none; }

/* ============================================================
   CTA BUTTON
   ============================================================ */
.sd-cta-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	background: var(--sd-button-bg);
	color: var(--sd-button-text);
	border: none;
	border-radius: var(--sd-card-radius);
	padding: 16px 24px;
	font-family: var(--sd-font);
	font-size: 17px;
	font-weight: 800;
	cursor: pointer;
	transition: transform 0.15s, filter 0.15s, box-shadow 0.2s;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
	letter-spacing: 0.01em;
	position: relative;
	overflow: hidden;
}
.sd-cta-btn::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.15);
	transform: translateX(-100%);
	transition: transform 0.4s ease;
}
.sd-cta-btn:hover::before { transform: translateX(100%); }
.sd-cta-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.sd-cta-btn:active { transform: translateY(0); }
.sd-cta-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}
.sd-cta-spinner[hidden] { display: none; }

.sd-secure-note {
	text-align: center;
	font-size: 11px;
	color: var(--sd-text-muted);
	margin: 10px 0 0;
}

/* ============================================================
   SUCCESS SCREEN
   ============================================================ */
.sd-success-screen {
	text-align: center;
	padding: 40px 20px;
}
.sd-success-screen[hidden] { display: none; }
.sd-success-icon { font-size: 56px; margin-bottom: 16px; animation: sd-bounce 0.6s ease; }
.sd-success-screen h3 { font-size: 24px; color: var(--sd-text); margin: 0 0 8px; }
.sd-success-screen p { color: var(--sd-text-muted); font-size: 15px; margin: 0 0 20px; }
.sd-close-success {
	background: var(--sd-card-bg);
	border: 1px solid var(--sd-border);
	border-radius: var(--sd-card-radius);
	color: var(--sd-text);
	font-family: var(--sd-font);
	font-size: 14px;
	padding: 10px 24px;
	cursor: pointer;
	transition: background 0.15s;
}
.sd-close-success:hover { background: var(--sd-primary); color: #fff; border-color: var(--sd-primary); }

/* ============================================================
   LIVE BADGE
   ============================================================ */
.sd-live-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: var(--sd-secondary);
	margin-bottom: 10px;
	text-transform: uppercase;
}
.sd-live-dot-anim {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--sd-secondary);
	animation: sd-live-pulse 1.4s ease-in-out infinite;
}
@keyframes sd-live-pulse {
	0%, 100% { opacity: 1;   transform: scale(1);    }
	50%       { opacity: 0.4; transform: scale(0.75); }
}

/* Shoutout entrance — slides in from above */
@keyframes sd-shoutout-enter {
	from { opacity: 0; transform: translateY(-14px); }
	to   { opacity: 1; transform: translateY(0); }
}
/* Shoutout exit — fades and shrinks downward */
@keyframes sd-shoutout-leave {
	0%   { opacity: 1; max-height: 120px; margin-bottom: 10px; }
	100% { opacity: 0; max-height: 0;     margin-bottom: 0; }
}
.sd-shoutout-entering {
	animation: sd-shoutout-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.sd-shoutout-leaving {
	animation: sd-shoutout-leave 0.38s ease forwards;
	overflow: hidden;
	pointer-events: none;
}

/* ============================================================
   SHOUTOUT WALL
   ============================================================ */
.sd-shoutout-wall {
	margin-top: 24px;
	border-top: 1px solid var(--sd-border);
	padding-top: 16px;
}
.sd-shoutout-feed {
	max-height: 280px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scrollbar-width: thin;
	scrollbar-color: var(--sd-border) transparent;
}
.sd-shoutout-feed::-webkit-scrollbar { width: 3px; }
.sd-shoutout-feed::-webkit-scrollbar-track { background: transparent; }
.sd-shoutout-feed::-webkit-scrollbar-thumb { background: var(--sd-border); border-radius: 3px; }

.sd-shoutout-item {
	display: flex;
	gap: 10px;
	animation: sd-fade-in 0.3s ease;
}
.sd-shoutout-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--sd-button-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	color: #fff;
	flex-shrink: 0;
}
.sd-shoutout-body { flex: 1; min-width: 0; }
.sd-shoutout-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--sd-primary);
}
.sd-shoutout-action {
	font-size: 13px;
	color: var(--sd-text-muted);
}
.sd-shoutout-badge {
	color: var(--sd-secondary);
	font-weight: 700;
}
.sd-shoutout-msg {
	font-size: 13px;
	color: var(--sd-text);
	margin: 4px 0 0;
	word-break: break-word;
}
.sd-shoutout-gif {
	margin-top: 6px;
	max-height: 100px;
	border-radius: 8px;
	display: block;
}
.sd-shoutout-time {
	font-size: 11px;
	color: var(--sd-text-muted);
	margin-top: 4px;
}
.sd-shoutout-empty {
	text-align: center;
	color: var(--sd-text-muted);
	font-size: 13px;
	padding: 20px;
}

/* ============================================================
   SPIN BUTTON (on donation form)
   ============================================================ */
.sd-spin-row {
	text-align: center;
	margin: 2px 0 14px;
}
.sd-spin-trigger {
	background: linear-gradient( 135deg, #b91c1c, #ef4444 );
	color: #fff;
	border: none;
	border-radius: 100px;
	padding: 9px 20px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	letter-spacing: 0.03em;
	box-shadow: 0 3px 14px rgba(185, 28, 28, 0.45);
	transition: filter 0.15s, transform 0.1s;
	font-family: var(--sd-font);
}
.sd-spin-trigger:hover  { filter: brightness(1.12); transform: translateY(-1px); }
.sd-spin-trigger:active { transform: scale(0.97); }

/* ============================================================
   SPIN OVERLAY & MODAL
   ============================================================ */
.sd-spin-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: sd-fade-in 0.2s ease;
}
.sd-spin-overlay[hidden] { display: none; }

.sd-spin-modal {
	background: linear-gradient( 160deg, #14003a 0%, #2a0060 60%, #0a001f 100% );
	border: 2px solid #FFD700;
	border-radius: 24px;
	padding: 28px 24px 24px;
	text-align: center;
	max-width: 360px;
	width: 100%;
	box-shadow: 0 0 60px rgba(255, 215, 0, 0.2), 0 0 120px rgba(139, 92, 246, 0.15), 0 24px 60px rgba(0,0,0,0.6);
	position: relative;
	animation: sd-slide-up 0.25s ease;
}

.sd-spin-close {
	position: absolute;
	top: 12px; right: 14px;
	width: 30px; height: 30px;
	border-radius: 50%;
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.15);
	color: rgba(255,255,255,0.6);
	font-size: 18px;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.15s;
}
.sd-spin-close:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ── Flashing lights ── */
.sd-spin-lights {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 10px;
}
.sd-spin-light {
	width: 9px; height: 9px;
	border-radius: 50%;
	background: #FFD700;
	animation: sd-light-blink 0.6s ease-in-out infinite alternate;
}
@keyframes sd-light-blink {
	from { opacity: 0.25; box-shadow: none; }
	to   { opacity: 1;    box-shadow: 0 0 8px #FFD700, 0 0 16px rgba(255,215,0,0.4); }
}

/* ── Header ── */
.sd-spin-title {
	font-size: 22px;
	font-weight: 900;
	color: #FFD700;
	margin: 0 0 4px;
	text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
	letter-spacing: 0.02em;
}
.sd-spin-subtitle {
	font-size: 13px;
	color: rgba(255,255,255,0.5);
	margin: 0 0 20px;
}

/* ── Slot machine ── */
.sd-slot-machine { position: relative; }

.sd-slot-reels {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-bottom: 20px;
}

.sd-slot-window {
	width: 96px;
	height: 110px;
	overflow: hidden;
	border-radius: 10px;
	border: 2px solid rgba(255, 215, 0, 0.4);
	background: #050010;
	position: relative;
	box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 10px rgba(255,215,0,0.15);
}
.sd-slot-window--center {
	border-color: #FFD700;
	box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.4), 0 0 40px rgba(255,215,0,0.15);
}

/* Glass shine overlay on each window */
.sd-slot-shine {
	position: absolute;
	inset: 0;
	background: linear-gradient( 160deg, rgba(255,255,255,0.07) 0%, transparent 50% );
	pointer-events: none;
	border-radius: 8px;
}

.sd-slot-reel {
	display: flex;
	flex-direction: column;
	will-change: transform;
}

.sd-slot-item {
	height: 110px;
	width: 96px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex-shrink: 0;
	padding: 0 4px;
}
.sd-slot-emoji  { font-size: 30px; line-height: 1; }
.sd-slot-label  { font-size: 11px; color: rgba(255,255,255,0.7); font-weight: 600; text-align: center; line-height: 1.2; max-width: 80px; }
.sd-slot-amount { font-size: 17px; font-weight: 900; color: #FFD700; }

/* Centre win-line */
.sd-slot-winline {
	position: absolute;
	top: 50%; left: 0; right: 0;
	height: 2px;
	background: linear-gradient( 90deg, transparent, rgba(255,215,0,0.6) 20%, rgba(255,215,0,0.6) 80%, transparent );
	transform: translateY(-1px);
	pointer-events: none;
}

/* ── Result ── */
.sd-spin-result {
	background: rgba(255, 215, 0, 0.08);
	border: 1px solid rgba(255, 215, 0, 0.25);
	border-radius: 12px;
	padding: 14px 20px;
	margin-bottom: 16px;
	animation: sd-fade-in 0.4s ease;
}
.sd-spin-result[hidden] { display: none; }
.sd-spin-result-emoji  { font-size: 36px; margin-bottom: 4px; }
.sd-spin-result-label  { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 2px; }
.sd-spin-result-amount { font-size: 28px; font-weight: 900; color: #FFD700; text-shadow: 0 0 20px rgba(255,215,0,0.5); }

/* ── Buttons ── */
.sd-spin-btn {
	width: 100%;
	padding: 15px;
	background: linear-gradient( 135deg, #b91c1c 0%, #ef4444 50%, #b91c1c 100% );
	background-size: 200% 100%;
	color: #fff;
	border: none;
	border-radius: 100px;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: 0.08em;
	cursor: pointer;
	box-shadow: 0 4px 24px rgba(185, 28, 28, 0.5), 0 0 0 3px rgba(239,68,68,0.2);
	transition: filter 0.15s, transform 0.1s, background-position 0.3s;
	text-transform: uppercase;
	margin-bottom: 12px;
}
.sd-spin-btn:hover   { filter: brightness(1.12); transform: translateY(-2px); background-position: right center; }
.sd-spin-btn:active  { transform: scale(0.98); }
.sd-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.sd-spin-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}
.sd-spin-actions[hidden] { display: none; }

.sd-spin-use-btn {
	padding: 14px;
	background: linear-gradient( 135deg, #16a34a, #22c55e );
	color: #fff;
	border: none;
	border-radius: 100px;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
	animation: sd-pulse 1.2s ease infinite;
	transition: filter 0.15s;
}
.sd-spin-use-btn:hover { filter: brightness(1.1); animation: none; }

.sd-spin-again-btn {
	padding: 10px;
	background: rgba(255,255,255,0.07);
	color: rgba(255,255,255,0.7);
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 100px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}
.sd-spin-again-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

.sd-spin-note {
	font-size: 11px;
	color: rgba(255,255,255,0.3);
	margin: 0;
}

/* Winner flash animation on the centre window */
.sd-slot-window--center.sd-slot-winner {
	animation: sd-winner-flash 0.3s ease 4;
}
@keyframes sd-winner-flash {
	0%, 100% { box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.4); }
	50%       { box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 0 50px rgba(255,215,0,0.9), 0 0 80px rgba(255,215,0,0.4); }
}

/* ============================================================
   FLOATING HEARTS / EMOJI ANIMATION
   ============================================================ */
.sd-float-emoji {
	position: fixed;
	font-size: 28px;
	pointer-events: none;
	z-index: 99998;
	animation: sd-float-up 1.2s ease forwards;
	will-change: transform, opacity;
}

@keyframes sd-float-up {
	0%   { transform: translateY(0) scale(1); opacity: 1; }
	70%  { opacity: 1; }
	100% { transform: translateY(-160px) scale(1.4); opacity: 0; }
}

/* ============================================================
   CONFETTI CANVAS
   ============================================================ */
.sd-confetti-canvas {
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	pointer-events: none;
	z-index: 99999;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes sd-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes sd-slide-up {
	from { opacity: 0; transform: translateY(20px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sd-bounce {
	0%, 100% { transform: scale(1); }
	30%       { transform: scale(1.25); }
	60%       { transform: scale(0.9); }
}
@keyframes sd-pulse {
	0%, 100% { transform: scale(1); }
	50%       { transform: scale(1.05); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
	.sd-modal { padding: 20px 16px 16px; max-height: 95vh; }
	.sd-hero-media { margin: -20px -16px 16px; }
	.sd-title { font-size: 19px; }
	.sd-tier-card { min-width: 100px; width: 100px; padding: 14px 10px; }
	.sd-tier-emoji { font-size: 22px; }
	.sd-tier-amount { font-size: 16px; }
	.sd-cta-btn { padding: 14px 20px; font-size: 15px; }

	/* Stack name/email vertically on small screens */
	.sd-donor-info { grid-template-columns: 1fr; }

	/* Stack options pills on very small screens */
	.sd-options-row { flex-direction: column; }
	.sd-option-pill { flex: none; justify-content: flex-start; border-radius: 10px; }
}

/* ============================================================
   ACCESSIBILITY — reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.sd-trigger-btn,
	.sd-tier-card,
	.sd-cta-btn,
	.sd-overlay,
	.sd-modal,
	.sd-shoutout-item,
	.sd-float-emoji { animation: none; transition: none; }
}
