/*
 * HSEQ Policy page (?p=policy) — the signed policy shown as a sheet of paper on
 * the grey pattern, opening full screen in PhotoSwipe.
 *
 * Every selector is anchored on #policyPage: style.css styles a:link/a:visited
 * at (0,1,1), so a bare class could not recolour the two action links.
 */

#policyPage {
    padding: 40px 16px 64px;
    text-align: center;
}

/* Intro */
#policyPage .policyIntro {
    max-width: 1100px;
    margin: 0 auto 28px;
}

#policyPage .policyEyebrow {
    color: #f39200;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

#policyPage h1 {
    margin: 10px 0 8px;
    color: #28292c;
    font-size: 34px;
    line-height: 1.15;
}

#policyPage .policyMeta {
    color: #5f6166;
    font-size: 15px;
    line-height: 1.5;
}

#policyPage .policyMetaItem {
    white-space: nowrap;
}

#policyPage .policyMetaSep {
    padding: 0 8px;
    color: #b0b2b6;
}

/* Actions */
#policyPage .policyActions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

#policyPage .policyBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0 22px;
    border: 1.5px solid #28292c;
    border-radius: 22px;
    background: #ffffff;
    color: #28292c;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

#policyPage .policyBtn:hover {
    background: #28292c;
    color: #ffffff;
}

#policyPage .policyBtn.primary {
    border-color: #f39200;
    background: #f39200;
    color: #ffffff;
}

#policyPage .policyBtn.primary:hover {
    border-color: #d98200;
    background: #d98200;
}

#policyPage .policyBtn svg,
#policyPage .policyHint svg,
#policyPage .policyTouchHint svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#policyPage .policySize {
    font-weight: normal;
    opacity: 0.7;
}

#policyPage .policyBtn:focus-visible,
#policyPage .policyZoom:focus-visible {
    outline: 3px solid rgba(243, 146, 0, 0.6);
    outline-offset: 3px;
}

/* The document */
#policyPage .policyDoc {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 2px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 14px 40px rgba(0, 0, 0, 0.18);
}

#policyPage .policyZoom {
    position: relative;
    display: block;
    border-radius: inherit;
    cursor: zoom-in;
}

#policyPage .policyZoom img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
}

/* "Click to enlarge": a pointer-only hint that fades in on hover, so it never
   sits on the policy text while someone is reading it */
#policyPage .policyHint {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 11px;
    border-radius: 20px;
    background: rgba(40, 41, 44, 0.85);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
}

#policyPage .policyZoom:hover .policyHint,
#policyPage .policyZoom:focus-visible .policyHint {
    opacity: 1;
    transform: none;
}

/* Touch screens get a caption above the document instead: nothing hovers there */
#policyPage .policyTouchHint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 14px;
    color: #5f6166;
    font-size: 14px;
}

@media (hover: none) {
    #policyPage .policyHint {
        display: none;
    }

    #policyPage .policyTouchHint {
        display: flex;
    }
}

@media (max-width: 600px) {
    #policyPage {
        padding: 28px 16px 40px;
    }

    #policyPage .policyIntro {
        margin-bottom: 20px;
    }

    #policyPage .policyEyebrow {
        font-size: 11.5px;
        letter-spacing: 0.08em;
    }

    #policyPage h1 {
        font-size: 27px;
    }

    /* One fact per line rather than a sentence broken mid-phrase */
    #policyPage .policyMeta {
        font-size: 14px;
    }

    #policyPage .policyMetaItem {
        display: block;
        white-space: normal;
    }

    #policyPage .policyMetaSep {
        display: none;
    }
}

@media (max-width: 420px) {
    #policyPage .policyActions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* PhotoSwipe, in the BMS charcoal rather than pure black */
.pswp {
    --pswp-bg: #1d1e20;
}

@media print {
    #policyPage {
        padding: 0;
        background: none;
        box-shadow: none;
    }

    #policyPage .policyActions,
    #policyPage .policyHint,
    #policyPage .policyTouchHint {
        display: none;
    }

    #policyPage .policyDoc {
        max-width: none;
        box-shadow: none;
    }
}
