/* ============================================================
   SD Participant Plugin – Frontend Styles
   ============================================================ */

:root {
    --sd-primary:    #00aeef;
    --sd-form-accent:#29ABE2;  /* brand blue for auth forms: buttons, eye icon, hover, focus */
    --sd-orange:     #f47920;
    --sd-red:        #FE0000;
    --sd-green:      #2a9d50;
    --sd-blue:       #26258D;
    --sd-grey-light: #f4f4f4;
    --sd-grey:       #888;
    --sd-text:       #222;
    --sd-radius:     16px;
    --sd-shadow:     0 4px 20px rgba(0,0,0,.12);
    --sd-card-blue:  #26258D;  /* question card base background */
    --sd-card-red:   #FE0000;  /* question card incorrect background */
    --sd-card-green: #2a9d50;  /* question card correct background */
    --sd-tile-shadow-color: rgba(0,0,0,.32);
    --sd-tile-shadow-blur:  6px;
    --sd-tile-shadow-off:   6px;
}

/* ── Reset password eye (override browser) ──────────────────── */
input[type="password"]::-ms-reveal,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-textfield-decoration-container {
    display: none !important;
}
input[type="password"] {
    -webkit-text-security: disc;
}

/* ── Forms ──────────────────────────────────────────────────── */
.sd-form-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-shadow);
}

.sd-form .sd-form-row { margin-bottom: 1.2rem; }

.sd-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) { .sd-two-col { grid-template-columns: 1fr; } }

.sd-field { display: flex; flex-direction: column; }

.sd-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--sd-text);
    margin-bottom: .35rem;
}

.sd-field input {
    padding: .65rem 1rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color .2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.sd-field input:focus { border-color: var(--sd-primary); }

.sd-req { color: var(--sd-red); }

.sd-hint { font-size: .75rem; color: var(--sd-grey); margin-top: .25rem; }

/* Password wrap with always-visible eye icon */
.sd-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.sd-password-wrap input {
    padding-right: 2.8rem;
}

.sd-eye-toggle {
    position: absolute;
    right: .7rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--sd-grey);
    display: flex;
    align-items: center;
    z-index: 2;
    line-height: 1;
}

.sd-eye-toggle:hover { color: var(--sd-primary); }

.sd-eye-icon { width: 20px; height: 20px; pointer-events: none; }

/* Errors / success */
.sd-errors {
    background: #fde8e8;
    border: 1px solid #f5c6c6;
    border-radius: 8px;
    padding: .8rem 1rem;
    margin-bottom: 1rem;
    color: var(--sd-red);
    font-size: .9rem;
}

.sd-errors ul { margin: 0; padding-left: 1.2rem; }

.sd-success {
    background: #e8f8ee;
    border: 1px solid #b3e8c5;
    border-radius: 8px;
    padding: .8rem 1rem;
    margin-bottom: 1rem;
    color: var(--sd-green);
}

.sd-notice { padding: 1rem; background: var(--sd-grey-light); border-radius: 8px; }
.sd-notice-warning { background: #fff8e6; border: 1px solid #ffd470; color: #7a5300; }

/* Buttons */
/* ── Global button border-radius ──────────────────────────────────────────
   All plugin buttons use 15px except .sd-btn (the large pill-shaped
   quiz/action buttons which keep 50px) and circular/icon elements. */
:is(.sd-btn-prize-submit, .sd-btn-claim-prize, .sd-btn-reveal-missed,
    .sd-btn-close-results, .sd-btn-prize-submit,
    .sd-pwa-install-btn) {
    border-radius: 15px;
}

.sd-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2.2rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .05em;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    text-transform: uppercase;
}

.sd-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.sd-btn:disabled { opacity: .45; cursor: not-allowed; }

.sd-btn-primary,
.sd-btn-confirm,
.sd-btn-continue { background: #F7941E; color: #fff; }
.sd-btn-test     { background: #F7941E; color: #fff; }
.sd-btn-try-again{ background: #F7941E; color: #fff; }
.sd-btn-spin     { background: var(--sd-red);      color: #fff; font-size: 1.1rem; padding: 1rem 2.5rem; }

.sd-forgot-row {
    text-align: center;
    margin-top: .75rem;
}

.sd-forgot-link {
    font-size: .85rem;
    color: var(--sd-grey);
    text-decoration: none;
    transition: color .2s;
}

.sd-forgot-link:hover { color: var(--sd-primary); }

.sd-forgot-intro {
    font-size: .9rem;
    color: var(--sd-grey);
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

#sd-forgot-panel { animation: sdFadeIn .2s ease; }

@keyframes sdFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.sd-hidden { display: none !important; }

/* ── Profile Header ─────────────────────────────────────────── */
.sd-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;    /* badge stretches to match the left column's height */
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    gap: 1rem;
}

.sd-profile-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   Standalone versions of the [sd_profile_header] pieces — used when
   [sd_profile_name_stats], [sd_lucky_numbers] and [sd_draw_badge] are
   placed independently (typically on desktop). All three share the same
   fixed height via --sd-standalone-h so they line up wherever they're
   placed; change it in one spot to resize all three together.
   ══════════════════════════════════════════════════════════════════════ */
:root { --sd-standalone-h: 150px; }

/* [sd_profile_name_stats] — name/email only (stats row hidden). Left
   padding lines its text up with the inset text inside the grey
   Daily-Streak-style box from [sd_draw_numbers] (20px block padding +
   16px .sd-stats-highlight padding = 36px). */
.sd-profile-info-standalone {
    min-height: var(--sd-standalone-h);
    max-height: var(--sd-standalone-h);
    box-sizing: border-box;
    padding-left: 36px;
    justify-content: center;
    overflow: hidden;
}

/* [sd_lucky_numbers] — breathing room on both sides so number chips don't
   touch the card edges. */
.sd-lucky-numbers-standalone {
    min-height: var(--sd-standalone-h);
    max-height: var(--sd-standalone-h);
    box-sizing: border-box;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}
.sd-lucky-numbers-standalone .sd-lucky-ticker-block { flex: 0 1 auto; }

/* [sd_draw_badge] — "This Week / N / Draw Entries" collapses onto a single
   line instead of stacking, with side padding, and matches the other two
   standalone blocks' height. */
.sd-draw-badge-standalone {
    min-height: var(--sd-standalone-h);
    max-height: var(--sd-standalone-h);
    box-sizing: border-box;
    padding: 0 20px;
    display: flex;
    align-items: center;      /* black box sizes to its own content height —
                                  no longer stretched to fill the full 150px,
                                  so it matches the shorter lucky-numbers box */
    justify-content: center;
}
.sd-draw-badge-standalone .sd-draw-badge {
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    gap: .6rem;
    padding: 1rem 1.5rem;
    width: 100%;               /* fills the padded area, not the full card —
                                   the 20px side padding above keeps it off
                                   the card edges */
    box-sizing: border-box;
    white-space: nowrap;
}
.sd-draw-badge-standalone .sd-badge-number { font-size: 1.8rem; white-space: nowrap; }
.sd-draw-badge-standalone .sd-badge-week,
.sd-draw-badge-standalone .sd-badge-label { margin: 0; white-space: nowrap; }

.sd-profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 .2rem;
    color: var(--sd-text);
}

.sd-profile-email { color: var(--sd-grey); font-size: .85rem; margin: 0 0 .6rem; }

/* Email + "My Dashboard" button row — play page only. The button's left edge is
   pinned (via JS, see positionDashboardBtn) to line up with the Total Learnings
   stat column below it. The email text gets a max-width + right fade so a long
   address never pushes the button out of position. */
.sd-profile-email-row {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 2rem;
    margin: 0 0 .8rem;
}
.sd-profile-email-row .sd-profile-email {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    flex: 0 1 auto;
    -webkit-mask-image: linear-gradient(to right, #000 80%, transparent 100%);
    mask-image: linear-gradient(to right, #000 80%, transparent 100%);
    padding-right: 14px;
}
.sd-dashboard-btn {
    position: absolute;
    top: 50%;
    left: 0;              /* repositioned by JS to align with Total Learnings */
    transform: translateY(-50%);
    background: #555;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    padding: .55rem 1.1rem;
    border-radius: var(--sd-radius);
    flex-shrink: 0;
}
.sd-dashboard-btn:hover,
.sd-dashboard-btn:focus {
    background: #444;
    color: #fff;
}

.sd-profile-stats { display: flex; gap: 1.5rem; }

.sd-profile-stats {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: flex-end;   /* align numbers to bottom for consistent baseline */
    margin-top: .5rem;
}

.sd-stat { display: flex; flex-direction: column; }
.sd-stat-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
    white-space: normal;     /* allow two-line labels */
    line-height: 1.2;
    text-align: left;
}
.sd-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sd-text);
    display: flex;
    align-items: center;
    gap: .25rem;
    min-height: 1.4rem;
    line-height: 1.2;
}

/* Daily / Streak | Weekly / Learnings | Total / Learnings — pipe-split row,
   each label stacked on two lines with its value bottom-aligned beside it. */
.sd-profile-stats-line {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 0 0 .6rem;
}

.sd-stat-inline {
    display: inline-flex;
    align-items: flex-end;
    gap: .35rem;
    white-space: nowrap;
}

.sd-stat-inline .sd-stat-label { white-space: nowrap; line-height: 1.2; }
.sd-stat-inline .sd-stat-value { display: inline; min-height: 0; }

.sd-stat-pipe { color: #ccc; font-weight: 400; align-self: flex-end; }

/* Mobile — not enough width for label + value side by side without
   wrapping awkwardly, so the value drops below the two-line label instead
   (DAILY / STREAK / 2), each stat block stacked vertically. */
@media (max-width: 480px) {
    .sd-stat-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: .1rem;
    }
    /* Pipe becomes a thin vertical rule spanning the full stat block height
       instead of a single "|" glyph, which reads oddly next to 3-line text. */
    .sd-stat-pipe {
        align-self: stretch;
        font-size: 0;
        width: 1px;
        min-width: 1px;
        background: #ddd;
        color: transparent;
    }
}

.sd-streak-flame { font-size: .9rem; line-height: 1; }

/* Micro-learnings toggle — exactly matches .sd-stat-value sizing */
.sd-learnings-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sd-text);
    display: flex;
    align-items: center;
    gap: .25rem;
    line-height: 1.2;
    min-height: 1.4rem;
}

