/*
Theme Name: Liverpool Bingo Hub Slate
Theme URI: https://liverpoolbingohub.uk
Author: Liverpool Bingo Hub
Description: Astra child theme for liverpoolbingohub.uk. Mersey slate palette, Space Grotesk headings, IBM Plex Sans body, tabular figures, 10px radii. Centred framed layout.
Template: astra
Version: 1.2.0
Text Domain: lbhslate
*/

:root {
    --lbh-bg: #eef1f5;
    --lbh-paper: #ffffff;
    --lbh-ink: #1c2630;
    --lbh-deep: #14365c;
    --lbh-accent: #e0684b;
    --lbh-muted: #5b6b7a;
    --lbh-rule: #cdd6e0;
    --lbh-radius: 10px;
    --lbh-measure: 1240px;
}

/* kill any horizontal overflow at every level: nothing may widen the canvas */
html, body { overflow-x: clip !important; max-width: 100vw !important; margin: 0 !important; padding: 0 !important; }
#page, #content, .site-content, .ast-container, body.ast-full-width-layout { overflow-x: clip !important; max-width: 100vw !important; margin-inline: auto !important; }

body {
    background: var(--lbh-bg);
    color: var(--lbh-ink);
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
}

h1, h2, h3, h4 { font-family: "Space Grotesk", sans-serif; color: var(--lbh-deep); line-height: 1.25; }

/* Astra flex-container trap: single centred measure, no flex squeeze */
#content .ast-container, .ast-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left;
}

/* one centred article column: explicit symmetric auto margins */
#primary, #main, .entry-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* article sheet: strictly CENTRED framed card with a comfortable reading measure */
.site-main {
    display: block !important;
    width: 100% !important;
    max-width: var(--lbh-measure) !important;
    flex: 1 1 auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    background: var(--lbh-paper);
    border: 1px solid var(--lbh-rule);
    border-radius: var(--lbh-radius);
    padding: 2rem 1.5rem;
    margin-block: 1.5rem;
    box-shadow: 0 6px 24px rgba(20, 54, 92, 0.08);
}
@media (min-width: 1024px) {
    .site-main { padding: 2.5rem 3rem; }
}
@media (max-width: 640px) {
    .site-main { width: calc(100% - 16px) !important; padding: 1.25rem 1rem; }
}

/* hide the empty parent masthead shell */
.ast-above-header, .ast-below-header, .site-header, #masthead { display: none !important; }

/* every inner block: centred measure with a frame */
.lbh-breadcrumb, .lbh-hero, .lbh-leadin, .lbh-contents,
.lbh-entry, .lbh-aside, .lbh-faq, .lbh-onward, .lbh-colophon,
.lbh-board-wrap, .lbh-calc, .lbh-tablewrap, .lbh-figure {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-inline: 0;
    box-sizing: border-box;
    text-align: left;
}

