/* ============================================================
   Blef Poker Quiz — Frontend (dark theme, matches site)
   ============================================================ */

:root {
    --bpq-bg:       #18181b;
    --bpq-surface:  #26262a;
    --bpq-surface2: #2e2e33;
    --bpq-border:   #3a3a3f;
    --bpq-red:      #d30000;
    --bpq-red-h:    #ff1a1a;
    --bpq-gold:     #e8b923;
    --bpq-gold-h:   #f5cc3d;
    --bpq-green:    #22c55e;
    --bpq-wrong:    #ef4444;
    --bpq-text:     #f0f0f0;
    --bpq-muted:    #9a9a9a;
    --bpq-radius:   12px;
}

/* Fix the WordPress page title above the quiz */
.entry-title,
.tdb-title-text,
.td-page-title h1,
.td-page-title .entry-title {
    color: #ffffff !important;
}

/* Utility hide class — avoids conflicts with theme [hidden] overrides */
.bpq-hide { display: none !important; }

.bpq-wrap *,
.bpq-wrap *::before,
.bpq-wrap *::after { box-sizing: border-box; }

/* Force all text inside quiz to be readable — override any theme rules */
.bpq-wrap,
.bpq-wrap p,
.bpq-wrap span,
.bpq-wrap div,
.bpq-wrap label,
.bpq-wrap h1,
.bpq-wrap h2,
.bpq-wrap h3,
.bpq-wrap h4,
.bpq-wrap h5,
.bpq-wrap h6 {
    color: #f0f0f0 !important;
}

.bpq-wrap {
    max-width: 960px;
    margin: 32px auto;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #f0f0f0;
}

/* ── Email gate ───────────────────────────────────── */

.bpq-gate {
    background: var(--bpq-surface);
    border: 1px solid var(--bpq-border);
    border-top: 3px solid var(--bpq-red);
    border-radius: var(--bpq-radius);
    padding: 52px 32px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.bpq-gate-suit {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 16px;
    color: var(--bpq-red) !important;
}

.bpq-gate-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #ffffff !important;
    letter-spacing: -.3px;
}

.bpq-gate-sub {
    color: #b0b0b0 !important;
    font-size: 14px;
    margin: 0 0 30px;
    font-weight: 500;
}

.bpq-gate-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 380px;
    margin: 0 auto;
}

.bpq-email-inp {
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid var(--bpq-border);
    background: var(--bpq-surface2) !important;
    color: #ffffff !important;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    -webkit-text-fill-color: #ffffff !important;
}

