:root {
    --shell-brand: #6f42c1;
    --shell-brand-dark: #4c2a91;
    --shell-text: #24212b;
    --shell-muted: #5f5a68;
}

.mobile-header-actions,
.mobile-nav-drawer,
.mobile-nav-scrim {
    display: none;
}

.footer-section .text-muted,
.footer-section .footer-links a,
.footer-section .contact-info {
    color: #5f5a68 !important;
}

.footer-heading {
    font-weight: 700;
}

.my-tools-fab .fab-icon {
    align-items: center;
    background: var(--shell-brand);
    border: 0;
    border-radius: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    box-shadow: 0 10px 28px rgba(76, 42, 145, 0.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    height: 52px;
    justify-content: center;
    position: fixed;
    right: 22px;
    width: 52px;
    z-index: 1020;
}

@media (max-width: 991.98px) {
    .header-modern {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #fff !important;
        padding-bottom: 0.55rem !important;
        padding-top: 0.55rem !important;
    }

    .header-modern .container > .d-flex {
        flex-wrap: nowrap !important;
    }

    .header-modern .logo img {
        height: 34px;
    }

    .header-modern .nav-custom {
        display: none !important;
    }

    .mobile-header-actions {
        align-items: center;
        display: flex;
        gap: 6px;
        margin-left: auto;
    }

    .mobile-header-action {
        align-items: center;
        background: transparent;
        border: 1px solid rgba(76, 42, 145, 0.12);
        border-radius: 12px;
        color: var(--shell-text);
        display: inline-flex;
        height: 44px;
        justify-content: center;
        text-decoration: none;
        width: 44px;
    }

    .mobile-header-action svg {
        fill: none;
        height: 21px;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.9;
        width: 21px;
    }

    .mobile-header-action:hover,
    .mobile-header-action:focus-visible {
        background: #f3effa;
        color: var(--shell-brand-dark);
    }

    .mobile-nav-scrim.is-visible {
        background: rgba(25, 18, 34, 0.48);
        display: block;
        inset: 0;
        position: fixed;
        z-index: 1070;
    }

    .mobile-nav-drawer {
        background: #fff;
        box-shadow: -18px 0 46px rgba(30, 19, 43, 0.18);
        display: flex;
        flex-direction: column;
        height: 100dvh;
        max-width: 360px;
        overflow-y: auto;
        padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        top: 0;
        transform: translateX(104%);
        transition: transform 0.22s ease-out;
        width: min(88vw, 360px);
        z-index: 1075;
    }

    .mobile-nav-drawer.is-open {
        transform: translateX(0);
    }

    .mobile-nav-drawer__head {
        align-items: center;
        display: flex;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .mobile-nav-drawer__title {
        color: var(--shell-text);
        font-size: 1.08rem;
        font-weight: 750;
    }

    .mobile-nav-close {
        align-items: center;
        background: #f5f2f9;
        border: 0;
        border-radius: 12px;
        color: var(--shell-text);
        display: inline-flex;
        height: 44px;
        justify-content: center;
        width: 44px;
    }

    .mobile-nav-list {
        display: grid;
        gap: 3px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-nav-list a {
        align-items: center;
        border-radius: 11px;
        color: var(--shell-text);
        display: flex;
        font-weight: 600;
        min-height: 46px;
        padding: 10px 12px;
        text-decoration: none;
    }

    .mobile-nav-list a:hover,
    .mobile-nav-list a:focus-visible {
        background: #f2edfa;
        color: var(--shell-brand-dark);
    }

    .mobile-nav-section {
        border-top: 1px solid rgba(36, 33, 43, 0.1);
        margin-top: 14px;
        padding-top: 14px;
    }

    .mobile-nav-section__label {
        color: var(--shell-muted);
        font-size: 0.78rem;
        font-weight: 750;
        letter-spacing: 0.06em;
        margin-bottom: 9px;
        text-transform: uppercase;
    }

    .mobile-language-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-language-list a {
        align-items: center;
        background: #f5f2f9;
        border: 1px solid transparent;
        border-radius: 999px;
        color: var(--shell-text);
        display: inline-flex;
        min-height: 44px;
        padding: 8px 13px;
        text-decoration: none;
    }

    .mobile-language-list a.active {
        background: #eee5fb;
        border-color: rgba(111, 66, 193, 0.28);
        color: var(--shell-brand-dark);
        font-weight: 700;
    }

    .mobile-account {
        min-height: 44px;
    }

    .mobile-account .user-menu-container {
        width: 100%;
    }

    .mobile-account .user-menu-container > .login {
        justify-content: flex-start;
        min-height: 46px;
        width: 100%;
    }

    .mobile-account .user-name {
        display: inline !important;
        max-width: calc(100% - 72px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-account .user-dropdown-menu {
        inset: auto !important;
        margin-top: 8px !important;
        max-height: min(52vh, 460px);
        min-width: 0;
        overflow-y: auto;
        position: static !important;
        transform: none !important;
        width: 100%;
    }

    .mobile-account > .login {
        align-items: center;
        display: inline-flex;
        min-height: 44px;
        padding: 8px 10px;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    .my-tools-fab .fab-icon {
        bottom: max(16px, env(safe-area-inset-bottom));
        right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-drawer {
        transition: none;
    }
}
