/*
 * NDC plugin styles, 2.3.0
 * Colors and fonts come from the theme's --ndc-* custom properties. The
 * values after each comma are fallbacks, so the lists still look right
 * under any other theme.
 */

.ndc-list,
.ndc-review-block,
.ndc-recent-posts {
    --_navy: var(--ndc-navy, #0A2A66);
    --_red: var(--ndc-red, #C8102E);
    --_red-dark: var(--ndc-red-dark, #A00D25);
    --_ink: var(--ndc-ink, #0F1B33);
    --_text: var(--ndc-text, #3B4556);
    --_muted: var(--ndc-muted, #4F5A6B);
    --_faint: var(--ndc-faint, #6B7689);
    --_line: var(--ndc-line, #D9DEE8);
    --_bg: var(--ndc-bg, #F4F6FA);
    --_surface: var(--ndc-surface, #FFFFFF);
    --_ticket: var(--ndc-ticket, #EEF3FB);
    --_ticket-btn: var(--ndc-ticket-btn, #DCE6F7);
    --_chip: var(--ndc-chip, #EEF1F6);
    --_chip-us: var(--ndc-chip-us, #E3EBF8);
    --_display: var(--ndc-font-display, 'Archivo', system-ui, sans-serif);
    --_body: var(--ndc-font-body, 'Source Sans 3', system-ui, sans-serif);
    --_mono: var(--ndc-font-mono, 'JetBrains Mono', ui-monospace, monospace);
    font-family: var(--_body);
    color: var(--_ink);
}

.ndc-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* =========================================================
   LIST
   ========================================================= */

.ndc-list {
    container-type: inline-size;
    margin: 0 0 2rem;
}

.ndc-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.ndc-tools[hidden] { display: none; }

.ndc-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.ndc-pill {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1.5px solid #C5CCDA;
    background: var(--_surface);
    color: var(--_ink);
    font: 600 15px/1 var(--_body);
    cursor: pointer;
}
.ndc-pill:hover { border-color: var(--_navy); }
.ndc-pill .ndc-pill-count { color: var(--_muted); }
.ndc-pill[aria-pressed="true"] {
    background: var(--_navy);
    border-color: var(--_navy);
    color: #FFFFFF;
}
.ndc-pill[aria-pressed="true"] .ndc-pill-count { color: #FFFFFF; opacity: 0.75; }

.ndc-sort {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #E6EAF2;
}
.ndc-sort button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--_text);
    font: 600 15px/1 var(--_body);
    cursor: pointer;
}
.ndc-sort button[aria-pressed="true"] {
    background: var(--_surface);
    color: var(--_navy);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(10, 42, 102, 0.18);
}

.ndc-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Wide: one line per casino */
.ndc-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 150px 236px 180px;
    grid-template-areas:
        "id free bonus code claim"
        "id free bonus code review";
    column-gap: 28px;
    row-gap: 4px;
    align-items: center;
    margin: 0;
    padding: 20px 24px;
    background: var(--_surface);
    border: 1px solid var(--_line);
    border-radius: 14px;
}
.ndc-row[hidden] { display: none; }

.ndc-id     { grid-area: id; display: flex; align-items: center; gap: 16px; min-width: 0; }
.ndc-free   { grid-area: free; }
.ndc-bonus  { grid-area: bonus; }
.ndc-code   { grid-area: code; }
.ndc-claim  { grid-area: claim; align-self: end; }
.ndc-review-link { grid-area: review; align-self: start; }
.ndc-row:not(:has(.ndc-review-link)) .ndc-claim { grid-row: 1 / span 2; align-self: center; }

.ndc-rank {
    flex: 0 0 32px;
    font: 800 20px/1 var(--_display);
    color: var(--_faint);
    text-align: center;
}

.ndc-logo {
    flex: 0 0 auto;
    width: 72px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid var(--_line);
    background: #EEF2F8;
    object-fit: contain;
}
.ndc-logo-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font: 800 18px/1 var(--_display);
    color: var(--_navy);
}

.ndc-id-text { min-width: 0; }

.ndc-name {
    margin: 0 0 6px;
    font: 700 20px/1.2 var(--_display);
    color: var(--_navy);
}
.ndc-name a { color: inherit; text-decoration: none; }
.ndc-name a:hover { color: var(--_red); text-decoration: underline; }

.ndc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ndc-chip {
    font: 600 13px/1.6 var(--_body);
    color: var(--_text);
    background: var(--_chip);
    border-radius: 999px;
    padding: 1px 10px;
    white-space: nowrap;
}
.ndc-chip-us { color: var(--_navy); background: var(--_chip-us); }

.ndc-free, .ndc-bonus { display: flex; flex-direction: column; }
.ndc-big {
    font: 800 32px/1.05 var(--_display);
    color: var(--_red);
}
.ndc-free-none .ndc-big { color: var(--_faint); }
.ndc-mid {
    font: 700 22px/1.1 var(--_display);
    color: var(--_navy);
}
.ndc-sub { font-size: 14px; line-height: 1.4; color: var(--_muted); }

/* Code ticket */
.ndc-ticket {
    display: flex;
    align-items: stretch;
    border: 1.5px dashed var(--_navy);
    border-radius: 10px;
    background: var(--_ticket);
    overflow: hidden;
}
.ndc-ticket-body { flex: 1; min-width: 0; padding: 10px 14px; display: flex; flex-direction: column; }
.ndc-ticket-label {
    font: 700 11px/1.4 var(--_body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--_navy);
}
.ndc-ticket-code {
    font: 700 17px/1.3 var(--_mono);
    letter-spacing: 0.03em;
    color: var(--_ink);
    overflow-wrap: anywhere;
}
.ndc-ticket-plain {
    flex-direction: column;
    border-style: solid;
    border-color: var(--_line);
    background: var(--_bg);
    padding: 10px 14px;
}
.ndc-ticket-plain .ndc-ticket-label { color: var(--_muted); }
.ndc-ticket-text { font-weight: 700; font-size: 16px; }

.ndc-copy {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 48px;
    padding: 0 14px;
    border: 0;
    border-left: 1.5px dashed var(--_navy);
    background: var(--_ticket-btn);
    color: var(--_navy);
    font: 700 14px/1 var(--_body);
    cursor: pointer;
}
.ndc-copy:hover { background: #C9D8F2; }

/* Buttons and links */
.ndc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--_red);
    color: #FFFFFF;
    font: 700 16px/1.2 var(--_body);
    text-align: center;
    text-decoration: none;
}
.ndc-btn:hover, .ndc-btn:focus { background: var(--_red-dark); color: #FFFFFF; }

.ndc-review-link {
    display: block;
    padding: 4px 0;
    text-align: center;
    font: 600 14px/1.4 var(--_body);
    color: var(--_navy);
}
.ndc-review-link:hover { color: var(--_red); }

.ndc-not-recommended {
    display: inline-block;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 15px;
    color: #A3101F;
    border: 1.5px solid #A3101F;
    border-radius: 8px;
    text-align: center;
}

.ndc-show-all {
    display: none;
    width: 100%;
    min-height: 50px;
    margin-top: 14px;
    border-radius: 10px;
    border: 1.5px solid var(--_navy);
    background: var(--_surface);
    color: var(--_navy);
    font: 700 16px/1 var(--_body);
    cursor: pointer;
}

.ndc-list button:focus-visible,
.ndc-list a:focus-visible,
.ndc-review-block button:focus-visible,
.ndc-review-block a:focus-visible {
    outline: 3px solid #2F6FE0;
    outline-offset: 2px;
}

/* Medium: two lines per casino */
@container (max-width: 1040px) {
    .ndc-row {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "id     free  bonus"
            "code   code  claim"
            "code   code  review";
        row-gap: 12px;
    }
    .ndc-row:not(:has(.ndc-review-link)) .ndc-claim { grid-row: auto; }
}

/* Narrow: a card per casino */
@container (max-width: 640px) {
    .ndc-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "id     free"
            "code   code"
            "bonus  review"
            "claim  claim";
        row-gap: 14px;
        column-gap: 12px;
        padding: 16px;
    }
    .ndc-row:not(:has(.ndc-review-link)) .ndc-claim { grid-row: auto; }
    .ndc-row:not(:has(.ndc-review-link)) .ndc-bonus { grid-column: 1 / -1; }
    .ndc-id { gap: 12px; }
    .ndc-rank { flex-basis: 20px; font-size: 16px; }
    .ndc-logo { width: 56px; height: 44px; border-radius: 8px; }
    .ndc-logo-initials { font-size: 15px; }
    .ndc-name { font-size: 18px; margin: 0; }
    .ndc-chip-us { display: none; }
    .ndc-free { align-items: flex-end; text-align: right; }
    .ndc-big { font-size: 26px; }
    .ndc-free .ndc-sub { font-size: 12px; }
    .ndc-bonus { flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 6px; }
    .ndc-mid { font-size: 15px; font-family: var(--_body); }
    .ndc-bonus .ndc-sub { font-size: 14px; color: var(--_text); }
    .ndc-bonus .ndc-sub::first-letter { text-transform: uppercase; }
    .ndc-review-link { text-align: right; padding: 0; }
    .ndc-copy { min-width: 84px; min-height: 52px; font-size: 15px; }
    .ndc-btn { min-height: 50px; font-size: 17px; }
    .ndc-tools { flex-direction: column; align-items: stretch; }
    .ndc-sort { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ndc-sort button { min-height: 44px; }
    .ndc-list.is-collapsed .ndc-row:nth-child(n+9) { display: none; }
    .ndc-show-all:not([hidden]) { display: block; }
}

/* =========================================================
   REVIEW BLOCK ([show_casino])
   ========================================================= */

.ndc-review-block {
    max-width: 340px;
    background: var(--_surface);
    border: 1px solid var(--_line);
    border-radius: 18px;
    overflow: hidden;
    line-height: 1.5;
}

.ndc-rb-head {
    background: var(--_navy);
    border-bottom: 5px solid var(--_red);
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.ndc-rb-logo {
    width: 160px;
    height: 72px;
    border-radius: 12px;
    background: #FFFFFF;
    object-fit: contain;
}
.ndc-rb-logo.ndc-logo-initials { font-size: 22px; }
.ndc-rb-name { font: 700 22px/1.2 var(--_display); color: #FFFFFF; }
.ndc-rb-cta { width: 100%; min-height: 52px; font-size: 17px; }
.ndc-rb-head .ndc-not-recommended { color: #FFFFFF; border-color: #FFFFFF; }

.ndc-rb-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }

.ndc-rb-box {
    border: 1px solid var(--_line);
    border-radius: 12px;
    background: #F7F9FC;
    padding: 14px 16px;
}
.ndc-rb-nd { border: 1.5px dashed var(--_navy); background: var(--_ticket); }
.ndc-rb-special { border-color: var(--_red); background: #FDEEF0; }

.ndc-rb-label {
    font: 700 12px/1.4 var(--_body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--_muted);
}
.ndc-rb-nd .ndc-rb-label { color: var(--_navy); }
.ndc-rb-big { font: 800 36px/1.1 var(--_display); color: var(--_red); }
.ndc-rb-mid { font: 700 24px/1.2 var(--_display); color: var(--_navy); }
.ndc-rb-value { font-weight: 700; font-size: 17px; color: var(--_ink); }

.ndc-rb-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}
.ndc-rb-code .ndc-copy {
    min-height: 44px;
    min-width: 80px;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
}
.ndc-rb-code-text { font-weight: 700; }

.ndc-rb-facts {
    margin: 4px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.ndc-rb-facts > div { background: var(--_bg); border-radius: 10px; padding: 10px 12px; }
.ndc-rb-facts dt {
    font: 700 12px/1.4 var(--_body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--_muted);
}
.ndc-rb-facts dd { margin: 0; font-weight: 700; color: var(--_navy); }

.ndc-rb-verified {
    display: flex;
    justify-content: center;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid var(--_line);
}

/* =========================================================
   RECENT POSTS
   ========================================================= */

.ndc-recent-posts { margin: 0 0 2rem; }
.ndc-recent-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}
.ndc-recent-label { font: 800 24px/1.2 var(--_display); color: var(--_navy); }
.ndc-recent-all { font-weight: 700; color: var(--_red); }

.ndc-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.ndc-recent-card {
    background: var(--_surface);
    border: 1px solid var(--_line);
    border-radius: 14px;
    overflow: hidden;
}
.ndc-recent-img { display: block; aspect-ratio: 16 / 9; background: #EEF2F8; }
.ndc-recent-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ndc-recent-body { padding: 14px 16px 16px; }
.ndc-recent-title {
    display: block;
    font: 700 18px/1.3 var(--_display);
    color: var(--_navy);
    text-decoration: none;
    margin-bottom: 6px;
}
.ndc-recent-title:hover { color: var(--_red); text-decoration: underline; }
.ndc-recent-meta { font-size: 14px; color: var(--_muted); }