.sd-chevron {
    transition: transform .2s ease;
    flex-shrink: 0;
}
.sd-chevron-up { transform: rotate(180deg); }

/* sd-learnings-dropdown removed */

.sd-learnings-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sd-learnings-dropdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 1rem;
    font-size: .82rem;
    border-bottom: 1px solid #f5f5f5;
}
.sd-learnings-dropdown li:last-child { border-bottom: none; }

.sd-learn-product { color: #444; text-align: left; }
.sd-learn-count {
    font-weight: 700;
    color: var(--sd-primary);
    min-width: 1.5rem;
    text-align: right;
}

.sd-stat-learnings { position: relative; }

.sd-draw-badge {
    background: #000000;
    color: #fff;
    border-radius: var(--sd-radius);
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.sd-badge-number { display: block; font-size: 3rem; font-weight: 900; line-height: 1; }
.sd-badge-label  { display: block; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: .3rem; }

/* ── Stage — fixed square containing all three screens ──────── */
.sd-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;        /* 4 columns × 5 rows of square tiles */
    overflow: hidden;
}

.sd-screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.sd-screen-hidden {
    display: none;
}

/* ── Action bar — always directly below the stage ───────────── */
.sd-action-bar {
    width: 100%;
    padding: .85rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    min-height: 68px;           /* Prevents layout shift between button states */
}

.sd-action-hidden { display: none !important; }

/* ── Grid ───────────────────────────────────────────────────── */
.sd-game-wrap { max-width: 540px; margin: 0 auto; padding: 1.5rem; }

@media (max-width: 600px) {
    .sd-game-wrap { max-width: 100%; padding: 1rem; }
}

.sd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.sd-tile {
    position: relative;
    background: transparent;
    cursor: pointer;
    transition: opacity .3s, transform .15s;
    aspect-ratio: 1;
}

.sd-tile:hover:not(.sd-tile-fading) { transform: scale(1.04); }
.sd-tile:active { transform: scale(.97); }

/* Tiles that fade out when one is clicked */
.sd-tile-fading { opacity: 0.15; pointer-events: none; transition: opacity .4s ease; }

.sd-tile-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    border-radius: 0;
    background: transparent;
}

/* Flying tile — JS manages all transitions directly */
.sd-tile-fly {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.sd-tile-fly img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* First-frame crossfade image */
.sd-tile-fly-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity .5s ease .1s;
}

/* ── Video + DYK unified screen ─────────────────────────────── */
/* Kept at its original square size (matching the old 4-row grid) even
   though .sd-stage is now taller to fit 5 rows — centered vertically in
   the extra space instead of stretching to fill the whole stage. */
#sd-screen-video {
    background: #fff;
    inset: auto 0 auto 0;
    top: 50%;
    height: auto;
    aspect-ratio: 1;
    transform: translateY(-50%);
}

#sd-anim-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;           /* Fill exactly — eliminates letterbox black edges */
    background: #fff;
    display: block;
    z-index: 1;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

/* DYK crossfade layer — sits above the video, fades in after video ends */
.sd-dyk-crossfade {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity .8s ease;
    /* JS sets background-image to the sweet image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sd-dyk-crossfade.sd-dyk-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── DYK content (fact text only, positioned by backend settings) ──
   Desktop/tablet uses --sd-dyk-top/--sd-dyk-left (set inline per-page from
   the admin "DYK Fact Text Position" fields). Below 600px — where .sd-stage
   is a much smaller square and the same px offset no longer lines up with
   the sweet background image — the --sd-dyk-*-mobile pair (from the
   "DYK Fact Text Position — Mobile" admin fields) takes over instead. */
.sd-dyk-content {
    position: absolute;
    z-index: 1;
    max-width: 55%;
    padding-right: 1.5rem;
    box-sizing: border-box;
    top: var(--sd-dyk-top, 8.9%);
    left: var(--sd-dyk-left, 7.4%);
}

@media (max-width: 600px) {
    .sd-dyk-content {
        top: var(--sd-dyk-top-mobile, var(--sd-dyk-top, 8.9%));
        left: var(--sd-dyk-left-mobile, var(--sd-dyk-left, 7.4%));
    }

    /* Optional cap on the fact text's height (Admin → Media → "DYK Fact Max
       Height — Mobile"). Defaults to "none" — unlimited height, text grows
       as tall as it needs — unless the admin sets a px value, in which case
       taller text scrolls inside this box instead of overflowing off the
       unwrapped-sweet image. Line-height is also tightened here (vs the
       1.5 used on wider screens) so more of the fact fits before a scrollbar
       is even needed. */
    .sd-dyk-fact {
        max-height: var(--sd-dyk-fact-max-h-mobile, none);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        line-height: 1.25em !important;
        font-size: .75rem !important;
        padding-right: 10px;
    }
}

.sd-dyk-fact {
    font-size: .95rem;
    line-height: 1.5;
    color: #222;
}

/* "Scroll for more" hint — a small bouncing chevron pinned to the bottom of
   .sd-dyk-content, shown only via JS (sdUpdateDykScrollHint in
   sd-participant.js) when the fact text is actually taller than its
   scrollable box on mobile. Hidden by default so it never appears on
   desktop or when the text already fits. */
.sd-dyk-scroll-hint {
    display: none;
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: #fff;
    pointer-events: none;
    z-index: 2;
    animation: sd-dyk-scroll-hint-bounce 1.4s ease-in-out infinite;
}

@keyframes sd-dyk-scroll-hint-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(3px); }
}

/* Product image */
.sd-product-image-wrap {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 44%;
    pointer-events: none;
    z-index: 2;
}

.sd-product-img {
    width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.25));
}

.sd-slide-in {
    animation: sdSlideInRight .5s cubic-bezier(.22,.61,.36,1) forwards;
}