.bpq-wrap .bpq-email-inp::-webkit-input-placeholder { color: #9a9a9a !important; -webkit-text-fill-color: #9a9a9a !important; opacity: 1 !important; }
.bpq-wrap .bpq-email-inp::-moz-placeholder           { color: #9a9a9a !important; opacity: 1 !important; }
.bpq-wrap .bpq-email-inp:-ms-input-placeholder       { color: #9a9a9a !important; opacity: 1 !important; }
.bpq-wrap .bpq-email-inp::placeholder                { color: #9a9a9a !important; -webkit-text-fill-color: #9a9a9a !important; opacity: 1 !important; }
.bpq-email-inp:focus { border-color: var(--bpq-red); }

.bpq-gate-privacy {
    margin: 10px 0 0;
    font-size: 12px;
    color: #777 !important;
}

/* ── Buttons ──────────────────────────────────────── */

.bpq-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, transform .1s;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1;
    text-decoration: none;
}

.bpq-btn:active { transform: translateY(1px); }

.bpq-btn--gold {
    background: var(--bpq-gold);
    color: #111;
    width: 100%;
    text-align: center;
}
.bpq-btn--gold:hover { background: var(--bpq-gold-h); }

.bpq-btn--next {
    background: var(--bpq-red);
    color: #fff;
    margin-top: 22px;
    width: 100%;
    text-align: center;
}
.bpq-btn--next:hover { background: var(--bpq-red-h); }

.bpq-btn--outline {
    background: transparent;
    border: 2px solid var(--bpq-border);
    color: var(--bpq-muted);
    margin-top: 20px;
}
.bpq-btn--outline:hover {
    border-color: var(--bpq-text);
    color: var(--bpq-text);
}

/* ── Progress ─────────────────────────────────────── */

.bpq-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bpq-quiz-title {
    font-size: 13px;
    font-weight: 700;
    color: #888 !important;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bpq-counter {
    font-size: 13px;
    color: #888 !important;
    font-weight: 600;
}

.bpq-cur { color: #fff !important; font-weight: 800; }

.bpq-progress {
    height: 3px;
    background: var(--bpq-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.bpq-progress-fill {
    height: 100%;
    background: var(--bpq-red);
    border-radius: 2px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
}

/* ── Question card ────────────────────────────────── */

.bpq-question {
    background: var(--bpq-surface);
    border: 1px solid var(--bpq-border);
    border-radius: var(--bpq-radius);
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.bpq-q-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--bpq-red) !important;
    margin-bottom: 8px;
}

.bpq-q-text {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0 0 22px;
    line-height: 1.5;
}

/* ── Poker scenario ───────────────────────────────── */

.bpq-scenario {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 8px 0 30px;
    width: 100%;
}

.bpq-opponents-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
}

/* ── Question image ───────────────────────────────── */

.bpq-question-img {
    margin: 4px 0 22px;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}
.bpq-q-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.bpq-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.bpq-bubble {
    background: #fff;
    border: 2px solid #fff;
    border-radius: 22px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    color: #111 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
    position: relative;
    margin-bottom: 2px;
}

.bpq-bubble::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.bpq-bubble--up::after {
    bottom: auto;
    top: -11px;
    border-top-color: transparent;
    border-bottom-color: #fff;
}

.bpq-hole-cards { display: flex; gap: 5px; }

.bpq-dealer {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
    color: #111;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bpq-player-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #ccc !important;
    background: var(--bpq-surface2);
    border: 1px solid var(--bpq-border);
    padding: 2px 10px;
    border-radius: 10px;
}

.bpq-hero-label {
    background: var(--bpq-red) !important;
    border-color: var(--bpq-red) !important;
    color: #fff !important;
}

/* ── Table ────────────────────────────────────────── */

.bpq-table {
    background: radial-gradient(ellipse at 50% 38%, #c94030 0%, #8c1e1b 52%, #6a1715 100%);
    border-radius: 999px;
    border: 12px solid #3d0f0c;
    padding: 32px 80px;
    width: 100%;
    max-width: 580px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow:
        0 0 0 5px #1e0806,
        0 14px 50px rgba(0,0,0,.7),
        inset 0 3px 16px rgba(255,255,255,.1),
        inset 0 -4px 16px rgba(0,0,0,.3);
    flex-shrink: 0;
}

.bpq-pot {
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 20px;
    letter-spacing: .5px;
    white-space: nowrap;
}

.bpq-community {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* ── Cards ────────────────────────────────────────── */

.bpq-card {
    width: 52px;
    height: 72px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid rgba(0,0,0,.18);
    position: relative;
    box-shadow: 2px 3px 8px rgba(0,0,0,.5);
    font-family: Georgia, serif;
    flex-shrink: 0;
}

.bpq-card-rank {
    position: absolute;
    top: 4px;
    left: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.bpq-card-suit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -42%);
    font-size: 26px;
    line-height: 1;
}

.bpq-card--spade   { color: #111; }
.bpq-card--club    { color: #1a5c28; }
.bpq-card--heart   { color: #c0392b; }
.bpq-card--diamond { color: #c0392b; }

/* Override the global light-text rule so card ink stays readable on white */
.bpq-card--spade   .bpq-card-rank,
.bpq-card--spade   .bpq-card-suit  { color: #111111 !important; }
.bpq-card--club    .bpq-card-rank,
.bpq-card--club    .bpq-card-suit  { color: #1a5c28 !important; }
.bpq-card--heart   .bpq-card-rank,
.bpq-card--heart   .bpq-card-suit  { color: #c0392b !important; }
.bpq-card--diamond .bpq-card-rank,
.bpq-card--diamond .bpq-card-suit  { color: #c0392b !important; }

/* White-background elements need dark ink — use .bpq-wrap prefix to win specificity */
.bpq-wrap .bpq-bubble      { color: #111111 !important; }
.bpq-wrap .bpq-dealer      { color: #111111 !important; }
.bpq-wrap .bpq-pot         { color: #ffffff !important; }
.bpq-wrap .bpq-email-error { color: #e53535 !important; }

.bpq-card--hidden {
    background: repeating-linear-gradient(
        45deg,
        #2a2a2e,
        #2a2a2e 4px,
        #222226 4px,
        #222226 8px
    );
    border-color: #3a3a3f;
    box-shadow: 1px 2px 6px rgba(0,0,0,.5);
}

/* ── Answer choices ───────────────────────────────── */

.bpq-choices {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 6px;
}

.bpq-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--bpq-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: var(--bpq-surface2);
    user-select: none;
}

.bpq-choice:hover {
    border-color: var(--bpq-red);
    background: #2e2e33;
}

.bpq-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bpq-choice-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bpq-surface);
    border: 1px solid var(--bpq-border);
    color: #aaa !important;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, color .15s, border-color .15s;
}

.bpq-choice:hover .bpq-choice-letter {
    background: var(--bpq-red) !important;
    border-color: var(--bpq-red) !important;
    color: #fff !important;
}

.bpq-choice-text {
    flex: 1;
    font-size: 14px;
    color: #f0f0f0 !important;
    font-weight: 500;
    line-height: 1.4;
}

.bpq-choice-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

/* Answered states */
.bpq-choice--correct {
    border-color: var(--bpq-green) !important;
    background: rgba(34,197,94,.1) !important;
    pointer-events: none;
}
.bpq-choice--correct .bpq-choice-letter {
    background: var(--bpq-green) !important;
    border-color: var(--bpq-green) !important;
    color: #fff !important;
}
.bpq-choice--correct .bpq-choice-icon::after { content: '✓'; color: var(--bpq-green); font-weight: 700; }

.bpq-choice--wrong {
    border-color: var(--bpq-wrong) !important;
    background: rgba(239,68,68,.1) !important;
    pointer-events: none;
}
.bpq-choice--wrong .bpq-choice-letter {
    background: var(--bpq-wrong) !important;
    border-color: var(--bpq-wrong) !important;
    color: #fff !important;
}
.bpq-choice--wrong .bpq-choice-icon::after { content: '✗'; color: var(--bpq-wrong); font-weight: 700; }

.bpq-choice--neutral {
    opacity: .4;
    pointer-events: none;
}

.bpq-choice--missed {
    border-color: #f59e0b !important;
    background: rgba(245,158,11,.1) !important;
    pointer-events: none;
}
.bpq-choice--missed .bpq-choice-letter {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #fff !important;
}
.bpq-choice--missed .bpq-choice-icon::after { content: '!'; color: #f59e0b; font-weight: 700; }

/* ── Explanation ──────────────────────────────────── */

.bpq-explanation { margin-top: 14px; }

.bpq-exp-inner {
    padding: 14px 16px;
    background: rgba(211,0,0,.08);
    border-left: 3px solid var(--bpq-red);
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #e0e0e0 !important;
    line-height: 1.6;
}

.bpq-exp-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--bpq-gold) !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid rgba(232,185,35,.35);
    transition: color .15s, border-color .15s;
}
.bpq-exp-link:hover {
    color: var(--bpq-gold-h) !important;
    border-bottom-color: var(--bpq-gold-h);
}

/* ── Results ──────────────────────────────────────── */

.bpq-results {
    background: var(--bpq-surface);
    border: 1px solid var(--bpq-border);
    border-top: 3px solid var(--bpq-red);
    border-radius: var(--bpq-radius);
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    margin-top: 24px;
}

.bpq-results-trophy { font-size: 58px; margin-bottom: 14px; line-height: 1; }

.bpq-results-heading {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0 0 20px;
}

.bpq-score-ring {
    font-size: 52px;
    font-weight: 900;
    color: #ffffff !important;
    line-height: 1;
    margin-bottom: 8px;
}

.bpq-score-val { color: var(--bpq-gold) !important; }

.bpq-score-pct {
    font-size: 20px;
    font-weight: 700;
    color: #aaa !important;
    margin-bottom: 8px;
}

.bpq-score-msg {
    font-size: 15px;
    color: #aaa !important;
    margin: 0 0 4px;
}

/* ── Header (email + reward text) ────────────────── */

.bpq-header {
    background: var(--bpq-surface);
    border: 1px solid var(--bpq-border);
    border-top: 3px solid var(--bpq-red);
    border-radius: var(--bpq-radius);
    padding: 28px 32px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    flex-wrap: wrap;
}

.bpq-header-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 180px;
}

.bpq-suit-icon {
    font-size: 40px;
    line-height: 1;
    color: var(--bpq-red) !important;
    flex-shrink: 0;
}

.bpq-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0 0 4px;
    letter-spacing: -.3px;
    line-height: 1.2;
}

.bpq-subtitle {
    font-size: 13px;
    color: var(--bpq-muted) !important;
    margin: 0;
    font-weight: 500;
}

.bpq-email-block {
    flex: 1;
    min-width: 220px;
    max-width: 340px;
}

.bpq-reward-badge {
    display: inline-block;
    background: var(--bpq-gold);
    color: #111 !important;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.bpq-reward-text {
    font-size: 13px;
    color: #b0b0b0 !important;
    margin: 0 0 12px;
    line-height: 1.5;
}

.bpq-email-hint {
    font-size: 11px;
    color: var(--bpq-muted) !important;
    margin: 6px 0 0;
}

.bpq-email-error {
    font-size: 11px;
    font-weight: 400;
    color: #e53535 !important;
    margin: 6px 0 0;
    padding: 0;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: bpq-shake .35s ease;
}

@keyframes bpq-shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-5px); }
    40%      { transform: translateX(5px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(3px); }
}

/* ── Questions wrap ───────────────────────────────── */

.bpq-questions-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bpq-q-of {
    color: var(--bpq-muted) !important;
    font-weight: 500;
}

/* ── Submit bar ───────────────────────────────────── */

.bpq-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bpq-surface);
    border: 1px solid var(--bpq-border);
    border-radius: var(--bpq-radius);
    padding: 16px 24px;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    flex-wrap: wrap;
    gap: 12px;
}

.bpq-answered-count {
    font-size: 13px;
    color: var(--bpq-muted) !important;
    font-weight: 600;
}

.bpq-btn--submit {
    background: var(--bpq-red);
    color: #fff !important;
    min-width: 160px;
    text-align: center;
}
.bpq-btn--submit:hover    { background: var(--bpq-red-h); }
.bpq-btn--submit:disabled { opacity: .6; cursor: not-allowed; }

.bpq-btn--check {
    background: var(--bpq-gold);
    color: #111 !important;
    margin-top: 14px;
    width: 100%;
    text-align: center;
}
.bpq-btn--check:hover { background: var(--bpq-gold-h); }

.bpq-multi-hint {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--bpq-gold) !important;
    margin: 0 0 10px;
}

/* ── Error ────────────────────────────────────────── */

.bpq-error {
    padding: 12px 16px;
    background: rgba(211,0,0,.15);
    border-left: 3px solid var(--bpq-red);
    border-radius: 0 6px 6px 0;
    color: #ff8080;
    font-size: 14px;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 600px) {
    .bpq-gate, .bpq-question, .bpq-results { padding: 24px 16px; }
    .bpq-gate-title { font-size: 22px; }
    .bpq-q-text { font-size: 15px; }
    .bpq-scenario { gap: 10px; }
    .bpq-table { padding: 20px 24px; }
    .bpq-card { width: 40px; height: 56px; }
    .bpq-card-rank { font-size: 11px; top: 3px; left: 4px; }
    .bpq-card-suit { font-size: 20px; }
    .bpq-community { gap: 4px; }
    .bpq-hole-cards { gap: 3px; }
    .bpq-opponents-row { gap: 12px; }
}
