/**
 * Shell adapter.
 *
 * The shared shell (header.php / footer.php) is light. The theme's older
 * archive, single-post, sidebar, search and subscribe components were written
 * for the dark layout, so this file maps those component families onto the
 * light palette. It changes colour and surface only - never layout - so each
 * page keeps its existing structure and behaviour.
 *
 * Palette matches non-gamstop-page-3.css:
 *   text #1a1d24 · muted #5b6270 · heading #10131a
 *   border #e4e8ef · panel #f6f8fb · CTA #0a7d33 · link #1f6feb
 */

/* The dark body background must not show around the light shell. */
body.abp5-ngc-standalone,
html:has(body.abp5-ngc-standalone) {
    background: #ffffff;
}

/* ------------------------------------------------------------------ *
 * Content width
 *
 * theme.css sets `#primary.site-main { padding: 0 3% }`, which beats the
 * article's own 24px on id specificity and pushes the content 28px wider than
 * the nav and footer. Restated here so all three line up exactly.
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap #primary.site-main {
    /* theme.css also sets width:100% here; without border-box the padding is
       added on top of that and the content ends up wider than the viewport. */
    box-sizing: border-box;
    /* 1080 content + 2x24 padding, so the text column lines up exactly with
       the nav and footer inners rather than sitting 24px inside them. */
    max-width: 1128px;
    padding-left: 24px;
    padding-right: 24px;
    /* theme.css sets `margin: 0` here, which beats .abp5-ngc-article's
       `margin: 0 auto` on id specificity and leaves the column flush left
       instead of centred like the reference page. */
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 640px) {
    .abp5-ngc-wrap #primary.site-main {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* ------------------------------------------------------------------ *
 * Inner content wrappers
 *
 * The legacy templates each wrap their content in a container carrying its
 * own max-width and horizontal padding - 1290px/1400px caps, `0 20px`, and
 * `0 20%` on single posts. Those fight the shell and make pages sit at
 * different widths from the Non GamStop Casinos UK reference.
 *
 * Neutralising the horizontal constraints here makes .abp5-ngc-article the
 * single source of content width for every page. Vertical padding is left
 * alone, so each template keeps its own rhythm.
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap [class*="_content_wrap"],
.abp5-ngc-wrap [class*="_header_inner"],
.abp5-ngc-wrap [class*="_hero_inner"],
.abp5-ngc-wrap [class*="_pagination_wrap"],
.abp5-ngc-wrap .abp5_category_news_main,
.abp5-ngc-wrap .abp5_category_casino_grid,
.abp5-ngc-wrap .abp5_category_games_grid,
.abp5-ngc-wrap .abp5_category_bonus_grid,
.abp5-ngc-wrap .abp5_search_main,
.abp5-ngc-wrap .abp5_search_results,
.abp5-ngc-wrap .abp5_tag_header {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

/* ------------------------------------------------------------------ *
 * Typography inside the shell
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap h1,
.abp5-ngc-wrap h2,
.abp5-ngc-wrap h3,
.abp5-ngc-wrap h4,
.abp5-ngc-wrap h5,
.abp5-ngc-wrap h6 {
    color: #10131a;
}

/* ------------------------------------------------------------------ *
 * Legacy component families - surfaces and text
 *
 * Backgrounds are cleared so dark panels do not sit on the white shell.
 * Elements that legitimately carry an image background are excluded.
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap [class*="abp5_category_"],
.abp5-ngc-wrap [class*="abp5_single_"],
.abp5-ngc-wrap [class*="abp5_sidebar"],
.abp5-ngc-wrap [class*="abp5_news_sidebar"],
.abp5-ngc-wrap [class*="abp5_search_"],
.abp5-ngc-wrap [class*="abp5_post_"],
.abp5-ngc-wrap [class*="abp5_tag_"],
.abp5-ngc-wrap [class*="abp5_comment"] {
    color: #1a1d24;
}

.abp5-ngc-wrap [class*="abp5_category_"]:not([class*="image"]):not([class*="thumb"]):not([class*="bg"]),
.abp5-ngc-wrap [class*="abp5_single_"]:not([class*="image"]):not([class*="thumb"]):not([class*="bg"]):not([class*="hero"]),
.abp5-ngc-wrap [class*="abp5_sidebar"]:not([class*="image"]):not([class*="icon"]),
.abp5-ngc-wrap [class*="abp5_search_"]:not([class*="image"]):not([class*="thumb"]),
.abp5-ngc-wrap [class*="abp5_subscribe"]:not([class*="notification"]) {
    background-color: transparent;
}

/* Card-like elements get the shell's card treatment. */
.abp5-ngc-wrap [class$="_card"],
.abp5-ngc-wrap [class$="_card_inner"],
.abp5-ngc-wrap [class*="abp5_sidebar_section"],
.abp5-ngc-wrap [class*="abp5_search_result"] {
    background-color: #ffffff;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 19, 26, .04);
    overflow: hidden;
}

/* Muted secondary text. */
.abp5-ngc-wrap [class*="_meta"],
.abp5-ngc-wrap [class*="_excerpt"],
.abp5-ngc-wrap [class*="_date"],
.abp5-ngc-wrap [class*="_label"],
.abp5-ngc-wrap [class*="_caption"] {
    color: #5b6270;
}

/* Dividers and separators. */
.abp5-ngc-wrap [class*="_divider"],
.abp5-ngc-wrap [class*="_sep"] {
    background-color: #e4e8ef;
    border-color: #e4e8ef;
    color: #c3c9d4;
}

/* ------------------------------------------------------------------ *
 * Links
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap [class*="abp5_"] a:not(.abp5-ngc-btn):not([class*="_button"]):not([class*="_btn"]) {
    color: #1a1d24;
}

.abp5-ngc-wrap [class*="abp5_"] a:not(.abp5-ngc-btn):not([class*="_button"]):not([class*="_btn"]):hover {
    color: #1f6feb;
}

/* ------------------------------------------------------------------ *
 * Buttons and form controls
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap [class*="_button"],
.abp5-ngc-wrap [class*="_btn"]:not(.abp5-ngc-btn),
.abp5-ngc-wrap [class*="_submit"]:not(.abp5_contact_form_site1_submit) {
    background-color: #0a7d33;
    border-color: #0a7d33;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: none;
}

.abp5-ngc-wrap [class*="_button"]:hover,
.abp5-ngc-wrap [class*="_btn"]:not(.abp5-ngc-btn):hover,
.abp5-ngc-wrap [class*="_submit"]:not(.abp5_contact_form_site1_submit):hover {
    background-color: #086628;
    border-color: #086628;
    color: #ffffff;
}

.abp5-ngc-wrap input[type="text"],
.abp5-ngc-wrap input[type="email"],
.abp5-ngc-wrap input[type="url"],
.abp5-ngc-wrap input[type="tel"],
.abp5-ngc-wrap input[type="search"],
.abp5-ngc-wrap textarea {
    background-color: #ffffff;
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    color: #1a1d24;
}

.abp5-ngc-wrap input::placeholder,
.abp5-ngc-wrap textarea::placeholder {
    color: #9aa1ad;
}

/* ------------------------------------------------------------------ *
 * Pagination
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap .page-numbers {
    color: #1a1d24;
    border-color: #e4e8ef;
    background-color: #ffffff;
}

.abp5-ngc-wrap .page-numbers.current,
.abp5-ngc-wrap .page-numbers:hover {
    background-color: #0a7d33;
    border-color: #0a7d33;
    color: #ffffff;
}

/* ------------------------------------------------------------------ *
 * Media never overflows the content column
 * ------------------------------------------------------------------ */

.abp5-ngc-wrap img,
.abp5-ngc-wrap iframe,
.abp5-ngc-wrap video,
.abp5-ngc-wrap table {
    max-width: 100%;
}

.abp5-ngc-wrap img {
    height: auto;
}

/* Subscribe strip sits inline rather than as a dark full-bleed band. */
.abp5-ngc-wrap .abp5_subscribe {
    padding: 24px 0;
}

.abp5-ngc-wrap .abp5_subscribe_inner {
    max-width: none;
    padding: 0;
}