@keyframes sdSlideInRight {
    from { transform: translateX(80px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ── Question Screen ─────────────────────────────────────────── */
.sd-question-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.sd-question-card {
    --sd-card-accent: var(--sd-card-blue);
    background: var(--sd-card-accent);
    border: 1px solid var(--sd-card-blue);
    border-radius: var(--sd-radius);
    padding: 1.2rem 1.4rem;      /* Tighter padding */
    width: 100%;
    height: 100%;
    position: relative;
    transition: background-color .3s;
    box-sizing: border-box;
    overflow: hidden;            /* Never grow beyond stage */
    display: flex;
    flex-direction: column;
    color: #fff;
}

.sd-question-card.sd-correct   { --sd-card-accent: var(--sd-card-green); }
.sd-question-card.sd-incorrect { --sd-card-accent: var(--sd-card-red); }

.sd-question-text {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0;
    margin-bottom: .9rem;
    color: #fff;
    flex-shrink: 0;
}

.sd-question-text strong { font-weight: 800; }

/* Answer options — tighter spacing */
.sd-answers { list-style: none; padding: 0; margin: 0; overflow-y: auto; flex: 1; }

.sd-answer-opt {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .45rem .5rem;       /* Tighter */
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: .25rem;       /* Tighter */
    user-select: none;
}

.sd-answer-opt:hover { background: rgba(255,255,255,.1); }
.sd-answer-opt.selected { background: rgba(255,255,255,.2); }
.sd-answer-opt input[type="radio"] { display: none; }

.sd-custom-radio {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 2px solid rgba(255,255,255,.7);
    background: transparent;
    border-radius: 3px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
    flex-shrink: 0;
}

.sd-answer-opt.selected .sd-custom-radio {
    border-color: #fff;
    background: #fff;
}

.sd-answer-opt.selected .sd-custom-radio::after {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--sd-card-accent);
    border-radius: 2px;
    display: block;
}

.sd-answer-text { font-size: 1.1rem; line-height: 1.4; color: #fff; }

/* Result overlay — solid, matches the card's current state color so the
   answers behind it are fully hidden and the result reads on the same
   red/blue/green surface as the card itself. */
.sd-question-overlay {
    position: absolute;
    inset: 0;
    background: var(--sd-card-accent);
    border-radius: var(--sd-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    z-index: 5;
}

.sd-result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .75rem;
    font-size: 2rem;
    color: #fff;
}

.sd-result-icon.sd-icon-correct  { border: 3px solid #fff; }
.sd-result-icon.sd-icon-incorrect{ border: 3px solid #fff; }

.sd-result-label {
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .6rem;
    color: #fff;
}

.sd-result-explanation {
    font-size: 1.05rem;
    line-height: 1.55;
    color: #fff;
    max-width: 300px;
}

/* ── Correct-answer confetti burst ──────────────────────────── */
.sd-confetti-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 6;
    border-radius: var(--sd-radius);
}

.sd-confetti-piece {
    position: absolute;
    top: -12px;
    width: 8px;
    height: 14px;
    opacity: 0;
    will-change: transform, opacity;
    -webkit-animation-name: sdConfettiFall;
            animation-name: sdConfettiFall;
    -webkit-animation-timing-function: cubic-bezier(.35,0,.65,1);
            animation-timing-function: cubic-bezier(.35,0,.65,1);
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
}

.sd-confetti-piece.sd-confetti-round { border-radius: 50%; }

@-webkit-keyframes sdConfettiFall {
    0%   { -webkit-transform: translateY(-12px) rotate(var(--sd-cf-r0, 0deg)); opacity: 1; }
    85%  { opacity: 1; }
    100% { -webkit-transform: translateY(340px)  rotate(var(--sd-cf-r1, 600deg)); opacity: 0; }
}
@keyframes sdConfettiFall {
    0%   { transform: translateY(-12px) rotate(var(--sd-cf-r0, 0deg)); opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(340px)  rotate(var(--sd-cf-r1, 600deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sd-confetti-layer { display: none; }
}

/* ── Lucky Draw Spinner ─────────────────────────────────────── */
.sd-wheel-wrap { max-width: 540px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; text-align: center; }

.sd-spinner-status {
    font-size: .78rem;
    color: var(--sd-grey);
    margin: 0 0 .25rem;
}

.sd-spinner-countdown {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
    margin-bottom: 1.25rem;
    min-height: 2rem;
    text-align: center;
}

.sd-spinner-countdown .sd-countdown-units {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
    color: var(--sd-text);
    margin-top: .2rem;
}

/* Three spinning number blocks */
.sd-spinner-blocks {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.sd-spin-block {
    flex: 1;
    max-width: 100px;
    border-radius: 12px;
    padding: 6px 8px 8px;
    text-align: center;
    background: #f9fafb;
    border: 2px solid var(--sd-border, #e5e7eb);
    transition: border-color .3s, background .3s;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Locked / revealed state — brand colours */
.sd-spin-block.sd-spin-locked { border-color: transparent; }
.sd-spin-red    { background: var(--sd-red);    color: #fff; }
.sd-spin-yellow { background: #E8C100;           color: #1a1a1a; }
.sd-spin-blue   { background: var(--sd-blue);   color: #fff; }

.sd-spin-place {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .35rem;
    opacity: .75;
}

.sd-spin-number {
    font-size: 1.2rem;       /* 50% of 2.4rem */
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    min-width: 4ch;          /* always wide enough for 4 digits — no layout shift */
    transition: color .2s;
}

.sd-spin-number.sd-spin-empty { color: #d1d5db; }
.sd-spin-red    .sd-spin-number,
.sd-spin-blue   .sd-spin-number { color: #fff; }
.sd-spin-yellow .sd-spin-number { color: #1a1a1a; }

/* Pool bar */
.sd-pool-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    justify-content: center;
    width: 100%;
    padding: 0 .5rem;
    box-sizing: border-box;
}
.sd-pool-bar label { font-size: .75rem; color: var(--sd-grey); white-space: nowrap; }
.sd-pool-track { flex: 1; max-width: 160px; height: 5px; background: #ddd; border-radius: 3px; overflow: hidden; }
.sd-pool-fill  { height: 100%; background: var(--sd-primary); border-radius: 3px; transition: width .5s; }
.sd-pool-number { font-weight: 700; font-size: .9rem; min-width: 2rem; }

/* Spin button */
.sd-btn-spin { background: var(--sd-red); color: #fff; padding: .65rem 1.8rem; font-size: .9rem; margin-top: .75rem; }

/* Previous Winning Numbers */
.sd-prev-draws { margin-top: .75rem; text-align: left; }

.sd-prev-draws-heading {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
    margin: 0 0 .75rem;
    text-align: center;
}

.sd-prev-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .4rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.sd-prev-row:last-child { border-bottom: none; }

.sd-prev-date {
    font-size: .75rem;
    color: var(--sd-grey);
    min-width: 80px;
    white-space: nowrap;
}

.sd-prev-chips { display: flex; gap: .5rem; flex: 1 1 auto; }

/* Column headings (1ST / 2ND / 3RD) above the previous-draw chip rows */
.sd-prev-row-headings { border-bottom: none; padding-bottom: 0; }
.sd-prev-chip-heading {
    flex: 1 1 0;
    text-align: center;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--sd-grey);
}

/* Previous draw chips — grey by default. Flex-grow so the three chips stretch
   to fill the row's remaining width, right up to the card's 20px margin. */
.sd-prev-chip {
    flex: 1 1 0;
    width: auto;
    height: 32px;
    border-radius: 7px;
    background: #f2f2f2;
    color: #555;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .4s, color .4s;
}

/* Most recent draw row uses brand colours */
.sd-prev-chip.sd-spin-red    { background: var(--sd-red);  color: #fff; }
.sd-prev-chip.sd-spin-yellow { background: #E8C100;        color: #1a1a1a; }
.sd-prev-chip.sd-spin-blue   { background: var(--sd-blue); color: #fff; }

/* ── Celebration overlay ─────────────────────────────────────── */
.sd-celebration {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.92);
    border-radius: var(--sd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: sdCelebFadeIn .4s ease forwards;
}

@keyframes sdCelebFadeIn {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

.sd-celebration-inner { text-align: center; }

.sd-celebration-emoji {
    font-size: 3rem;
    animation: sdCelebBounce .6s ease infinite alternate;
    display: block;
    margin-bottom: .5rem;
}

@keyframes sdCelebBounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-10px); }
}

.sd-celebration-msg {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sd-blue);
    margin: 0;
    line-height: 1.4;
}

/* Winners row (kept for compat) */
.sd-winners-row { display: none; }
.sd-win-red    { background: var(--sd-red); }
.sd-win-blue   { background: var(--sd-blue); }
.sd-win-orange { background: var(--sd-orange); }
.sd-win-empty  { background: #ccc; }

/* ── Draw Numbers Block ──────────────────────────────────────── */
.sd-draw-numbers-block {
    /* No card — no background, border-radius, or shadow */
    padding: 0 20px;
    box-sizing: border-box;
}

/* Stats section — vertical stacked list */
.sd-stats-section { margin-bottom: 1.25rem; }

.sd-block-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .85rem;
    color: var(--sd-text);
}

/* Draw numbers subtitle — same size as block title */
.sd-draw-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--sd-text);
}

.sd-stats-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.sd-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;   /* pushes the value to the card's right margin */
    gap: .6rem;
}

.sd-stat-row-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
}

.sd-stat-row-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sd-text);
    display: flex;
    align-items: center;
    gap: .25rem;
    text-align: right;
}

/* Rank / Daily Streak / Weekly Learnings grouped on a light grey panel */
.sd-stats-highlight {
    background: #F1F2F2;
    border-radius: var(--sd-radius);
    padding: .55rem 1rem;
    margin-bottom: .6rem;
}

.sd-stats-highlight .sd-stat-row {
    padding: .4rem 0;
}

.sd-stats-highlight .sd-stat-row + .sd-stat-row {
    border-top: 1px solid rgba(0,0,0,.06);
}

/* Rank row — enlarged and brand blue */
.sd-stat-row-rank .sd-stat-row-label {
    font-size: 1rem;
    font-weight: 800;
    color: #26258D;
}
.sd-stat-row-rank .sd-stat-row-value {
    font-size: 2.1rem;
    font-weight: 900;
    color: #26258D;
}

/* Same 1rem horizontal inset as .sd-stats-highlight's own padding, so the
   TOTAL LEARNINGS label/number and the product rows below line up exactly
   with the label/number positions inside the grey panel above. */
.sd-stat-row-total {
    margin-top: .1rem;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Total Learnings block — fixed minimum height so it lines up with carousel
   slide heights elsewhere on the page. The row itself stays put; once the
   product list below grows past the remaining space it scrolls internally
   instead of stretching the block taller. */
.sd-total-learnings-block {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    max-height: 400px;
}

/* Micro-learnings product breakdown — indented below the stat row */
.sd-micro-products {
    margin-left: 0;           /* Align with left edge, same as MICRO label */
    margin-top: .2rem;
    margin-bottom: .35rem;
    padding: 0 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    text-align: left;
    flex: 1 1 auto;
    min-height: 0;    /* required for a flex child to actually scroll instead of stretching its parent */
    overflow-y: auto;
}

.sd-micro-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    color: #555;
    padding: .15rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.sd-micro-product-row:last-child { border-bottom: none; }

.sd-learn-product { color: #444; margin-right: 20px; }
.sd-learn-count {
    font-weight: 700;
    color: var(--sd-primary);
    min-width: 1.5rem;
    text-align: right;
}

.sd-block-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 1.1rem 0;
}

/* Draw numbers section */
.sd-draw-numbers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .85rem;
}

.sd-pool-size { font-size: .85rem; color: var(--sd-grey); }

/* Number chips — rectangles with brand colours, 4-digit ready */
.sd-numbers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .75rem;
}

.sd-number-chip {
    width: 52px;
    height: 32px;
    border-radius: 7px;
    font-weight: 700;
    font-size: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    color: #fff;
    /* Colour assigned via JS using nth-child pattern */
}

/* Cycle through 4 brand colours */
.sd-number-chip:nth-child(4n+1) { background: var(--sd-blue); }
.sd-number-chip:nth-child(4n+2) { background: var(--sd-red); }
.sd-number-chip:nth-child(4n+3) { background: #E8C100; color: #1a1a1a; }
.sd-number-chip:nth-child(4n+4) { background: var(--sd-orange); }

/* Card user identity */
.sd-card-user {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-bottom: .1rem;
}

.sd-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--sd-text);
}

.sd-card-email {
    font-size: .78rem;
    color: var(--sd-grey);
}

.sd-numbers-hint { font-size: .8rem; color: var(--sd-grey); margin: 0; text-align: center; }
.sd-wheel-hint { margin-top: .5rem; margin-bottom: .75rem; }

@media (min-width: 768px) {
    .sd-wheel-hint {
        font-size: 1rem;
        color: var(--sd-text);
        font-weight: 500;
    }
}
.sd-no-numbers   { color: var(--sd-grey); font-size: .9rem; margin: 0; }

/* ── Lucky numbers ticker (profile header, under mini-stats) ───
   All numbers sit on one row. Once they overflow the available width the
   row auto-scrolls right-to-left; the user can also grab and drag it. */
.sd-lucky-ticker-block { margin-top: 0; box-sizing: border-box; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; }

/* Heading — same size/weight/color as the DAILY STREAK label, left-aligned
   with it (this block shares the .sd-game-wrap padding with the stats row
   above, so no extra offset is needed). */
.sd-lucky-ticker-block .sd-draw-title {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
    text-align: center;
    margin: 0 0 .45rem;
}

/* Standalone [sd_lucky_numbers] shortcode only — centre title and empty text */
.sd-lucky-numbers-standalone .sd-draw-title,
.sd-lucky-numbers-standalone .sd-no-numbers {
    text-align: center;
}

/* Match the profile name size/colour in standalone only */
.sd-lucky-numbers-standalone .sd-draw-title {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
    text-align: center;
}

.sd-ticker-viewport {
    display: flex;
    flex-wrap: nowrap;
    gap: .4rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    margin-bottom: 0;
    /* Fade the last partially-visible chip on the right instead of a hard clip */
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}

.sd-ticker-viewport::-webkit-scrollbar { display: none; }
.sd-ticker-viewport.sd-ticker-dragging { cursor: grabbing; scroll-behavior: auto; }

/* ── Wheel spin animation ───────────────────────────────────── */
.sd-spinning { animation: sdWheelSpin 4s cubic-bezier(.17,.67,.12,.99) forwards; }

@keyframes sdWheelSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(1440deg); }
}

/* ══════════════════════════════════════════════════════════════
   SD Modal — triggered by Elementor buttons
   ══════════════════════════════════════════════════════════════ */

/* Overlay backdrop */
.sd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.sd-modal-overlay.sd-modal-open {
    opacity: 1;
    visibility: visible;
}

/* Modal box */
.sd-modal {
    background: #fff;
    border-radius: var(--sd-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform .25s ease;
}

.sd-modal-overlay.sd-modal-open .sd-modal {
    transform: translateY(0);
}

/* Close button */
.sd-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--sd-grey-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--sd-grey);
    z-index: 2;
    transition: background .15s, color .15s;
}

.sd-modal-close:hover {
    background: #e0e0e0;
    color: var(--sd-text);
}

/* Modal title */
.sd-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 1.75rem 1.75rem .25rem;
    margin: 0;
    color: var(--sd-text);
}

/* Override .sd-form-wrap inside modal — no extra shadow/padding duplication */
.sd-modal .sd-form-wrap {
    box-shadow: none;
    padding: 1.25rem 1.75rem 1.75rem;
    max-width: 100%;
}

/* Body scroll lock when modal open */
body.sd-modal-active {
    overflow: hidden;
}

/* ── Reset Password Form ────────────────────────────────────── */
.sd-reset-intro {
    font-size: .9rem;
    color: var(--sd-grey);
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

/* ── Logout link ────────────────────────────────────────────── */
.sd-logout-link {
    color: var(--sd-grey);
    font-size: .9rem;
    text-decoration: none;
    transition: color .2s;
    cursor: pointer;
}
.sd-logout-link:hover { color: var(--sd-red); }

/* ── Welcome shortcode ──────────────────────────────────────── */
.sd-welcome {
    font-size: inherit;
    color: inherit;
}
.sd-welcome strong { font-weight: 700; }

/* ── Animation GIF (used when no video is uploaded) ─────────── */
.sd-anim-gif {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    background: #fff;
    display: block;
    z-index: 1;
}

/* ── DYK Info button on question card ───────────────────────── */
/* ℹ Info button — top-left corner, just above the question text.
   Replays the "Did You Know" fact (and custom image, if one is set). */
.sd-dyk-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 4;
    transition: background .15s, color .15s;
}

/* On the question card the icon inverts to white-on-accent for contrast;
   elsewhere (e.g. the grid tile info button) it keeps the brand-blue hover. */
.sd-question-card .sd-dyk-info-btn:hover {
    background: #fff;
    color: var(--sd-card-accent, var(--sd-card-blue));
}
.sd-dyk-info-btn:hover {
    background: #F7941E;
    color: #fff;
}

/* DYK info overlay — centred modal, text only, no image */
.sd-dyk-info-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    animation: sdFadeIn .2s ease;
    padding: 1.5rem;
    box-sizing: border-box;
}

.sd-dyk-info-inner {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: var(--sd-radius);
    box-shadow: 0 8px 40px rgba(0,0,0,.3);
    padding: 2rem 1.75rem 1.75rem;
    text-align: center;
}

.sd-dyk-info-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sd-dyk-info-close:hover { background: #e0e0e0; color: #222; }

.sd-dyk-info-heading {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--sd-blue);
    margin: 0 0 1rem;
    letter-spacing: .03em;
}

.sd-dyk-info-fact {
    font-size: .95rem;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
}

.sd-dyk-info-custom-img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.sd-dyk-info-extra {
    font-size: .85rem;
    line-height: 1.5;
    color: #666;
    margin-top: .6rem;
}

/* ── Product image slot — top-right corner of the question card ────── */
.sd-product-slot {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    border: none;
    outline: none;
    padding: 3px;
    cursor: pointer;
    z-index: 4;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
.sd-product-slot:focus,
.sd-product-slot:active {
    border: none;
    outline: none;
    box-shadow: none;
}

/* Wrapper: zoom icon (left) + thumbnail button (right) */
.sd-product-slot-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Zoom icon — light grey, sits to the left of the thumbnail */
.sd-product-zoom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    flex-shrink: 0;
    cursor: pointer;
    line-height: 0;
    transition: color .15s;
}
.sd-product-zoom-icon:hover {
    color: #888;
}

.sd-product-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }

.sd-product-lightbox-inner { max-width: 320px; text-align: center; }

.sd-product-lightbox-img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sd-product-learn-more { display: inline-block; text-decoration: none; }

/* ── Front-end Admin Dashboard ───────────────────────────────── */
.sd-admin-dash { font-family: inherit; }

/* Summary cards */
.sd-dash-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.sd-dash-card {
    flex: 1;
    min-width: 130px;
    background: #fff;
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-shadow);
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.sd-dash-card-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--sd-blue);
    line-height: 1;
}

