/* Cookie consent banner + settings (06 Nov 2026). Markup: partials/cookie-consent.inc */

.stp-cc {
    --cc-blue: #2773ae;
    --cc-blue-dark: #1d5a89;
    --cc-text: #333;
    --cc-muted: #555;
    --cc-line: #e3e3e3;
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--cc-text);
}

.stp-cc[hidden],
.stp-cc [hidden] {
    display: none !important;
}

html.stp-cc-open,
html.stp-cc-open body {
    overflow: hidden;
}

.stp-cc__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
}

.stp-cc__panel {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    padding: 24px 26px;
}

.stp-cc__settings {
    max-width: 640px;
}

.stp-cc__title {
    margin: 0 0 10px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    text-transform: none;
}

.stp-cc p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--cc-text);
}

.stp-cc a {
    color: var(--cc-blue);
    font-weight: 600;
    text-decoration: underline;
}

.stp-cc code {
    padding: 0 3px;
    font-size: 13px;
    color: #333;
    background: #f3f3f3;
    border: 0;
}

/* First-visit notice: wide card bottom right (sized like the EKM shop's), page dimmed but still
   scrollable and clickable (the dim lets clicks through). No dim on the policy page (.stp-cc--policy).
   Cookie settings (.is-settings) is the centred modal with a blocking backdrop. */
.stp-cc:not(.is-settings) {
    inset: auto 0 0 auto;
    padding: 32px;
    pointer-events: none;
}

.stp-cc:not(.is-settings) .stp-cc__backdrop {
    position: fixed;
    background: rgba(0, 0, 0, .45);
    pointer-events: none;
}

.stp-cc--policy:not(.is-settings) .stp-cc__backdrop {
    display: none;
}

.stp-cc__banner {
    width: 692px;
    max-width: calc(100vw - 64px);
    max-height: calc(100vh - 64px);
    padding: 20px 20px 22px;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
    pointer-events: auto;
}

.stp-cc__banner .stp-cc__title {
    margin-bottom: 8px;
    font-size: 16px;
}

.stp-cc__banner p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
}

.stp-cc__banner .stp-cc__buttons {
    gap: 8px;
    margin-top: 16px;
}

.stp-cc__banner .stp-cc__btn {
    min-height: 46px;
    padding: 10px 8px;
    font-size: 14px;
    border-radius: 5px;
}

/* Buttons */
.stp-cc__buttons {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.stp-cc__btn {
    flex: 1 1 0;
    min-height: 44px;
    padding: 10px 16px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: var(--cc-blue);
    border: 2px solid var(--cc-blue);
    border-radius: 6px;
    cursor: pointer;
    text-shadow: none;
    box-shadow: none;
}

.stp-cc__btn:hover {
    background: var(--cc-blue-dark);
    border-color: var(--cc-blue-dark);
}

.stp-cc__btn--outline {
    color: var(--cc-blue);
    background: #fff;
}

.stp-cc__btn--outline:hover {
    color: #fff;
}

.stp-cc__btn:focus-visible,
.stp-cc__toggle:focus-visible,
.stp-cc__close:focus-visible,
.stp-cc a:focus-visible,
.stp-cc__switch input:focus-visible + span {
    outline: 3px solid #f0a30a;
    outline-offset: 2px;
}

/* Close (settings only) */
.stp-cc__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 30px;
    line-height: 1;
    color: #555;
    background: none;
    border: 0;
    cursor: pointer;
}

.stp-cc__close:hover {
    color: #000;
}

.stp-cc__settings .stp-cc__title {
    padding-right: 40px;
}

/* Categories */
.stp-cc__cats {
    margin-top: 14px;
    border-top: 1px solid var(--cc-line);
}

.stp-cc__cat {
    padding: 14px 0 6px;
    border-bottom: 1px solid var(--cc-line);
}

.stp-cc__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stp-cc__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.stp-cc__chev {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px 4px 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .15s;
}

.stp-cc__toggle[aria-expanded="true"] .stp-cc__chev {
    transform: rotate(45deg);
}

.stp-cc__tag {
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #eee;
    border-radius: 10px;
}

.stp-cc__summary {
    margin-top: 4px !important;
    color: var(--cc-muted) !important;
    font-size: 14px !important;
}

.stp-cc__detail ul {
    margin: 0 0 10px 18px;
    padding: 0;
    font-size: 14px;
    color: var(--cc-muted);
}

.stp-cc__detail li {
    margin-bottom: 4px;
    line-height: 1.5;
}

/* On/off switch */
.stp-cc__switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}

.stp-cc__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.stp-cc__switch span {
    position: absolute;
    inset: 0;
    background: #bbb;
    border-radius: 13px;
    transition: background .15s;
    pointer-events: none;
}

.stp-cc__switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    transition: transform .15s;
}

.stp-cc__switch input:checked + span {
    background: var(--cc-blue);
}

.stp-cc__switch input:checked + span::after {
    transform: translateX(20px);
}

.stp-cc__switch input:disabled + span {
    opacity: .55;
}

.stp-cc__switch input:disabled {
    cursor: not-allowed;
}

/* Footer link */
.footer-cookie-link::before {
    content: "|";
    margin: 0 8px;
}

.footer-cookie-link button,
.footer-cookie-link a {
    color: inherit;
    text-decoration: underline;
}

/* Contact page map placeholder (until Functional consent) */
#contact-gmaps {
    clear: both;
    position: relative;
    max-width: calc(100% - 12px);
    background: #eef2f5;
}

.stp-map-consent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Open Sans', Arial, sans-serif;
}

.stp-map-consent p {
    max-width: 440px;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}

.stp-map-consent .stp-map-consent__title {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
}

.stp-map-consent .stp-cc__btn {
    flex: 0 0 auto;
    margin-bottom: 12px;
    --cc-blue: #2773ae;
    --cc-blue-dark: #1d5a89;
}

.stp-map-consent .stp-map-consent__alt {
    margin: 0;
    font-size: 13px;
}

@media (max-width: 600px) {
    .stp-cc__panel {
        padding: 20px 18px;
    }

    /* Phones: the notice spans the bottom of the screen */
    .stp-cc:not(.is-settings) {
        inset: auto 0 0 0;
        padding: 0;
    }

    .stp-cc__banner {
        width: 100%;
        max-width: none;
        max-height: 70vh;
        border-radius: 8px 8px 0 0;
        padding: 16px;
    }

    .stp-cc__buttons {
        flex-direction: column;
        gap: 10px;
    }

    .stp-cc__title {
        font-size: 19px;
    }
}
