/* Shared styling for the three customer policy pages (returns / shipping / size-guide).
 *
 * WHY ONE FILE RATHER THAN A <style> BLOCK PER PAGE: these three pages are near-identical in
 * structure and are going to be edited together whenever a policy changes. Three copies of the
 * same CSS is three places for them to drift apart visually.
 *
 * WHY THESE PAGES DO NOT REPLICATE THE SITE DRAWER/SIDEBAR: the Jolly Hooligan Website lane
 * (Seven) actively owns the homepage header, drawer and collection nav, and had uncommitted work
 * in those exact files when these pages were written (2026-10-12). Copying that markup here
 * would have created a second copy to keep in sync with a moving target. These pages inherit the
 * brand through css/jh-tokens.css and carry a single plain "back to the shop" link instead.
 * If the drawer is ever wanted here, that is the website lane's call to make, not a copy job.
 */

:root {
    --policy-max: 820px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--jh-font-storefront-body);
    background-color: var(--bg);
    background-image: var(--jh-page-bg-image);
    background-size: var(--jh-page-bg-size);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.65;
}

a {
    color: var(--accent-gold);
}

.policy-shell {
    max-width: var(--policy-max);
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
}

/* --- header ------------------------------------------------------------------------------- */

.policy-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0 1.75rem;
}

.policy-topbar img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex: 0 0 auto;
}

.policy-topbar a {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    opacity: 0.75;
}

.policy-topbar a:hover,
.policy-topbar a:focus-visible {
    opacity: 1;
}

h1 {
    font-family: var(--jh-font-policy-heading);
    font-size: clamp(2.1rem, 6vw, 3.1rem);
    letter-spacing: 0.02em;
    line-height: 1.05;
    margin: 0 0 0.6rem;
}

.policy-standfirst {
    font-size: 1.05rem;
    opacity: 0.85;
    margin: 0 0 2.25rem;
    max-width: 58ch;
}

h2 {
    font-family: var(--jh-font-policy-heading);
    font-size: clamp(1.35rem, 3.6vw, 1.75rem);
    letter-spacing: 0.03em;
    margin: 2.5rem 0 0.5rem;
    color: var(--accent-gold);
}

h3 {
    font-size: 1rem;
    margin: 1.5rem 0 0.35rem;
}

p {
    margin: 0 0 1rem;
}

/* --- panels ------------------------------------------------------------------------------- */

.policy-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    margin: 1.25rem 0;
}

.policy-panel > :last-child {
    margin-bottom: 0;
}

.policy-note {
    border-left: 3px solid var(--accent-blue);
    padding-left: 1rem;
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 1.25rem 0;
}

/* --- size tables -------------------------------------------------------------------------- */

.unit-toggle {
    display: inline-flex;
    gap: 0.25rem;
    margin: 0.5rem 0 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.25rem;
}

.unit-toggle button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    cursor: pointer;
}

.unit-toggle button[aria-pressed="true"] {
    background: var(--accent-gold);
    color: #14100a;
    font-weight: 600;
}

/* Wide tables scroll inside their own container -- the page body must never scroll sideways. */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.5rem 0 0.75rem;
}

table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

caption {
    text-align: left;
    font-size: 0.85rem;
    opacity: 0.7;
    padding-bottom: 0.5rem;
}

th,
td {
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.75;
    font-weight: 600;
}

tbody tr:last-child td {
    border-bottom: 0;
}

td:first-child {
    font-weight: 600;
}

.policy-footer {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 560px) {
    .policy-shell {
        padding: 1.25rem 1rem 3rem;
    }
}