.sd-dash-card-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
}

/* Table */
.sd-dash-table-wrap { }

.sd-dash-table-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--sd-text);
}

.sd-dash-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sd-dash-table {
    width: 1140px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .85rem;
    min-width: 1140px;
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

/* Fixed column widths — exact pixel values */
.sd-dash-table colgroup col:nth-child(1) { width: 70px; }   /* Rank */
.sd-dash-table colgroup col:nth-child(2) { width: 214px; }  /* Player */
.sd-dash-table colgroup col:nth-child(3) { width: 214px; }  /* Daily Streak */
.sd-dash-table colgroup col:nth-child(4) { width: 214px; }  /* Micro-Learnings */
.sd-dash-table colgroup col:nth-child(5) { width: 214px; }  /* Draw Entries */
.sd-dash-table colgroup col:nth-child(6) { width: 214px; }  /* Draw Wins */

.sd-dash-table thead th {
    background: var(--sd-blue);
    color: #fff;
    padding: .65rem 1rem;
    text-align: left;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
    overflow: hidden;
}

.sd-dash-table thead th:first-child { border-radius: 8px 0 0 0; }
.sd-dash-table thead th:last-child  { border-radius: 0 8px 0 0; }

/* All rows consistent */
.sd-dash-row { border-bottom: none; }
.sd-dash-row:hover td { filter: brightness(.96); }

.sd-dash-table td {
    padding: 1.2rem 1rem;
    vertical-align: middle;
    color: var(--sd-text);
    border-bottom: 1px solid #ccc;
    overflow: hidden;   /* prevent cell content expanding column */
}
.sd-dash-table tbody tr:last-child td { border-bottom: none; }

/* Player column */
.sd-dash-table td.sd-dash-player-cell {
    vertical-align: middle;
}

.sd-dash-rank {
    text-align: center;
    vertical-align: middle !important;
}
.sd-dash-rank strong {
    font-size: 1.1rem;
    color: #fff;
    display: block;
    text-align: center;
}

.sd-dash-player { }  /* td is the container — no flex needed */
.sd-dash-name   { font-weight: 600; line-height: 1.3; display: block; }
.sd-dash-email  { font-size: .75rem; color: var(--sd-grey); line-height: 1.3; display: block; margin-top: .05rem; }
.sd-dash-name   { font-weight: 600; line-height: 1.3; }
.sd-dash-email  { font-size: .75rem; color: var(--sd-grey); line-height: 1.3; }

.sd-dash-prod-row {
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    font-size: .78rem;
    padding: .1rem 0;
    border-bottom: 1px solid #f5f5f5;
}
.sd-dash-prod-row:last-child { border-bottom: none; }
.sd-dash-prod-name { color: #444; }
.sd-dash-prod-count { font-weight: 700; color: var(--sd-primary); }

.sd-dash-win-row { display: flex; gap: .5rem; font-size: .78rem; margin-bottom: .2rem; }
.sd-dash-win-date { color: var(--sd-grey); }
.sd-dash-win-num  { font-weight: 700; color: var(--sd-green); }

.sd-dash-none { color: #ccc; }

/* Learnings card breakdown dropdown */
.sd-dash-card-learnings { position: relative; }

.sd-dash-learnings-toggle {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey) !important;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: 0 !important;
    margin: 0 auto;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.sd-dash-learnings-toggle:hover,
.sd-dash-learnings-toggle:active,
.sd-dash-learnings-toggle:focus,
.sd-dash-learnings-toggle:focus-visible {
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--sd-grey) !important;
    border: none !important;
}

.sd-dash-learnings-toggle .sd-chevron { transition: transform .2s; }
.sd-dash-learnings-toggle.sd-open .sd-chevron { transform: rotate(180deg); }

.sd-dash-learnings-breakdown {
    margin-top: .75rem;
    text-align: left;
    border-top: 1px solid #f0f0f0;
    padding-top: .6rem;
    width: 100%;
}

.sd-dash-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    padding: .2rem 0;
    border-bottom: 1px solid #f8f8f8;
}
.sd-dash-breakdown-row:last-child { border-bottom: none; }
.sd-dash-breakdown-name  { color: #444; }
.sd-dash-breakdown-count { font-weight: 700; color: var(--sd-primary); }

/* ── Missed draw banner ──────────────────────────────────────── */
.sd-missed-draw-banner {
    background: #fff8e6;
    border: 1px solid #ffd470;
    border-radius: var(--sd-radius);
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}

.sd-missed-draw-banner p { margin: 0; font-size: .9rem; color: #7a5300; }

.sd-btn-reveal-missed {
    background: #F7941E;
    color: #fff;
    padding: .55rem 1.4rem;
    font-size: .88rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 15px;
}

.sd-btn-close-results {
    background: transparent;
    border: 1px solid var(--sd-grey);
    color: var(--sd-grey);
    padding: .45rem 1.2rem;
    font-size: .82rem;
    margin-top: .6rem;
    border-radius: 15px;
}

.sd-btn-close-results:hover { background: var(--sd-grey-light); color: var(--sd-text); }

/* "This Week" label above badge number */
.sd-badge-week {
    display: block;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.7);
    margin-bottom: .1rem;
}

/* Total Learnings expand button in draw-numbers card */
/* Matches .sd-stat-row-label exactly so "Total Learnings" reads as a plain
   stat label, not a button, even though it's still clickable. */
.sd-stat-expand-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    line-height: 1.2;
}

.sd-stat-expand-btn .sd-chevron { transition: transform .2s ease; }
.sd-stat-expand-btn.sd-open .sd-chevron { transform: rotate(180deg); }

/* Total Learnings breakdown — plain list sitting BELOW the grey stats box,
   not a floating white card. No background/border/shadow of its own. */
.sd-learnings-dropdown {
    display: none;
    margin-top: .4rem;
    padding: 0 1rem;
    box-sizing: border-box;
}

.sd-learnings-dropdown.sd-open { display: block; }

.sd-learnings-dropdown ul { list-style: none; margin: 0; padding: 0; }
.sd-learnings-dropdown li {
    display: flex;
    justify-content: space-between;
    padding: .35rem 1rem;
    font-size: .82rem;
    border-bottom: 1px solid #f5f5f5;
}
.sd-learnings-dropdown li:last-child { border-bottom: none; }

/* ============================================================
   Auth forms (login / register / reset) — brand accent #29ABE2,
   consistent spacing, and overrides that defeat theme button styles.
   Placed last so it wins on source order as well as specificity.
   ============================================================ */

/* 1. Spacing — give the login/reset forms the same rhythm as registration.
   Registration wraps each field in .sd-form-row (margin-bottom 1.2rem), but the
   login/reset forms use bare .sd-field elements as direct children of .sd-form,
   which had no bottom margin. This adds the matching 1.2rem gap between the
   Email and Password fields and before the LOG IN button. */
.sd-form > .sd-field { margin-bottom: 1.2rem; }

/* Extra breathing room above the primary action, centered. */
.sd-form > .sd-submit-row { margin-top: 1.6rem; text-align: center; }

/* 2. Eye toggle — strip any theme button chrome so it reads as a clean icon
   sitting flush at the right inside the field box, in the brand colour. */
.sd-password-wrap .sd-eye-toggle {
    right: .85rem;
    margin: 0;
    padding: 0;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--sd-form-accent) !important;
}
.sd-password-wrap .sd-eye-toggle:hover,
.sd-password-wrap .sd-eye-toggle:focus,
.sd-password-wrap .sd-eye-toggle:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--sd-form-accent) !important;
}

