/* TruePolls Sweepstakes — Public Styles */
:root {
    --tp-purple: #6b3fa0;
    --tp-purple-dark: #4e2d78;
    --tp-gold: #c9a227;
    --tp-red: #b22234;
    --tp-white: #ffffff;
    --tp-navy: #3c3b6e;
}
.tpsw-page { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #111; }

/* Prize Section */
.tpsw-section-title { text-align:center; font-size:28px; font-weight:800; color:var(--tp-purple); margin:0 0 20px; letter-spacing:-0.02em; }
.tpsw-prize-section { padding:48px 20px; background:#f7f5fb; text-align:center; }
.tpsw-current-prize { display:flex; flex-wrap:wrap; gap:28px; align-items:center; justify-content:center; max-width:760px; margin:0 auto; background:#fff; border-radius:16px; padding:28px; box-shadow:0 4px 20px rgba(107,63,160,0.12); }
.tpsw-prize-image { width:220px; height:160px; object-fit:contain; border-radius:10px; }
.tpsw-prize-details { text-align:left; }
.tpsw-prize-label { font-size:12px; text-transform:uppercase; letter-spacing:0.08em; color:var(--tp-purple); font-weight:700; margin:0 0 6px; }
.tpsw-prize-title { font-size:24px; font-weight:800; color:#111; margin:0 0 6px; }
.tpsw-prize-arv { font-size:14px; color:#666; margin:0 0 10px; }
.tpsw-prize-desc { font-size:14px; color:#444; margin:0; }

/* Flag Section */
.tpsw-flag-section { position:relative; background:linear-gradient(180deg,#1a0a3a 0%,#0d0520 100%); padding:60px 20px 80px; overflow:hidden; }
.tpsw-flag-wrap { position:relative; max-width:900px; margin:0 auto; display:flex; flex-direction:column; align-items:center; }
.tpsw-fireworks-canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:1; }
.tpsw-flag { position:relative; z-index:2; width:min(520px,90vw); border:2px solid rgba(255,255,255,0.15); border-radius:4px; overflow:hidden; box-shadow:0 8px 32px rgba(0,0,0,0.5); }
.tpsw-flag-stripes { display:flex; flex-direction:column; }
.tpsw-stripe { height:30px; }
.tpsw-stripe-red { background:var(--tp-red); }
.tpsw-stripe-white { background:var(--tp-white); }
.tpsw-flag-canton { position:absolute; top:0; left:0; width:40%; height:calc(30px*7); background:var(--tp-navy); display:flex; flex-wrap:wrap; align-items:center; justify-content:center; padding:6px; gap:3px; }
.tpsw-star { color:var(--tp-white); font-size:10px; line-height:1; }

/* Winner Banner */
.tpsw-winner-banner { position:relative; z-index:3; margin:24px 0 0; background:rgba(0,0,0,0.78); border:2px solid var(--tp-gold); border-radius:14px; padding:20px 28px; text-align:center; max-width:min(520px,90vw); backdrop-filter:blur(4px); animation:tpsw-pulse 2s ease-in-out infinite; }
@keyframes tpsw-pulse { 0%,100%{border-color:var(--tp-gold);}50%{border-color:#fff176;} }
.tpsw-winner-banner-inner { color:#fff; }
.tpsw-congrats { font-size:18px; font-weight:800; color:var(--tp-gold); margin:0 0 6px; letter-spacing:0.04em; }
.tpsw-winner-id { font-size:22px; font-weight:900; margin:0 0 4px; color:#fff176; }
.tpsw-winner-msg { font-size:14px; margin:0 0 4px; opacity:0.9; }
.tpsw-winner-prize { font-size:15px; margin:0; color:var(--tp-gold); }

/* Flagpole */
.tpsw-flagpole { position:relative; z-index:2; width:10px; height:200px; background:linear-gradient(90deg,#888,#ccc,#888); border-radius:5px; margin-top:-4px; }

/* Claim Prize — Congratulations Banner (overlaid on hero, see-through) */
.banner-section .et_pb_row, .banner-section .et_pb_code, .banner-section .et_pb_code_inner { position: static !important; }
.tpsw-claim-banner {
    position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
    z-index: 10; width: 92%; max-width: 700px; text-align: center;
    color: #fff; font-weight: 900; font-size: 26px; line-height: 1.3;
    text-shadow: 0 2px 14px rgba(0,0,0,0.65), 0 0 2px rgba(0,0,0,0.4);
    letter-spacing: -0.01em; pointer-events: none;
}
.tpsw-claim-banner-id { color: var(--tp-gold); }
.tpsw-admin-preview-notice {
    background: #fff8e1; border: 1px solid #f0c14b; border-radius: 10px;
    padding: 10px 14px; margin-bottom: 18px; font-size: 13px; font-weight: 600;
    color: #7a5c00; text-align: center;
}
@media (max-width: 560px) {
    .tpsw-claim-banner { font-size: 18px; bottom: 24px; }
}

/* Entry Counter */
.tpsw-entry-counter { position:relative; z-index:3; margin-top:16px; background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.2); border-radius:12px; padding:14px 28px; text-align:center; color:#fff; backdrop-filter:blur(4px); }
.tpsw-counter-label { display:block; font-size:11px; text-transform:uppercase; letter-spacing:0.1em; opacity:0.7; margin-bottom:4px; }
.tpsw-counter-value { display:block; font-size:36px; font-weight:900; color:#fff176; }
.tpsw-odds { display:block; font-size:11px; opacity:0.65; margin-top:4px; }

/* Winner Grid */
.tpsw-history-section { padding:48px 20px; background:#fff; }
.tpsw-history-note { text-align:center; font-size:13px; color:#777; margin:-12px 0 24px; }
.tpsw-winner-grid { display:grid; grid-template-columns:repeat(12,1fr); gap:8px; max-width:1100px; margin:0 auto; }
.tpsw-winner-slot { background:#f7f5fb; border:1px solid #e0d8f0; border-radius:8px; padding:10px 8px; text-align:center; display:flex; flex-direction:column; gap:3px; min-height:80px; justify-content:center; }
.tpsw-slot-filled { background:#fff; border-color:#c4a0e8; }
.tpsw-slot-current { background:#f0ebfa; border:2px solid var(--tp-purple); }
.tpsw-slot-empty { opacity:0.4; }
.tpsw-slot-month { font-size:9px; font-weight:700; text-transform:uppercase; color:var(--tp-purple); letter-spacing:0.06em; }
.tpsw-slot-id { font-size:11px; font-weight:700; color:#111; }
.tpsw-slot-prize { font-size:9px; color:#666; }
.tpsw-slot-badge { font-size:8px; background:var(--tp-purple); color:#fff; border-radius:4px; padding:1px 5px; font-weight:700; }
.tpsw-slot-empty-label { font-size:11px; color:#ccc; }
@media (max-width:900px) { .tpsw-winner-grid { grid-template-columns:repeat(6,1fr); } }
@media (max-width:540px) { .tpsw-winner-grid { grid-template-columns:repeat(4,1fr); } }

/* NPN Form Section */
.tpsw-npn-section { padding:48px 20px; background:#f7f5fb; }
.tpsw-npn-inner { max-width:760px; margin:0 auto; }
.tpsw-npn-legal { background:#fff8e1; border:1px solid #ffe082; border-radius:8px; padding:14px 18px; font-size:13px; margin-bottom:24px; line-height:1.6; }
.tpsw-npn-form { background:#fff; border-radius:14px; padding:28px; box-shadow:0 4px 16px rgba(107,63,160,0.08); }
.tpsw-npn-section-head { font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:var(--tp-purple); border-bottom:2px solid #e0d8f0; padding-bottom:6px; margin:20px 0 14px; }
.tpsw-optional { font-weight:400; font-size:11px; color:#999; text-transform:none; letter-spacing:0; }
.tpsw-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.tpsw-field { display:flex; flex-direction:column; gap:5px; }
.tpsw-field-full { grid-column:1/-1; }
.tpsw-field label { font-size:12px; font-weight:600; color:#444; }
.tpsw-field input, .tpsw-field select, .tpsw-field textarea { padding:9px 12px; border:1.5px solid #ddd; border-radius:8px; font-size:14px; color:#111; background:#fafafa; transition:border-color 0.2s; }
.tpsw-field input:focus, .tpsw-field select:focus { border-color:var(--tp-purple); outline:none; background:#fff; }
.tpsw-checkbox { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:#444; cursor:pointer; }
.tpsw-checkbox input { margin-top:2px; accent-color:var(--tp-purple); }
.tpsw-submit-btn { display:block; width:100%; margin-top:20px; padding:14px; background:var(--tp-purple); color:#fff; border:none; border-radius:10px; font-size:16px; font-weight:700; cursor:pointer; transition:background 0.2s; }
.tpsw-submit-btn:hover { background:var(--tp-purple-dark); }
.tpsw-form-msg { padding:12px 16px; border-radius:8px; font-size:14px; margin-top:14px; }
.tpsw-form-msg.success { background:#e8f5e9; border:1px solid #a5d6a7; color:#2e7d32; }
.tpsw-form-msg.error   { background:#fff0f0; border:1px solid #ffcdd2; color:#c62828; }

/* Rules */
.tpsw-rules-section { padding:40px 20px; background:#1a0a3a; color:rgba(255,255,255,0.85); }
.tpsw-rules-section .tpsw-section-title { color:#c4a0e8; }
.tpsw-rules-inner { max-width:800px; margin:0 auto; }
.tpsw-rules-text p { font-size:13px; line-height:1.7; margin-bottom:10px; }

/* Claim Page */
.tpsw-claim-page { max-width:620px; margin:40px auto; padding:0 20px; }
.tpsw-claim-box { background:#fff; border:1px solid #e0d8f0; border-radius:16px; padding:36px; box-shadow:0 4px 20px rgba(107,63,160,0.1); }
.tpsw-claim-error { border-color:#fcc; background:#fff8f8; }
.tpsw-claim-success { border-color:#a5d6a7; background:#f1f8e9; text-align:center; }
.tpsw-claim-checkmark { font-size:56px; color:#2e7d32; margin-bottom:16px; }
.tpsw-claim-header { text-align:center; margin-bottom:24px; }
.tpsw-claim-trophy { font-size:48px; margin-bottom:12px; }
.tpsw-claim-header h1 { font-size:24px; font-weight:800; color:var(--tp-purple); margin:0 0 6px; }
.tpsw-claim-sweep { color:#777; font-size:14px; }
.tpsw-claim-prize { background:#f7f5fb; border-radius:10px; padding:16px 20px; margin-bottom:20px; text-align:center; }
.tpsw-claim-prize-label { font-size:11px; text-transform:uppercase; letter-spacing:0.08em; color:var(--tp-purple); font-weight:700; margin:0 0 4px; }
.tpsw-claim-prize h2 { margin:0 0 4px; font-size:20px; color:#111; }
.tpsw-claim-deadline { background:#fff8e1; border:1px solid #ffe082; border-radius:8px; padding:10px 16px; font-size:13px; margin-bottom:20px; }
.tpsw-deadline-urgent { background:#fff0f0; border-color:#fcc; color:#c62828; }
.tpsw-claim-form h3 { font-size:16px; font-weight:700; color:var(--tp-purple); margin:0 0 8px; }
.tpsw-claim-msg { padding:12px; border-radius:8px; margin-bottom:14px; font-size:13px; }
.tpsw-claim-msg-error { background:#fff0f0; border:1px solid #fcc; color:#c62828; }
.tpsw-claim-note { font-size:11px; color:#999; text-align:center; margin-top:10px; }
.tpsw-btn { display:inline-block; padding:10px 24px; background:var(--tp-purple); color:#fff; border-radius:999px; text-decoration:none; font-weight:700; font-size:14px; margin-top:16px; }

/* No sweep messages */
.tpsw-no-sweep, .tpsw-no-sweep-msg { text-align:center; color:#777; font-size:15px; margin:16px 0; }
@media (max-width:540px) { .tpsw-form-grid { grid-template-columns:1fr; } .tpsw-flag-section { padding:40px 10px 60px; } }

/* Counter animation */
@keyframes tpsw-bump { 0%{transform:scale(1);}50%{transform:scale(1.18);color:#fff;}100%{transform:scale(1);} }
.tpsw-counter-bump { animation: tpsw-bump 0.4s ease; }
/* Form error states */
.tpsw-input-error { border-color:#c62828 !important; background:#fff8f8 !important; }
.tpsw-field-error label { color:#c62828; }


/* ── Modal (NPN form + Rules) ── */
/* Divi assigns z-index to some columns for its own layering; that traps our high z-index
   fixed modal inside a lower stacking context, letting later page content (e.g. the Rules
   section) paint on top of it. Neutralize z-index on any column wrapping our modals. */
.et_pb_column:has(.tpsw-modal-overlay) { z-index: auto !important; }
.tpsw-modal-overlay {
    position: fixed; inset: 0; z-index: 999995;
    background: rgba(20,10,40,0.55);
    display: none; align-items: flex-start; justify-content: center;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.tpsw-modal-overlay.tpsw-modal-open { display: flex; }
.tpsw-modal-box {
    position: relative;
    background: #fff; border-radius: 20px;
    max-width: 640px; width: 100%;
    margin: 0 0 20px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    animation: tpsw-modal-in 0.25s cubic-bezier(0.34,1.4,0.64,1) both;
}
.tpsw-modal-box-rules { max-width: 720px; }
@keyframes tpsw-modal-in { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tpsw-modal-box { animation: none; } }
.tpsw-modal-close {
    position: absolute; top: 14px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: #f2eefa; color: #666;
    font-size: 20px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.tpsw-modal-close:hover, .tpsw-modal-close:focus { background: var(--tp-purple); color: #fff; outline: none; }
@media (max-width: 560px) {
    .tpsw-modal-box { padding: 26px 18px calc(70px + env(safe-area-inset-bottom, 0px)); border-radius: 16px; margin: 0 0 10px; }
    .tpsw-modal-overlay { padding: 10px; align-items: flex-start; }
    .tpsw-modal-box { animation: tpsw-modal-in-mobile 0.28s cubic-bezier(0.34,1.4,0.64,1) both; }
}
@keyframes tpsw-modal-in-mobile { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }