/*
 * Wall Label look on every page except the front page (partial restyle).
 * Made still lays out the content; this sets fonts, colors and headings,
 * and places the shared side column (parts/site-column.php) where Made's
 * left header was. Loaded after Made's styles and column.css.
 */

/* ---- Made's own variables, pointed at the Wall Label tokens --------------- */

:root {
    --tb-column: 300px;
    --color-background: var(--tb-bg);
    --color-content-background: var(--tb-bg);
    --color-border: var(--tb-rule);
    --color-primary: var(--tb-ink);
    --color-primary-hover: var(--tb-accent-ink);
    --color-secondary: var(--tb-muted);
    --color-secondary-hover: var(--tb-accent-ink);
    --font-family-primary: var(--tb-sans);
    --font-family-secondary: var(--tb-sans);
    --font-family-sans-serif: var(--tb-sans);
    --font-family-headings: var(--tb-serif);
    --font-family-monospace: var(--tb-mono);
}

/* ---- Base ---------------------------------------------------------------- */
/* Made uses BEM-style classes (entry__title, entry__content, ...), and its
   Customizer prints inline rules like `.entry .entry__title`; selectors here
   are at least that specific. */

html body,
html body.custom-background {
    background: var(--tb-bg);
    color: var(--tb-ink);
    font-family: var(--tb-sans);
    -webkit-font-smoothing: antialiased;
}

body .entry__content,
body .entry__summary,
body .archive-header__description,
body .comment-content {
    font-family: var(--tb-sans);
    color: var(--tb-text-2);
    font-size: 17px;
    line-height: 1.6;
}

body .entry__content p,
body .entry__summary p {
    font-size: inherit;
    line-height: inherit;
}

body .entry__content a,
body .entry__summary a,
body .comment-content a {
    color: var(--tb-ink);
    text-decoration: underline;
    text-decoration-color: var(--tb-rule);
    text-underline-offset: 3px;
}

body .entry__content a:hover,
body .entry__summary a:hover,
body .comment-content a:hover {
    color: var(--tb-accent-ink);
    text-decoration-color: currentColor;
}

body :focus-visible {
    outline: 2px solid var(--tb-accent);
    outline-offset: 3px;
}

/* ---- Headings ------------------------------------------------------------ */

html body .entry .entry__title,
html body .archive-header .archive-header__title,
body .entry__content h1,
body .entry__content h2,
body .entry__content h3,
body .comments-title,
body .comment-reply-title,
body .pagination__title {
    font-family: var(--tb-serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--tb-ink);
    text-transform: none;
    /* Made hyphenates everything (body.use-hyphens); not on titles. */
    -webkit-hyphens: manual;
    hyphens: manual;
}

/* Single posts and pages: 40px, a little smaller on phones. */
html body .entry .entry__title {
    font-size: clamp(30px, 3.6vw, 40px);
    line-height: 1.08;
}

/* Post lists (blog, archives, search): smaller titles so long ones stay on
   one or two lines; matches the 30px card titles on the home page. */
html body.blog .entry .entry__title,
html body.archive .entry .entry__title,
html body.search .entry .entry__title {
    font-size: clamp(26px, 2.4vw, 32px);
    line-height: 1.1;
}

body .entry__title a {
    color: inherit;
    text-decoration: none;
}

body .entry__title a:hover {
    color: var(--tb-accent-ink);
}

html body .archive-header .archive-header__title {
    font-size: clamp(38px, 4.5vw, 48px);
    line-height: 1;
}

body .entry__content h2 {
    font-size: 34px;
    line-height: 1.1;
}

body .entry__content h3 {
    font-size: 26px;
    line-height: 1.15;
}

body .entry__content h4,
body .entry__content h5,
body .entry__content h6 {
    font-family: var(--tb-sans);
    font-weight: 600;
    color: var(--tb-ink);
}

/* ---- Small labels: dates, bylines, categories, read more ------------------ */

body .entry__meta,
body .entry__byline,
body .entry__published,
body .entry__author,
body .entry__terms,
body .entry__footer,
body .entry__meta a,
body .entry__byline a,
body .entry__terms a,
body .entry__footer a,
body .pagination a,
body .tb-artwork-details__title {
    font-family: var(--tb-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tb-muted);
}

body .entry__meta a:hover,
body .entry__byline a:hover,
body .entry__terms a:hover,
body .entry__footer a:hover,
body .pagination a:hover {
    color: var(--tb-accent-ink);
}

body .more-link,
body a.read-more,
body .read-more a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--tb-ink);
    border-radius: 999px;
    color: var(--tb-ink);
    font-family: var(--tb-sans);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
}

