/* ✅ HARD LOCK FOOTER FONTS */
.footer {
    font-family: "Brother", sans-serif;
    background-color: rgb(var(--color-background));

    /* Optional global footer text sizing (hook these up via inline style later if you want) */
    --footer-text-size: 18px;
    --footer-text-size-mobile: 16px;

    font-size: var(--footer-text-size);
}

@media (max-width: 959px) {
    .footer {
        font-size: var(--footer-text-size-mobile);
    }
}

.footer__group {
    display: flex;
    flex-direction: column;
}

.footer :is(h1, h2, h3, h4, h5, h6, p, span, small, div, a, li, ul, ol, button, input, select, textarea, label) {
    font-family: inherit;
}

/* Newsletter wrapper */
.footer__email-subscribe {
    row-gap: 0 !important;
    width: 100%;
}

/* Custom text block title */
.footer__custom-text-title {
    padding-block-end: 15px;
    font-weight: 700;
}

@media (max-width: 959px) {
    .footer__custom-text-title {
        padding-block-start: 15px;
    }
}

/* ============================
   Newsletter headline/subheadline
   (richtext-safe)
   ============================ */

/* NEW markup classes */
.footer__email-subscribe-headline,
.footer__email-subscribe-subheadline {
    text-align: center;
    margin: 0;
}

/* Headline */
.footer__email-subscribe-headline {
    font-weight: 700;
    font-size: var(--footer-newsletter-headline-size, 48px);
    margin-top: 24px;
}

.footer__email-subscribe-headline.rte :is(p) {
    line-height: 0.5 !important;
}

/* Subheadline */
.footer__email-subscribe-subheadline {
    font-weight: 700;
    font-size: var(--footer-newsletter-subheadline-size, 24px);
    margin-bottom: 12px;
}

/* Richtext children: no default margins, inherit size */
.footer__email-subscribe-headline.rte :is(h1, h2, h3, h4, h5, h6, p, div, span),
.footer__email-subscribe-subheadline.rte :is(h1, h2, h3, h4, h5, h6, p, div, span) {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

/* Mobile sizing via vars */
@media (max-width: 959px) {
    .footer__email-subscribe-headline {
        font-size: var(--footer-newsletter-headline-size-mobile, 32px);
    }

    .footer__email-subscribe-subheadline {
        font-size: var(--footer-newsletter-subheadline-size-mobile, 18px);
    }
}

/* Backward-compatible: if old markup still uses footer__email-subscribe-title */
.footer__email-subscribe-title {
    font-weight: 700;
    text-align: center;
    font-size: var(--footer-newsletter-headline-size, 48px);
    margin-bottom: 0px;
    margin-top: 24px;
}

.footer__email-subscribe-title.rte :is(h1, h2, h3, h4, h5, h6, p, div, span) {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

@media (max-width: 959px) {
    .footer__email-subscribe-title {
        font-size: var(--footer-newsletter-headline-size-mobile, 32px);
    }
}

/* Newsletter form */
.footer__email-subscribe .field {
    margin-block-end: 0;
}

.footer__email-subscribe form {
    width: 100%;
}

.footer .tips-card {
    margin-block: 10px;
}

.footer__image img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    vertical-align: bottom;
}

.footer__localization-form form {
    display: contents;
}

@media (max-width: 959px) {
    .footer__localization-form .localization__selector {
        width: 100%;
    }
}

/* =========================================================
   Footer Newsletter Input (Restore Image 1 Layout)
   ========================================================= */

.footer__email-subscribe form {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Control the exact width */
.footer__email-subscribe .field {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    max-width: 640px;
    border: 1px solid rgb(var(--color-text));
    border-radius: 12px;
    padding: 4px;

    background: transparent;
}

@media (min-width: 960px){
    .footer__email-subscribe .field {
        padding: 8px;
        width: 100%;
        margin: 0 auto;
    }
}


/* Input stays inline */
.footer__email-subscribe input {
    flex: 1;
    border: 0 !important;
    outline: none !important;

    background: transparent;
    font-size: 18px;

    padding: 0;
}

.footer__email-subscribe .field label,
.footer__email-subscribe .field .field__label,
.footer__email-subscribe .field .field__label-text {
    font-size: 14px;
}

@media (min-width: 960px) {
    .footer__email-subscribe .field label,
        .footer__email-subscribe .field .field__label,
        .footer__email-subscribe .field .field__label-text {
            font-size: 16px;
        }
}

/* Submit icon stays INSIDE the field */
.footer__email-subscribe .field__button,
.footer__email-subscribe button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    margin-left: 12px;
    padding: 0;

    background: transparent !important;
    border: 0 !important;
}

/* =========================================================
   Footer Misc
   ========================================================= */

.footer__payment-icons>svg {
    width: auto;
    height: 22px;
}

.footer__social-media-title {
    font-weight: 700;
}

.footer__social-media-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer__copyright {
    text-align: center;
    margin-top: 20px;
}

.footer__newsletter-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 0px;
}

.footer__newsletter-logo img {
    width: var(--footer-newsletter-logo-width, 200px);
    max-width: 100%;
    height: auto;
    display: block;
}

.footer__social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--footer-social-icon-gap, 14px);
    margin-top: 20px;
}

