/*
 * BZDZ – mobilne menu i przycisk kończący quiz.
 * Plik jest ładowany po głównym arkuszu Vite, dlatego nadpisuje starsze reguły.
 */

.brand-logo {
    display: block;
    width: 108px;
    height: auto;
    flex: 0 0 auto;
    object-fit: contain;
}

.mobile-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #202020;
    background: #ffffff;
    border: 1px solid #e5e1dc;
    border-radius: 7px;
    cursor: pointer;
}

.mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(238, 121, 0, .28);
    outline-offset: 2px;
}

.mobile-menu-icon {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.mobile-menu-icon-close {
    display: none;
}

.mobile-menu-toggle.is-open .mobile-menu-icon-open {
    display: none;
}

.mobile-menu-toggle.is-open .mobile-menu-icon-close {
    display: block;
}

@media (max-width: 700px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .navbar {
        position: relative;
        min-height: 68px;
        padding: 8px 0;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between;
        gap: 14px;
    }

    .brand {
        min-width: 0;
        gap: 0;
    }

    .brand-logo {
        width: 96px;
        max-height: 58px;
    }

    /* Na telefonie w nagłówku pozostaje tylko logo. */
    .brand-copy {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        left: -18px;
        right: -18px;
        z-index: 1100;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 18px 16px;
        background: #ffffff;
        border-top: 1px solid #e5e1dc;
        border-bottom: 1px solid #e5e1dc;
        box-shadow: 0 18px 35px rgba(32, 32, 32, .16);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links > a,
    .nav-links > form,
    .nav-links .nav-button {
        width: 100%;
    }

    .nav-links > a,
    .nav-links .nav-button {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: flex-start;
        padding: 11px 12px;
        color: #202020;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #f0ece7;
        border-radius: 0;
        box-shadow: none;
        font-size: 16px;
        font-weight: 700;
        text-align: left;
        text-decoration: none;
    }

    .nav-links > a.active {
        color: #c95e00;
        border-left: 4px solid #ee7900;
        padding-left: 10px;
    }

    .nav-links > a.button {
        min-height: 48px;
        margin-top: 10px;
        justify-content: center;
        color: #ffffff !important;
        background: #ee7900;
        border: 2px solid #ee7900;
        border-radius: 5px;
    }

    .nav-links form {
        margin: 0;
    }

    /*
     * Przycisk kończący quiz jest zwykłym elementem na samym dole formularza.
     * Nie przykleja się do ekranu i nie przesuwa razem z pytaniami.
     */
    .quiz-form .submit-bar {
        position: static !important;
        inset: auto !important;
        width: 100%;
        margin-top: 10px;
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        border-radius: 8px;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
    }

    .quiz-form .submit-bar .button {
        width: 100%;
        min-height: 56px;
        font-size: 18px;
    }

    .quiz-form .submit-bar strong {
        font-size: 19px;
    }

    .quiz-form .submit-bar span {
        font-size: 14px;
    }

    .quiz-question {
        scroll-margin-top: 86px;
    }
}

@media (max-width: 390px) {
    .brand-logo {
        width: 88px;
    }

    .mobile-menu-toggle {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }
}