/* generic framed panel helper applied to content blocks */
.lbh-hero, .lbh-leadin, .lbh-contents, .lbh-faq, .lbh-onward,
.lbh-aside, .lbh-figure, .lbh-tablewrap {
    background: var(--lbh-paper);
    border: 1px solid var(--lbh-rule);
    border-radius: var(--lbh-radius);
    padding: 1.1rem 1.35rem;
    margin-block: 1.25rem;
}
.lbh-hero {
    background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 70%);
    border-top: 4px solid var(--lbh-deep);
    text-align: center;
}
.lbh-aside { border-left: 4px solid var(--lbh-accent); background: #fdf6f3; border-radius: 0 var(--lbh-radius) var(--lbh-radius) 0; }

/* section headings: framed with an accent rule */
.lbh-entry h2 {
    margin-top: 2.2rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid var(--lbh-rule);
    position: relative;
}
.lbh-entry h2::after {
    content: ""; position: absolute; left: 0; bottom: -2px;
    width: 72px; height: 2px; background: var(--lbh-accent);
}

/* header: full-bleed bar with a centred inner container */
.lbh-header { background: var(--lbh-deep); color: #fff; padding-block: 1rem 0.5rem; margin: 0; }
.lbh-header-inner { width: 97%; max-width: 1600px; margin-inline: auto; box-sizing: border-box; }
.lbh-brandline { text-align: center; margin: 0 0 0.5rem; }
.lbh-brand { color: #fff !important; font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; font-weight: 700; text-decoration: none; }
.lbh-tagline { display: block; color: #b9c7d6; font-size: 0.95rem; }

/* nav: ONLY the top-level list is a flex row (child combinator — submenus stay hidden) */
.lbh-nav { display: flex; justify-content: center; }
.lbh-nav > ul, .lbh-menu {
    display: flex !important; flex-wrap: wrap; justify-content: center;
    gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0;
}
.lbh-nav li, .lbh-item { position: relative; list-style: none; }
.lbh-nav > ul > li > a, .lbh-item > a {
    color: #eef2f7 !important;
    text-decoration: none;
    padding: 0.5rem 0.25rem;
    display: inline-block;
    white-space: nowrap;
    font-weight: 500;
    background: transparent;
}
.lbh-nav > ul > li > a:hover, .lbh-item > a:hover, .lbh-brand:hover { color: var(--lbh-accent) !important; }

/* dropdown submenus: hidden by default, high specificity beats the flex row rule */
.lbh-nav ul.lbh-sub, .lbh-nav ul.lbh-submenu, .lbh-sub, .lbh-submenu {
    display: none !important;
    position: absolute; left: 0; top: 100%;
    background: var(--lbh-paper); border: 1px solid var(--lbh-rule);
    border-radius: var(--lbh-radius); box-shadow: 0 8px 24px rgba(20,54,92,0.18);
    list-style: none; margin: 0; padding: 0.4rem 0; min-width: 15rem; z-index: 60;
    flex-direction: column;
}
.lbh-has-sub:hover > ul.lbh-sub, .lbh-has-sub:focus-within > ul.lbh-sub,
.lbh-has-sub:hover > ul.lbh-submenu, .lbh-has-sub:focus-within > ul.lbh-submenu {
    display: flex !important;
}
.lbh-sub li a, .lbh-submenu li a {
    display: block; padding: 0.4rem 1rem; color: var(--lbh-deep) !important;
    text-decoration: none; white-space: normal; background: transparent;
}
.lbh-sub li a:hover, .lbh-submenu li a:hover { background: var(--lbh-bg); color: var(--lbh-deep) !important; }

/* breadcrumb: inline-flex row, never framed-list styling */
.lbh-breadcrumb ol { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0.75rem auto; padding: 0; justify-content: center; }
.lbh-breadcrumb li { list-style: none; }
.lbh-breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--lbh-muted); }
.lbh-breadcrumb a { color: var(--lbh-deep); text-decoration: none; }

.lbh-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0.5rem 0; text-align: center; }
.lbh-standfirst { color: var(--lbh-muted); font-size: 1.15rem; margin-top: 0; text-align: center; }

.lbh-contents ol { columns: 2; margin: 0.4rem 0 0; padding-left: 1.2rem; }
.lbh-contents a { color: var(--lbh-deep); }

.lbh-entry h2 { margin-top: 2.2rem; }
.lbh-entry table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lbh-entry th, .lbh-entry td { border: 1px solid var(--lbh-rule); padding: 0.5rem 0.7rem; text-align: left; }
.lbh-entry thead th { background: var(--lbh-deep); color: #fff; }
.lbh-tablewrap { overflow-x: auto; padding: 0.75rem; }
.lbh-tablewrap table { min-width: 560px; }

.lbh-figure svg, .lbh-figure img { width: 100%; height: auto; display: block; }
.lbh-figcap { color: var(--lbh-muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* framed-list styling applies to lists that opt in; breadcrumb and menus exempt */
.lbh-entry ul.lbh-framed { background: var(--lbh-bg); border: 1px solid var(--lbh-rule); border-radius: var(--lbh-radius); padding: 1rem 1rem 1rem 2rem; }

/* FAQ: framed panel with divider lines between items */
.lbh-faq h3.lbh-q {
    font-size: 1.1rem; margin: 0 0 0.3rem;
    padding-top: 0.9rem; border-top: 1px dashed var(--lbh-rule);
}
.lbh-faq h3.lbh-q:first-child { border-top: 0; padding-top: 0; }
.lbh-faq p.lbh-a { margin: 0 0 1.1rem; }

.lbh-onward { border-top: 3px solid var(--lbh-deep); }
.lbh-colophon { border-top: 1px solid var(--lbh-rule); color: var(--lbh-muted); font-size: 0.9rem; padding-block: 1.5rem; text-align: center; }

/* footer: full-bleed bar with a centred inner container */
footer.site-footer { background: var(--lbh-deep); color: #c9d4e0; padding: 2rem 0; }
footer.site-footer a { color: #fff; }
.lbh-footer { background: var(--lbh-deep); color: #c9d4e0; padding: 2rem 0; }
.lbh-footer-inner { width: 97%; max-width: 1600px; margin-inline: auto; text-align: center; box-sizing: border-box; }
.lbh-footer-brand { color: #fff; font-family: "Space Grotesk", sans-serif; font-weight: 700; margin: 0 0 0.6rem; }
.lbh-footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.25rem; margin-bottom: 0.6rem; }
.lbh-footer-nav a { color: #e6ecf3 !important; text-decoration: none; }
.lbh-footer-nav a:hover { color: var(--lbh-accent) !important; }
.lbh-footer-note { font-size: 0.9rem; color: #b9c7d6; margin: 0; }

/* ============================================================
   SCOREBOARD (shortcode [lbh_board]) — framed offer cards grid
   ============================================================ */
.lbh-board { max-width: 100%; margin: 2rem auto; font-variant-numeric: tabular-nums; }
.lbh-board-title {
    font-size: 1.5rem; margin: 0 0 0.25rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.lbh-board-title::before {
    content: ""; display: inline-block; width: 8px; height: 1.4em;
    background: var(--lbh-accent); border-radius: 4px;
}
.lbh-board-note { color: var(--lbh-muted); font-size: 0.95rem; margin: 0 0 1.25rem; }

.lbh-board-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.lbh-card {
    display: flex; flex-direction: column; gap: 0.6rem;
    background: var(--lbh-paper);
    border: 1px solid var(--lbh-rule);
    border-radius: var(--lbh-radius);
    padding: 1.1rem 1.2rem;
    box-shadow: 0 2px 10px rgba(20, 54, 92, 0.05);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.lbh-card:hover { box-shadow: 0 8px 22px rgba(20, 54, 92, 0.12); transform: translateY(-2px); }
.lbh-card--top {
    border: 2px solid var(--lbh-accent);
    background: linear-gradient(180deg, #fff8f5 0%, #ffffff 55%);
}

.lbh-card__head {
    display: flex; align-items: center; gap: 0.6rem;
    padding-bottom: 0.6rem; border-bottom: 1px dashed var(--lbh-rule);
}
.lbh-rank {
    flex: none; font-family: "Space Grotesk", sans-serif; font-weight: 700;
    font-size: 0.85rem; color: var(--lbh-deep);
    background: var(--lbh-bg); border: 1px solid var(--lbh-rule);
    border-radius: 999px; padding: 0.15rem 0.55rem;
}
.lbh-card--top .lbh-rank { background: var(--lbh-accent); border-color: var(--lbh-accent); color: #fff; }
.lbh-brand {
    flex: 1; font-family: "Space Grotesk", sans-serif;
    font-size: 1.15rem; font-weight: 700; color: var(--lbh-deep);
}
.lbh-score {
    flex: none; display: inline-flex; align-items: baseline; gap: 1px;
    background: var(--lbh-deep); color: #fff;
    border-radius: 8px; padding: 0.25rem 0.6rem; line-height: 1;
}
.lbh-card--top .lbh-score { background: var(--lbh-accent); }
.lbh-score-num { font-size: 1.3rem; font-weight: 700; }
.lbh-score-den { font-size: 0.75rem; opacity: 0.75; }

.lbh-offer { margin: 0; font-weight: 600; color: var(--lbh-ink); }

.lbh-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lbh-chip {
    font-size: 0.78rem; color: var(--lbh-deep);
    background: var(--lbh-bg); border: 1px solid var(--lbh-rule);
    border-radius: 999px; padding: 0.15rem 0.6rem;
}

.lbh-note { margin: 0; color: var(--lbh-muted); font-size: 0.9rem; line-height: 1.5; }

.lbh-card__foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; margin-top: auto; padding-top: 0.6rem;
    border-top: 1px dashed var(--lbh-rule);
}
.lbh-licence { font-size: 0.78rem; color: var(--lbh-muted); white-space: nowrap; }
.lbh-btn {
    display: inline-block; text-align: center;
    background: var(--lbh-accent); color: #fff !important;
    font-weight: 600; font-size: 0.95rem;
    padding: 0.55rem 1.1rem; border-radius: 8px;
    text-decoration: none; transition: filter 0.15s ease;
}
.lbh-btn:hover, .lbh-btn:focus { filter: brightness(1.1); color: #fff !important; }

@media (max-width: 640px) {
    .lbh-board-list { grid-template-columns: 1fr; }
    .lbh-card__foot { flex-direction: column; align-items: stretch; text-align: center; }
    .lbh-contents ol { columns: 1; }
}