/* 3. Buttons — force the brand orange + custom type treatment over the
   theme's default button styling, on both the Log In and Register popups. */
.sd-form .sd-btn-primary {
    background: #F7941E !important;
    border: none !important;
    border-radius: 15px !important;
    color: #fff !important;
    font-family: Roboto, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1em !important;
}
.sd-form .sd-btn-primary:hover:not(:disabled),
.sd-form .sd-btn-primary:focus:not(:disabled) {
    background: #F7941E !important;
    border-color: transparent !important;
    color: #fff !important;
    opacity: .9;
}

/* Per-button padding, as specified. */
#sd-login-btn.sd-btn-primary    { padding: 17px 37px 15px 37px !important; }
#sd-register-btn.sd-btn-primary { padding: 17px 25px 15px 25px !important; }

/* 4. Matching accent for focus rings and the "Forgot your password?" link hover. */
.sd-form .sd-field input:focus { border-color: var(--sd-form-accent) !important; }
.sd-form .sd-forgot-link:hover  { color: var(--sd-form-accent) !important; }

/* ── Prize Selection Modal ──────────────────────────────────────────────────── */

.sd-modal-prize-overlay {
    z-index: 100000; /* above other modals */
    padding: 1rem;
}
.sd-modal-prize-overlay.sd-modal-active {
    /* visibility handled by sd-modal-open — this just stacks above others */
}

.sd-prize-modal {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.5rem 1.75rem;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: sdPrizeIn .35s cubic-bezier(.175,.885,.32,1.275);
    position: relative;
}
@keyframes sdPrizeIn {
    from { opacity:0; transform:scale(.88) translateY(20px); }
    to   { opacity:1; transform:scale(1)   translateY(0); }
}