body .more-link:hover,
body a.read-more:hover,
body .read-more a:hover {
    background: var(--tb-ink);
    color: var(--tb-bg);
}

body hr,
body .entry {
    border-color: var(--tb-rule);
}

/* ---- Footer -------------------------------------------------------------- */
/* The footer line (.tb-footer, styled in column.css) is printed inside Made's
   content column, right after <main> (inc/site.php), so it shares the
   content's edges. Undo Made's pinned-footer styles. */

body .site-footer.tb-footer {
    position: static;
    float: none;
    clear: both;
    width: auto;
    height: auto;
    margin: 0;
    transform: none;
    background: transparent;
}

/* The shared column replaces Made's off-canvas mobile header at every width.
   On desktop Made parks it off-screen, where keyboard users would still tab
   through its hidden menu, so hide it completely. */
body #mobile-header,
body .mobile-header,
body .page-overlay {
    display: none !important;
}

/* ---- Side column placement (desktop) -------------------------------------- */

@media (min-width: 992px) {
    body.has-left-header #header.tb-side {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--tb-column);
        height: auto;
        padding: 48px 32px 48px 40px;
        overflow-y: auto;
        scrollbar-width: none;
        background: var(--tb-bg);
        border: 0;
        z-index: 50;
    }

    body.admin-bar.has-left-header #header.tb-side {
        top: 32px;
    }

    body.has-left-header .site-inner {
        float: none;
        width: auto;
        margin-left: var(--tb-column);
    }

}

/* ---- Narrow screens: column stacks above the content ---------------------- */

@media (max-width: 991.98px) {
    body.has-left-header #header.tb-side {
        display: flex !important;
        position: static;
        width: auto;
        height: auto;
        padding: 32px 16px 24px;
        background: var(--tb-bg);
        transform: none;
    }

    body.has-left-header .site-inner {
        float: none;
        width: 100%;
        margin-left: 0;
    }

    /* Content edges line up with the column above (16px from the screen
       edge, like the menu and the rule). Made adds 24px on .site-inner plus
       15px from Bootstrap's container/row/col; only this wrapper chain is
       touched, so grids inside the content keep their gutters. */
    body.has-left-header .site-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.has-left-header .site-inner > .content-sidebar-wrap > .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    body.has-left-header .site-inner > .content-sidebar-wrap > .container-fluid > .row {
        margin-left: 0;
        margin-right: 0;
    }

    body.has-left-header .site-inner > .content-sidebar-wrap > .container-fluid > .row > .content-area {
        padding-left: 0;
        padding-right: 0;
    }

    body.has-offcanvas-mobile-header .site-container {
        transform: none !important;
        padding-top: 0 !important;
    }
}

/* ---- "About this piece" box (TB Artwork Schema) --------------------------- */
/* More room between the lines (facts, materials, description, shown) and
   full-strength text: the plugin's 0.9em size, tight spacing and 85% opacity
   made the thin sans hard to read. */

body .tb-artwork-details {
    opacity: 1;
    color: var(--tb-text-2);
    font-size: 16px;
    line-height: 1.65;
    border-left-color: var(--tb-rule);
}

body .tb-artwork-details__name {
    color: var(--tb-ink);
    font-weight: 600;
}

body .tb-artwork-details__materials,
body .tb-artwork-details__description,
body .tb-artwork-details__shown {
    margin-top: 0.85em;
}

body .tb-artwork-details__item + .tb-artwork-details__item {
    margin-top: 1.75em;
    padding-top: 1.5em;
    border-top: 1px solid var(--tb-rule);
}

/* ---- [play_cards] grid inside page content (inc/play.php) ----------------- */
/* The card rules are in column.css; these undo Made's list, link and image
   styles inside .entry__content. */

/* The bottom margin keeps the cards off the footer rule, which has none of
   its own (a page ending in a paragraph gets the paragraph's 16px). */
body .entry__content .tb-grid {
    list-style: none;
    margin: 2em 0 48px;
    padding: 0;
}

body .entry__content .tb-grid > li {
    margin: 0;
    padding: 0;
}

body .entry__content .tb-grid > li::before {
    content: none;
}

body .entry__content .tb-tile,
body .entry__content .tb-tile:hover {
    box-sizing: border-box;
    color: var(--tb-ink);
    text-decoration: none;
}

body .entry__content .tb-tile:hover .tb-tile__title {
    color: var(--tb-accent-ink);
}

body .entry__content .tb-tile__media img {
    display: block;
    max-width: 100%;
    margin: 0;
}

body .entry__content .tb-tile__text {
    line-height: 1.5;
}