.footer__social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--footer-social-icon-size, 34px);
    height: var(--footer-social-icon-size, 34px);
}

.footer__social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =========================================================
   ✅ Footer Navigation (Desktop row + visible children)
   Mobile: accordion ONLY when parent has children
   ========================================================= */

.footer__navigation {
    position: relative;
}

/* Reset list */
.footer__navigation-content,
.footer__nav-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Spacing */
.footer__navigation-item {
    padding-block-start: 15px;
}

/* Links inherit scheme */
.footer .footer__navigation,
.footer .footer__navigation a,
.footer .footer__navigation a:visited {
    color: rgb(var(--color-text));
}

.footer .footer__navigation a {
    text-decoration-color: currentColor;
}

.footer .footer__navigation a:hover,
.footer .footer__navigation a:focus-visible {
    color: rgb(var(--color-text));
    text-decoration: underline;
    text-underline-offset: 6px;
}

/* SVG icons in sync */
.footer .footer__navigation svg path,
.footer .footer__navigation svg line,
.footer .footer__navigation svg polyline {
    stroke: currentColor;
}

/* Desktop parent link style (no children case) */
.footer__nav-parent-link {
    display: inline-flex;
    font-weight: 700;
    text-decoration: none;
}

/* <details>/<summary> base */
.footer__nav-details {
    margin: 0;
    padding: 0;
}

.footer__nav-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.footer__nav-summary::-webkit-details-marker {
    display: none;
}

.footer__nav-summary::marker {
    content: "";
}

.footer__nav-parent-text {
    font-weight: 700;
}

.footer__nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Children list styling (when visible) */
.footer__nav-children {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__nav-child-link {
    display: inline-flex;
    text-decoration: none;
}

/* -------------------------
   ✅ DESKTOP FIX
   Force <details> content visible under parent by default
   ------------------------- */
@media (min-width: 960px) {

    /* Parents in a row */
    .footer__navigation-content {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
        gap: clamp(20px, 3vw, 56px);
    }

    .footer__navigation-item {
        padding-block-start: 0;
    }

    /* Make each parent a column */
    .footer__nav-details {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Hide accordion icon on desktop */
    .footer__nav-icon {
        display: none;
    }

    /* Summary behaves like a heading row (not a toggle) */
    .footer__nav-summary {
        cursor: default;
    }

    /* Optional: disable toggling on desktop */
    .footer__nav-summary {
        pointer-events: none;
    }

    /* Override UA stylesheet that hides details content unless [open] */
    .footer .footer__nav-details>ul.footer__nav-children {
        display: flex !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* -------------------------
   MOBILE: accordion behavior stays
   ------------------------- */
@media (max-width: 959px) {

    /* Keep parents stacked */
    .footer__nav-parent-link {
        display: block;
    }

    /* Give children a touch more separation */
    .footer__nav-children {
        padding-bottom: 8px;
    }
}

/* =========================================================
   Footer Nav: render desktop vs mobile versions
   ========================================================= */

@media (min-width: 960px) {
    .footer__nav-mobile {
        display: none !important;
    }

    .footer__nav-desktop {
        display: flex !important;
    }
}

@media (max-width: 959px) {
    .footer__nav-desktop {
        display: none !important;
    }

    .footer__nav-mobile {
        display: block !important;
    }
}

/* Desktop: parents in a row, children under each parent */
@media (min-width: 960px) {
    .footer__nav-desktop {
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
        gap: clamp(20px, 3vw, 56px);
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .footer__nav-desktop .footer__navigation-item {
        padding-block-start: 0;
    }

    .footer__nav-desktop .footer__nav-parent-link {
        display: inline-flex;
        font-weight: 700;
        text-decoration: none;
    }

    .footer__nav-desktop .footer__nav-children {
        margin-top: 14px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        list-style: none;
        padding: 0;
    }
}

/* Mobile: details/summary accordion styling */
@media (max-width: 959px) {
    .footer__nav-mobile {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .footer__nav-details {
        margin: 0;
        padding: 0;
    }

    .footer__nav-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
    }

    .footer__nav-summary::-webkit-details-marker {
        display: none;
    }

    .footer__nav-summary::marker {
        content: "";
    }

    .footer__nav-parent-text {
        font-weight: 700;
    }

    .footer__nav-children {
        margin-top: 12px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        list-style: none;
        padding: 0 0 8px 0;
    }
}

/* Respect color scheme for all footer nav links */
.footer .footer__navigation a,
.footer .footer__navigation a:visited {
    color: rgb(var(--color-text));
}

.footer .footer__navigation a:hover,
.footer .footer__navigation a:focus-visible {
    color: rgb(var(--color-text));
    text-decoration: underline;
    text-underline-offset: 6px;
}

.footer .footer__navigation svg path,
.footer .footer__navigation svg line,
.footer .footer__navigation svg polyline {
    stroke: currentColor;
}

/* Footer menu link color override (desktop + mobile) */
.footer__navigation :is(.footer__nav-parent-link,
    .footer__nav-child-link,
    .footer__nav-summary,
    .footer__nav-parent-text) {
    color: var(--footer-menu-link-color, rgb(var(--color-text))) !important;
}

.footer__email-subscribe > form > .field::after {
    position: unset;
    content: none;
}