/* Progress dots */
.sd-prize-progress {
    text-align: center;
    margin-bottom: 1rem;
}
.sd-prize-progress-label {
    font-size: .8rem;
    color: #888;
    display: block;
    margin-bottom: .4rem;
}
.sd-prize-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.sd-prize-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    transition: background .2s;
}
.sd-prize-dot.active { background: #26258D !important; }
.sd-prize-dot.done   { background: #4caf50; }

/* Header */
.sd-prize-header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.sd-prize-trophy {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: .5rem;
    animation: sdTrophyBounce .6s .2s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes sdTrophyBounce {
    0%,100% { transform: translateY(0); }
    40%      { transform: translateY(-12px); }
    60%      { transform: translateY(-6px); }
}
.sd-prize-modal .sd-modal-title {
    font-size: 1.6rem;
    margin: 0 0 .4rem;
    color: #26258D !important;
}
.sd-prize-subtitle {
    font-size: .95rem;
    color: #555;
    margin: 0 0 .35rem;
}
.sd-prize-tier-badge {
    display: inline-block;
    background: #26258D !important;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.sd-prize-tier-badge.tier-1 { background: #c9a227 !important; } /* gold */
.sd-prize-tier-badge.tier-2 { background: #7d7d7d !important; } /* silver */
.sd-prize-tier-badge.tier-3 { background: #a0522d !important; } /* bronze */

.sd-prize-value {
    font-size: .9rem;
    color: #333;
    margin: 0;
}

/* Voucher options */
.sd-prize-instruction {
    font-size: .9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 .75rem;
}
.sd-voucher-options {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: 1.25rem;
}
.sd-voucher-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: .85rem 1rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
    user-select: none;
}
.sd-voucher-option:hover {
    border-color: #26258D !important;
    background: #f7f9fc;
}
.sd-voucher-option.selected {
    border-color: #26258D !important;
    background: #eef2f8;
}
.sd-voucher-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #26258D !important;
    flex-shrink: 0;
    cursor: pointer;
}
.sd-voucher-label {
    flex: 1;
}
.sd-voucher-name {
    font-weight: 600;
    font-size: .95rem;
    color: #222;
    display: block;
}
.sd-voucher-desc {
    font-size: .78rem;
    color: #777;
    margin-top: 2px;
    display: block;
}

/* Submit button */
.sd-btn-prize-submit {
    width: 100%;
    background: #26258D !important;
    color: #fff;
    border: none;
    border-radius: 15px;
    padding: .9rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s;
}
.sd-btn-prize-submit:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.sd-btn-prize-submit:not(:disabled):hover { opacity: .88; }

.sd-prize-note {
    text-align: center;
    font-size: .85rem;
    color: #555;
    margin: .85rem 0 0;
    padding: .75rem 1rem;
    background: #f0f7f0;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
}

/* ── Prize History Shortcode ─────────────────────────────────────────────── */

.sd-prize-history-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sd-prize-history-loading {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: .95rem;
}

.sd-prize-history-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #ddd;
    border-top-color: var(--sd-primary, #1e3a5f);
    border-radius: 50%;
    animation: sdSpin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes sdSpin { to { transform: rotate(360deg); } }

.sd-prize-history-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sd-primary, #1e3a5f);
    margin: 1.5rem 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid #f0f0f0;
}

.sd-unclaimed-heading { color: #c9a227; }

.sd-unclaimed-intro {
    font-size: .9rem;
    color: #555;
    margin: -.25rem 0 1rem;
}

.sd-prize-history-empty {
    text-align: center;
    color: #888;
    padding: 2rem 1rem;
    font-size: .95rem;
}

/* Prize cards */
.sd-prize-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.sd-prize-card-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.sd-prize-card-body {
    flex: 1;
    min-width: 0;
}

.sd-prize-card-title {
    font-weight: 700;
    font-size: .95rem;
    color: #222;
    margin: 0 0 3px;
}

.sd-prize-card-meta {
    font-size: .82rem;
    color: #777;
    margin: 0;
    line-height: 1.5;
}

.sd-prize-card-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .4px;
    vertical-align: middle;
    margin-left: 4px;
}
.sd-badge-tier-1 { background: #fff3cd; color: #856404; }
.sd-badge-tier-2 { background: #e8e8e8; color: #555; }
.sd-badge-tier-3 { background: #f3e5d0; color: #7d4a1a; }

.sd-prize-card-voucher {
    font-size: .85rem;
    color: #2e7d32;
    font-weight: 600;
    margin: 4px 0 0;
}

.sd-btn-claim-prize {
    background: var(--sd-primary, #1e3a5f);
    color: #fff;
    border: none;
    border-radius: 15px;
    padding: .55rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: opacity .15s;
}
.sd-btn-claim-prize:hover { opacity: .88; }

.sd-unclaimed-card { border-color: #c9a227; background: #fffdf0; }

/* Prize badge image variant — when a custom image replaces the text badge */
.sd-prize-tier-badge-img {
    background: none;
    padding: 0;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

/* ── Unclaimed Prizes Alert Button ──────────────────────────────────────── */

.sd-unclaimed-alert {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
}

.sd-btn-unclaimed-prizes {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #c9a227;
    color: #fff;
    border: none;
    border-radius: 15px;
    padding: .55rem 1.2rem;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: .02em;
    box-shadow: 0 2px 10px rgba(201,162,39,.35);
    animation: sdUnclaimedPulse 2.2s ease-in-out infinite;
    transition: opacity .15s;
}

.sd-btn-unclaimed-prizes:hover { opacity: .88; animation: none; }

@keyframes sdUnclaimedPulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(201,162,39,.35); }
    50%       { box-shadow: 0 4px 18px rgba(201,162,39,.65); }
}

/* In profile header — sit above the draw badge, full width of the badge col */
.sd-profile-badge-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
}
.sd-profile-badge-wrap .sd-unclaimed-alert {
    text-align: center;
}

/* Above the countdown — centre-aligned, breathing room below */
.sd-countdown-unclaimed {
    text-align: center;
    margin-bottom: .85rem;
}
.sd-countdown-unclaimed .sd-unclaimed-alert {
    margin: 0;
}
.sd-countdown-unclaimed .sd-btn-unclaimed-prizes {
    font-size: .9rem;
    padding: .65rem 1.4rem;
}

/* Prize modal close button */
.sd-prize-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.sd-prize-modal-close:hover {
    color: #555;
    background: #f0f0f0;
}

/* Draw badge background — orange in [sd_profile_header] only */
.sd-profile-header .sd-draw-badge {
    background: #F7941E;
}

/* ── Request Access Shortcode ─────────────────────────────────────────────── */
.sd-request-access-wrap {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 1.5rem 1rem;
}
.sd-access-denied-msg {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--sd-text, #1a1a1a);
    margin-bottom: .75rem;
}
.sd-access-form-intro {
    font-size: .9rem;
    color: #666;
    margin-bottom: 1.25rem;
}
.sd-request-access-form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    align-items: center;
}
.sd-access-email-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.sd-access-email-input:focus { border-color: var(--sd-primary, #1e3a5f); }
.sd-btn-request-access {
    width: 100%;
    justify-content: center;
    background: #F7941E !important;
    color: #fff !important;
    border: none !important;
}
.sd-access-result {
    margin-top: 1rem;
    padding: .85rem 1rem;
    background: #f0f7f0;
    border-left: 3px solid #4caf50;
    border-radius: 8px;
    font-size: .9rem;
    color: #2e7d32;
    text-align: left;
}

/* ── [sd_draw_entries] shortcode ─────────────────────────────────────────── */
.sd-draw-entries-block {
    width: 100%;
}

/* ── [sd_countdown] standalone ───────────────────────────────────────────── */
.sd-countdown-standalone .sd-spinner-countdown {
    text-align: center;
}

/* ── Quiz countdown sub-line ─────────────────────────────────────────────── */
.sd-quiz-countdown-wrap {
    display: block;
}
.sd-quiz-countdown-sub {
    text-align: center;
    min-height: 1.2em;
}
.sd-quiz-cd-sub {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--sd-grey);
}

/* ── [sd_quiz_play_button] ───────────────────────────────────────────────── */
.sd-quiz-play-btn-wrap {
    text-align: center;
    margin-top: .5rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.sd-quiz-play-btn {
    display: inline-flex;
    text-decoration: none;
    font-family: 'Roboto', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    background: var(--sd-orange) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(247,148,30,.4) !important;
    text-shadow: none !important;
    transition: filter .2s, transform .15s, box-shadow .2s !important;
}
.sd-quiz-play-btn:hover:not(.sd-quiz-play-btn--inactive) {
    filter: brightness(1.08);
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(247,148,30,.5) !important;
}
.sd-quiz-play-btn--inactive {
    opacity: .35 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
    filter: grayscale(40%) !important;
}

/* VIEW RESULTS link — same style as countdown label, underlined */
.sd-quiz-view-results-wrap {
    text-align: center;
    margin-top: .6rem;
}
.sd-quiz-view-results-link {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-grey);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.sd-quiz-view-results-link:hover {
    color: var(--sd-blue);
}
.sd-quiz-no-results {
    color: #bbb !important;
    text-decoration: none !important;
    cursor: default;
    pointer-events: none;
}

/* [sd_previous_draws] standalone wrapper — adds internal padding to match
   the streak box's 1rem horizontal inset */
.sd-prev-draws-standalone {
    padding: 0;
}
.sd-prev-draws-standalone .sd-prev-draws {
    margin-top: 0;
}

/* ── Question card white top panel ───────────────────────────────────────── */
.sd-question-top-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: calc(var(--sd-radius) - 2px) calc(var(--sd-radius) - 2px) 0 0;
    margin: -1.2rem -1.4rem 1rem -1.4rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--sd-card-blue);
    min-height: 120px;
    max-height: 120px;
    overflow: hidden;
    flex-shrink: 0;
}

/* Info button — matches card blue */
.sd-question-top-panel .sd-dyk-info-btn {
    position: static;
    width: 52px;
    height: 52px;
    background: var(--sd-card-blue, #26258D);
    border: 2px solid var(--sd-card-blue, #26258D);
    color: #fff;
    border-radius: 50%;
}
.sd-question-top-panel .sd-dyk-info-btn:hover {
    background: #fff;
    color: var(--sd-card-blue, #26258D);
}

/* ── Answered / limit tiles ───────────────────────────────────────────────── */

/* Tile answered correctly this cycle — greyed out, not clickable */
.sd-tile.sd-tile-completed {
    opacity: .35 !important;
    cursor: default !important;
    pointer-events: none !important;
    filter: grayscale(60%);
}

/* Tile locked due to weekly limit reached */
.sd-tile.sd-tile-limit {
    opacity: .25 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(80%);
}

/* Grid complete message — allow HTML/CSS styling via admin */
.sd-grid-complete-msg {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--sd-text, #1a1a1a);
    text-align: center;
    margin-top: .5rem;
}
.sd-grid-complete-msg p  { margin: 0 0 .75rem; }
.sd-grid-complete-msg:last-child { margin-bottom: 0; }

/* ── Admin dashboard leaderboard — breakdown toggle ─────────────────────── */
.sd-dash-breakdown-toggle {
    color: #F7941E !important;
    font-weight: 700 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    font-size: inherit;
    box-shadow: none !important;
    vertical-align: middle;
    outline: none !important;
}
.sd-dash-breakdown-toggle:hover,
.sd-dash-breakdown-toggle:active,
.sd-dash-breakdown-toggle:focus { opacity: 1 !important; outline: none !important; box-shadow: none !important; }

/* Win row in leaderboard */
.sd-dash-win-entry {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
    font-size: .82rem;
    line-height: 1.4;
}
.sd-dash-win-entry:last-child { border-bottom: none; margin-bottom: 0; }
.sd-dash-win-entry .sd-win-date { color: #888; display: block; }
.sd-dash-win-entry .sd-win-detail { font-weight: 600; color: var(--sd-text, #1a1a1a); }
.sd-dash-win-entry .sd-win-voucher { color: #555; font-weight: 400; }

/* ── Admin dashboard — alternating row colours ───────────────────────────── */
/* Alternating row background on tr — prevents extra-cell artefact when rows expand */
.sd-dash-table tbody .sd-row-odd td               { background: #f0f0f0; }
.sd-dash-table tbody .sd-row-odd td:first-child   { background: #b0b0b0; }
.sd-dash-table tbody .sd-row-odd td:nth-child(2)  { background: #f0f0f0; } /* player cell same as row */

.sd-dash-table tbody .sd-row-even td              { background: #ffffff; }
.sd-dash-table tbody .sd-row-even td:first-child  { background: #c8c8c8; }
.sd-dash-table tbody .sd-row-even td:nth-child(2) { background: #ffffff; }

/* Prevent double-line artefact — borders are on td, not tr */

/* ── Scroll list — max 5 items then scroll ───────────────────────────────── */
.sd-dash-scroll-list {
    max-height: 130px;   /* approx 5 items × 26px */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #F7941E #f0f0f0;
    margin-top: 4px;
    padding-right: 2px;
}
.sd-dash-scroll-list::-webkit-scrollbar        { width: 5px; }
.sd-dash-scroll-list::-webkit-scrollbar-track  { background: #f0f0f0; border-radius: 3px; }
.sd-dash-scroll-list::-webkit-scrollbar-thumb  { background: #F7941E; border-radius: 3px; }

.sd-dash-prod-breakdown {
    max-height: 130px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #F7941E #f0f0f0;
    margin-top: 4px;
}
.sd-dash-prod-breakdown::-webkit-scrollbar        { width: 5px; }
.sd-dash-prod-breakdown::-webkit-scrollbar-track  { background: #f0f0f0; border-radius: 3px; }
.sd-dash-prod-breakdown::-webkit-scrollbar-thumb  { background: #F7941E; border-radius: 3px; }

/* Wins more toggle — orange caret inline, no button chrome, no hover */
.sd-dash-wins-more-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1;
    display: inline;
    box-shadow: none;
    font-size: .85rem;
    outline: none;
}
.sd-dash-wins-more-toggle:hover,
.sd-dash-wins-more-toggle:active,
.sd-dash-wins-more-toggle:focus { outline: none; box-shadow: none; }

/* Kill WP admin focus/active dark box-shadow on all dashboard toggle buttons */
.sd-dash-breakdown-toggle:focus,
.sd-dash-breakdown-toggle:active,
.sd-dash-learnings-toggle:focus,
.sd-dash-learnings-toggle:active,
.sd-dash-wins-more-toggle:focus,
.sd-dash-wins-more-toggle:active {
    background: none !important;
    box-shadow: none !important;
    outline: 0 !important;
    border: none !important;
    color: inherit !important;
}

/* Padding right on scroll lists to give space between numbers and scrollbar */
.sd-dash-scroll-list,
.sd-dash-prod-breakdown {
    padding-right: 8px;
}

/* Result sub-message — shown below CORRECT / INCORRECT label */
.sd-result-sub {
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255,255,255,.92);
    margin: .3rem 0 .5rem;
    text-align: center;
    display: none;
}

/* DYK trigger button on incorrect result card */
.sd-result-dyk-trigger,
.sd-result-dyk-trigger:hover,
.sd-result-dyk-trigger:focus,
.sd-result-dyk-trigger:active,
.sd-result-dyk-trigger:visited {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    color: rgba(255,255,255,.92) !important;
    font-size: .9rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MONTHLY QUIZ — [sd_quiz] shortcode
   ═══════════════════════════════════════════════════════════════════════════ */

.sd-quiz-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ── State screens ───────────────────────────────────────────────────────── */
.sd-quiz-title          { font-size: 1.5rem; font-weight: 700; color: var(--sd-text); margin: 0 0 .5rem; text-align: center; }
.sd-quiz-dyk-intro      { font-size: .95rem; color: #555; text-align: center; margin-bottom: .5rem; }
.sd-quiz-closes         { font-size: .8rem; color: var(--sd-grey); text-align: center; margin-bottom: 1.25rem; }

/* ── Pre-quiz intro card ─────────────────────────────────────────────────── */
.sd-quiz-intro-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 2px 20px rgba(0,0,0,.10);
    color: var(--sd-text);
    border: 1px solid #e8e8e8;
}

/* Orange header bar */
.sd-quiz-intro-header {
    background: var(--sd-orange);
    padding: .65rem 1.5rem;
    text-align: center;
}
.sd-quiz-intro-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: #fff;
    margin: 0;
}

/* Body */
.sd-quiz-intro-body {
    padding: 1.75rem 2rem 2rem;
    text-align: center;
}

/* Trophy image slot */
.sd-quiz-intro-trophy {
    width: 140px;
    height: auto;
    margin: 0 auto .75rem;
    display: block;
}

/* Headline */
.sd-quiz-intro-headline {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--sd-text);
    margin: 0 0 1.25rem;
    text-transform: none;
    -webkit-text-stroke: 0;
}

/* Sub-text — hidden; prize box replaces it */
.sd-quiz-intro-sub { display: none; }

/* Prize value box */
.sd-quiz-intro-prize {
    background: #f2f2f2;
    border-radius: 12px;
    padding: 1rem 1.5rem .75rem;
    margin: 0 auto 1.25rem;
    max-width: 300px;
}
.sd-quiz-intro-prize-value {
    display: block;
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--sd-blue);
    line-height: 1;
    -webkit-text-stroke: 0;
}
.sd-quiz-intro-prize-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--sd-blue);
    margin-top: .3rem;
}

/* Rules lines */
.sd-quiz-intro-rules {
    list-style: none;
    padding: 0;
    margin: 0 0 .9rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.sd-quiz-intro-rules li {
    font-size: .95rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--sd-grey);
    line-height: 1.6;
}

/* One Attempt / Perfect Score badge */
.sd-quiz-intro-badge {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-blue);
    line-height: 1.7;
    margin: 0 0 1rem;
}
.sd-quiz-intro-badge strong {
    font-weight: 900;
}

/* Old bullet list — hidden */
.sd-quiz-intro-bullets { display: none; }

.sd-quiz-intro-card .sd-quiz-closes {
    color: var(--sd-grey);
    font-size: .78rem;
    text-align: center;
    margin-bottom: 1.25rem;
}

/* ── Gold start button ───────────────────────────────────────────────────── */
.sd-quiz-start-btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .95rem 2.5rem;
    border: none;
    border-radius: 50px;
    background: var(--sd-orange);
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(247,148,30,.4);
    transition: filter .2s, transform .15s, box-shadow .2s;
}
.sd-quiz-start-btn-gold:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(247,148,30,.5);
}
.sd-quiz-start-btn-gold:active { transform: translateY(0); }
.sd-quiz-start-btn-gold:disabled {
    background: #ccc;
    color: #888;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
    transform: none;
}
.sd-quiz-start-btn-gold svg { display: none; }
.sd-quiz-date-label     { text-align: center; color: var(--sd-grey); font-size: .85rem; margin: .5rem 0 .2rem; text-transform: uppercase; letter-spacing: .05em; }
.sd-quiz-date           { text-align: center; font-size: 1.2rem; font-weight: 700; color: var(--sd-blue); }
.sd-quiz-closed-label   { text-align: center; color: var(--sd-grey); margin-bottom: 1rem; }

/* ── DYK Carousel ────────────────────────────────────────────────────────── */
.sd-quiz-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 auto 1rem;
}
.sd-quiz-carousel-track {
    display: flex;
    transition: transform .35s ease;
}
.sd-quiz-dyk-card {
    flex: 0 0 20%;   /* 5 per view desktop */
    padding: .75rem;
    box-sizing: border-box;
}
@media (max-width: 767px) {
    .sd-quiz-dyk-card { flex: 0 0 100%; }
}
.sd-quiz-dyk-card .sd-quiz-dyk-img-wrap {
    text-align: center;
    margin-bottom: .75rem;
}
.sd-quiz-dyk-img {
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
}
.sd-quiz-dyk-product {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--sd-orange);
    font-weight: 700;
    margin: 0 0 .3rem;
    text-align: center;
}
.sd-quiz-dyk-fact {
    font-size: .9rem;
    line-height: 1.5;
    color: var(--sd-text);
    text-align: center;
    background: #f7f8fa;
    border-radius: 10px;
    padding: .75rem;
    margin: 0 0 .5rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-quiz-dyk-counter {
    text-align: center;
    font-size: .78rem;
    color: var(--sd-grey);
}
/* Mobile nav row is hidden by default; JS toggles it */
.sd-quiz-mobile-nav {
    display: none;
}

/* Carousel nav buttons */
.sd-quiz-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sd-blue);
    transition: background .15s;
}
.sd-quiz-carousel-btn:hover { background: #f0f0f0; }
.sd-quiz-carousel-btn:disabled { opacity: .3; cursor: default; }
.sd-quiz-prev { left: 0; }
.sd-quiz-next { right: 0; }

/* Desktop: push track inward so arrows don't overlay card edges */
@media (min-width: 768px) {
    .sd-quiz-carousel { padding: 0 44px; }
}

/* Mobile: pull arrows out of the absolute overlay and into a nav row */
@media (max-width: 767px) {
    .sd-quiz-carousel {
        overflow: visible;
        padding: 0;
    }
    .sd-quiz-carousel-track {
        overflow: hidden;
        border-radius: 10px;
    }
    .sd-quiz-carousel-btn {
        position: static;
        transform: none;
        flex-shrink: 0;
    }
    /* Row: prev-btn · counter · next-btn */
    .sd-quiz-mobile-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-top: .5rem;
    }
}

/* Carousel dots */
.sd-quiz-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 1.5rem;
}
@media (max-width: 767px) {
    .sd-quiz-dots { display: none; }
}
.sd-quiz-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s;
}
.sd-quiz-dot.active { background: var(--sd-orange); }

/* Start button */
.sd-quiz-start-btn {
    display: block;
    margin: 0 auto 1rem;
    min-width: 200px;
}
.sd-quiz-prev-attempts-note {
    text-align: center;
    font-size: .85rem;
    color: var(--sd-grey);
    margin-top: .5rem;
}
.sd-quiz-used-attempt {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
}
.sd-quiz-used-attempt-msg {
    color: #c62828;
    font-weight: 600;
    font-size: .95rem;
    margin: 0 0 .4rem;
}
.sd-quiz-used-attempt .sd-quiz-history-link {
    font-size: .85rem;
    color: var(--sd-blue);
}

/* ── Quiz popup modal ────────────────────────────────────────────────────── */
.sd-quiz-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.sd-quiz-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    display: flex;
    flex-direction: column;
}
.sd-quiz-modal-header {
    background: linear-gradient(135deg, #f5d020 0%, #c9920a 50%, #f5d020 100%);
    color: #5a3a00;
    padding: .75rem 1.25rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.sd-quiz-timer {
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.sd-quiz-progress {
    font-size: .82rem;
    opacity: .85;
}

@media (max-width: 600px) {
    .sd-quiz-modal-header {
        padding: .5rem .9rem;
    }
    .sd-quiz-timer {
        font-size: .9rem;
    }
    .sd-quiz-progress {
        font-size: .72rem;
    }
}

/* ── Info icon button (in modal header) ────────────────────────────────── */
.sd-quiz-info-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(90,58,0,.6) !important;
    cursor: pointer !important;
    flex-shrink: 0;
    box-shadow: none !important;
    outline: none !important;
    transition: color .15s !important;
}
.sd-quiz-info-btn:hover,
.sd-quiz-info-btn--active {
    background: transparent !important;
    border: none !important;
    color: #5a3a00 !important;
}

/* ── Key learning panel (inside modal body, matches option width) ───────── */
.sd-quiz-key-learning {
    background: #fff8e1;
    border: 1.5px solid var(--sd-orange);
    border-radius: 10px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}
.sd-quiz-key-learning-text {
    font-size: .88rem;
    color: var(--sd-text);
    line-height: 1.5;
    margin: 0;
}

.sd-quiz-modal-body {
    padding: 1.5rem;
    flex: 1;
}
.sd-quiz-q-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sd-text);
    margin: 0 0 1.25rem;
    line-height: 1.4;
}
.sd-quiz-options {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.sd-quiz-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #f7f8fa;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: .7rem 1rem;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, background .15s;
    width: 100%;
}
.sd-quiz-option:hover:not(:disabled) {
    border-color: var(--sd-blue);
    background: #f0f5ff;
}
.sd-quiz-opt-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5d020 0%, #c9920a 100%);
    color: #5a3a00;
    font-weight: 700;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sd-quiz-opt-text {
    font-size: .95rem;
    color: var(--sd-text);
    line-height: 1.3;
}

/* ── Mobile: compact question + options so all fit on screen ─────────────── */
@media (max-width: 600px) {
    .sd-quiz-modal-body {
        padding: 1rem .9rem;
    }
    .sd-quiz-q-text {
        font-size: .9rem;
        line-height: 1.3;
        margin-bottom: .85rem;
    }
    .sd-quiz-options {
        gap: .4rem;
    }
    .sd-quiz-option {
        padding: .5rem .75rem;
        gap: .6rem;
    }
    .sd-quiz-opt-letter {
        width: 24px;
        height: 24px;
        font-size: .72rem;
    }
    .sd-quiz-opt-text {
        font-size: .82rem;
        line-height: 1.25;
    }
}
.sd-quiz-opt-correct {
    border-color: #2e7d32 !important;
    background: #e8f5e9 !important;
}
.sd-quiz-opt-correct .sd-quiz-opt-letter {
    background: #2e7d32;
}
.sd-quiz-opt-wrong {
    border-color: #c62828 !important;
    background: #fdecea !important;
}
.sd-quiz-opt-wrong .sd-quiz-opt-letter {
    background: #c62828;
}

/* ── Results overlay ─────────────────────────────────────────────────────── */
.sd-quiz-results-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99991;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.sd-quiz-results-box {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.sd-quiz-results-title  { font-size: 1.5rem; font-weight: 700; color: var(--sd-blue); margin: 0 0 1rem; }
.sd-quiz-results-score  { font-size: 2rem; font-weight: 700; color: var(--sd-text); margin-bottom: .5rem; }
.sd-quiz-results-time   { font-size: 1.1rem; color: var(--sd-grey); margin-bottom: 1rem; }
.sd-quiz-results-msg    { font-size: .9rem; color: #555; line-height: 1.5; margin: 0 0 1.25rem; padding: .75rem 1rem; background: #fffdf4; border: 1px solid #e8d48b; border-radius: 8px; text-align: center; }

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.sd-quiz-leaderboard    { margin-top: 1rem; }
.sd-quiz-lb-title       { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; text-align: center; }
.sd-quiz-lb-row {
    display: grid;
    grid-template-columns: 40px 1fr 60px 60px;
    gap: .5rem;
    align-items: center;
    padding: .6rem .75rem;
    border-radius: 8px;
    margin-bottom: .3rem;
    background: #f7f8fa;
    font-size: .88rem;
}
.sd-quiz-lb-me          { background: #fff3cd; font-weight: 600; }
.sd-quiz-lb-rank        { font-weight: 700; color: var(--sd-blue); }
.sd-quiz-lb-score       { text-align: center; color: #2e7d32; font-weight: 700; }
.sd-quiz-lb-time        { text-align: right; font-weight: 600; }

/* ── Previous attempts history ───────────────────────────────────────────── */
.sd-quiz-history        { margin-top: 2rem; border-top: 1px solid #eee; padding-top: 1.5rem; max-width: 640px; margin-left: auto; margin-right: auto; }
.sd-quiz-history-title  { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.sd-quiz-attempt        { border: 1px solid #e8e8e8; border-radius: 10px; margin-bottom: .75rem; overflow: hidden; }

/* Structured column header — matches image 2 */
.sd-quiz-attempt-header {
    display: flex;
    align-items: stretch;
    background: #fff;
    font-size: .85rem;
    flex-wrap: nowrap;
}
.sd-quiz-att-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: .7rem .85rem;
    flex-shrink: 0;
    position: relative;
}
.sd-quiz-att-col + .sd-quiz-att-col::before {
    content: '';
    position: absolute;
    left: 0;
    top: .6rem;
    bottom: .6rem;
    width: 1px;
    background: #d8d8d8;
}
.sd-quiz-att-col--date   { min-width: 130px; }
.sd-quiz-att-col--score  { min-width: 70px; }
.sd-quiz-att-col--time   { min-width: 65px; }
.sd-quiz-att-col--winner { flex: 1; background: #fffdf4; min-width: 0; }
.sd-quiz-att-col--review { padding: .7rem .85rem; justify-content: flex-start; align-items: flex-start; flex-shrink: 0; }

.sd-quiz-att-label {
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--sd-grey);
    margin-bottom: .15rem;
    white-space: nowrap;
}
.sd-quiz-att-value {
    font-size: .88rem;
    font-weight: 800;
    color: var(--sd-text);
    line-height: 1.1;
    white-space: nowrap;
}
.sd-quiz-att-sub {
    font-size: .7rem;
    color: var(--sd-grey);
    margin-top: .1rem;
    white-space: nowrap;
}
.sd-quiz-att-winner-name {
    color: #b8860b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sd-quiz-att-tba {
    font-size: .75rem !important;
    font-weight: 500 !important;
    color: var(--sd-grey) !important;
    font-style: italic;
    white-space: normal;
}

@media (max-width: 600px) {
    .sd-quiz-attempt-header { flex-direction: column; flex-wrap: wrap; }
    .sd-quiz-att-col::before { display: none; }
    .sd-quiz-att-col { border-bottom: 1px solid #e8e8e8; }
    .sd-quiz-att-col:last-child { border-bottom: none; }
    .sd-quiz-att-value { font-size: 1.1rem; }
    .sd-quiz-att-winner-name { white-space: normal; }
}

.sd-quiz-attempt-score  { font-weight: 700; color: var(--sd-blue); }
.sd-quiz-attempt-date   { color: var(--sd-grey); font-size: .85rem; }
.sd-quiz-attempt-detail { padding: 1rem; }
.sd-quiz-att-q          { padding: .6rem 0; border-bottom: 1px solid #f0f0f0; font-size: .85rem; }
.sd-quiz-att-q:last-child { border-bottom: none; }
.sd-att-correct .sd-quiz-att-question { color: var(--sd-text); }
.sd-att-incorrect .sd-quiz-att-question { color: var(--sd-text); }
.sd-quiz-att-answer     { margin: .25rem 0 0; color: #555; }
.sd-att-tick            { color: #2e7d32; font-weight: 700; }

/* Review button — gold with right-side chevron */
.sd-quiz-attempt-toggle {
    background: transparent !important;
    border: 1.5px solid #b8860b !important;
    color: #b8860b !important;
    border-radius: 6px !important;
    padding: .3rem .8rem !important;
    font-size: .8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap;
    line-height: 1.4 !important;
    box-shadow: none !important;
    transition: background .15s, color .15s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .35rem !important;
}
.sd-quiz-attempt-toggle:hover,
.sd-quiz-attempt-toggle:focus {
    background: #b8860b !important;
    color: #fff !important;
    outline: none !important;
}
.sd-review-chevron {
    transition: transform .2s ease;
    flex-shrink: 0;
}
.sd-att-wrong-text      { color: #c62828; }
.sd-att-wrong-mark      { color: #c62828; font-weight: 700; }
.sd-att-correct-reveal  { display: inline-block; margin-top: .25rem; color: #2e7d32; font-size: .82rem; }
/* Remove old reveal button — no longer used */
.sd-att-reveal-btn      { display: none; }

/* ── Completed notice (shown instead of carousel after attempt) ───────── */
.sd-quiz-completed-notice {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
}
.sd-quiz-completed-msg {
    color: var(--sd-text);
    font-size: .95rem;
    max-width: 460px;
    margin: 0 auto .75rem;
    line-height: 1.55;
}
.sd-quiz-next-draw {
    font-size: .9rem;
    color: var(--sd-grey);
    margin: 0 auto .9rem;
}

/* Admin dashboard — platform access button pulled up next to page heading */
.sd-admin-dash-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-top: -3.2rem;   /* pulls up to align with the Elementor heading above */
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}
.sd-btn-platform-access {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #F7941E;
    color: #fff !important;
    text-decoration: none !important;
    padding: .55rem 1.25rem;
    border-radius: 15px;
    font-size: .88rem;
    font-weight: 700;
    transition: opacity .15s;
    white-space: nowrap;
}
.sd-btn-platform-access:hover { opacity: .88; color: #fff !important; }

/* ── Prize Fulfilment Table ─────────────────────────────────────────────── */
.sd-row-fulfilled { opacity: .65; }
.sd-row-fulfilled td { text-decoration: line-through; color: #888; }
.sd-row-fulfilled td input,
.sd-row-fulfilled td span.sd-ful-type-badge { text-decoration: none; }

.sd-ful-type-badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.sd-ful-type-weekly {
    background: #e8f0fe;
    color: #1a56db;
}
.sd-ful-type-quiz {
    background: #fff8e1;
    color: #b8860b;
}

/* ── Fulfilment tabs ─────────────────────────────────────────────────────── */
.sd-ful-tabs {
    display: flex;
    gap: .4rem;
}
.sd-ful-tab {
    background: transparent;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: .3rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--sd-grey);
    transition: all .15s;
}
.sd-ful-tab--active {
    background: var(--sd-blue);
    border-color: var(--sd-blue);
    color: #fff;
}
.sd-ful-tab-count {
    display: inline-block;
    background: rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 0 .4rem;
    font-size: .72rem;
    margin-left: .2rem;
}
.sd-ful-tab:not(.sd-ful-tab--active) .sd-ful-tab-count {
    background: #eee;
    color: #666;
}
