/* Frietzakjes Child - Mobile drawer + WP-specific fixes */

/* === Mobile drawer === */
.fz-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
    /* clip het off-canvas panel (translateX(100%)): zonder dit telt het paneel
       mee in de scrollable overflow en kan mobiel horizontaal scrollen */
    overflow: hidden;
}
.fz-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}
.fz-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.fz-drawer.is-open .fz-drawer__backdrop {
    opacity: 1;
}
.fz-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(340px, 86vw);
    background: #FAFAFA;
    box-shadow: -16px 0 32px rgba(0, 0, 0, 0.18);
    padding: 24px 22px;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.fz-drawer.is-open .fz-drawer__panel {
    transform: translateX(0);
}
.fz-drawer__close {
    align-self: flex-end;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
    color: #1a1a1a;
}
.fz-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}
.fz-drawer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    color: #1a1a1a;
    text-decoration: none;
    font-family: var(--font-primary, 'Bricolage Grotesque', sans-serif);
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px;
    transition: background 0.15s ease;
}
.fz-drawer__link:hover,
.fz-drawer__link:focus-visible {
    background: rgba(0, 0, 0, 0.06);
}
/* Icoontjes in drawer-links (bv. "Mijn Account") strak begrenzen; zonder deze
 * regel dijt een inline-SVG zonder width/height-attribuut uit tot de flex-breedte. */
.fz-drawer__link i,
.fz-drawer__link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/* === Drawer submenu-accordion (<details>/<summary>) ===
 * Voorheen ongestyled: de inline chevron-SVG (viewBox 16x16, geen width/height)
 * dijde uit tot ~200px en de subitems hadden geen layout. */
.fz-drawer__group {
    border-radius: 10px;
}
.fz-drawer__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}
.fz-drawer__summary::-webkit-details-marker {
    display: none;
}
.fz-drawer__chevron {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--color-text-secondary, #5A6670);
    transition: transform 0.2s ease;
}
.fz-drawer__group[open] > .fz-drawer__summary .fz-drawer__chevron {
    transform: rotate(180deg);
}
.fz-drawer__sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0 6px 12px;
}
.fz-drawer__sublink {
    display: block;
    padding: 10px 12px;
    color: var(--color-text-secondary, #5A6670);
    text-decoration: none;
    font-family: var(--font-primary, 'Bricolage Grotesque', sans-serif);
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: background 0.15s ease;
}
.fz-drawer__sublink:hover,
.fz-drawer__sublink:focus-visible {
    background: rgba(0, 0, 0, 0.06);
}
.fz-drawer__sublink--overview {
    font-weight: 600;
    color: var(--color-text, #1A1A1A);
}
body.fz-drawer-open {
    overflow: hidden;
}

/* Hamburger toggle alleen op mobile zichtbaar */
.header__menu-toggle {
    display: none;
}
@media (max-width: 1024px) {
    .header__menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 0;
        padding: 8px;
        cursor: pointer;
        color: #1a1a1a;
    }
    .nav,
    .header__actions {
        display: none;
    }
}

/* === WordPress admin bar offset (alleen wanneer ingelogd) === */
body.admin-bar .topbar {
    margin-top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .topbar {
        margin-top: 46px;
    }
}

/* === Beveiliging tegen Hello Elementor default container styling === */
.hello-elementor-default .topbar,
.hello-elementor-default .header,
.hello-elementor-default .footer {
    width: 100%;
}

/* === Reset button/details padding-defaults van WP+WC+Hello Elementor ===
 * Browser default <button> padding=0, maar WP global-styles + Hello Elementor
 * theme.css zetten 8px 16px. Dat brak .header__action-btn = 8px 16px ipv 0.
 * Reset hier specifiek voor onze header- en drawer-controls. */
.header__action-btn,
.header__menu-toggle,
.fz-drawer__close,
.lang-switcher summary {
    padding: 0;
}

/* lang-switcher gebruikt <details> + <summary> wat WP soms een list-style geeft */
.lang-switcher summary {
    list-style: none;
}
.lang-switcher summary::-webkit-details-marker {
    display: none;
}
