/* ==========================================================
   DLEELK AUTO
   Unified Customer + Company Account Navigation
   ========================================================== */

.account-menu-toggle {
    display: none;
}

.account-menu-navigation {
    display: block;
}

/* Desktop remains the existing sidebar experience. */
@media (min-width: 981px) {
    [data-account-menu-root] {
        overflow: visible;
        white-space: normal;
    }

    [data-account-menu-navigation] {
        display: block !important;
    }
}

/* Tablet + mobile */
@media (max-width: 980px) {

    .account-page {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    [data-account-menu-root].account-menu {
        position: static !important;
        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        box-sizing: border-box;

        overflow: hidden !important;
        overflow-x: hidden !important;

        white-space: normal !important;

        padding: 14px !important;

        border: 1px solid #eadfca;
        border-radius: 22px;

        background: #fff;

        box-shadow:
            0 18px 42px rgba(17, 24, 39, .07);
    }

    [data-account-menu-root] .account-user-box {
        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        box-sizing: border-box;

        margin: 0 !important;
        padding: 16px 18px;

        border-radius: 16px;

        background: #fff4dc;

        white-space: normal !important;
    }

    [data-account-menu-root] .account-user-box strong,
    [data-account-menu-root] .account-user-box span {
        display: block;

        max-width: 100%;

        white-space: normal !important;

        overflow-wrap: anywhere;
        word-break: normal;
    }

    [data-account-menu-root] .account-user-box strong {
        margin: 0;

        color: #111827;

        font-size: 16px;
        font-weight: 900;
        line-height: 1.45;
    }

    [data-account-menu-root] .account-user-box span {
        margin-top: 5px;

        color: #6b7280;

        font-size: 13px;
        font-weight: 800;
        line-height: 1.5;
    }

    [data-account-menu-root] .account-menu-toggle {
        display: flex !important;

        align-items: center;
        justify-content: space-between;

        gap: 12px;

        width: 100% !important;
        min-width: 0;

        min-height: 50px;

        box-sizing: border-box;

        margin: 10px 0 0 !important;
        padding: 11px 15px !important;

        border: 1px solid #eadfca !important;
        border-radius: 14px !important;

        background: #fff !important;
        color: #111827 !important;

        box-shadow:
            0 6px 18px rgba(17, 24, 39, .045);

        font: inherit;
        font-size: 14px;
        font-weight: 900;

        line-height: 1.4;

        text-align: start;

        cursor: pointer;

        appearance: none;
        -webkit-appearance: none;
    }

    [data-account-menu-root]
    .account-menu-toggle:hover {
        border-color: #d9c79e !important;

        background: #fffaf0 !important;
    }

    [data-account-menu-root]
    .account-menu-toggle:focus-visible {
        outline: 3px solid rgba(197, 138, 22, .18);
        outline-offset: 2px;
    }

    [data-account-menu-root]
    .account-menu-toggle svg {
        display: block;

        width: 20px;
        height: 20px;

        flex: 0 0 20px;

        color: #111827;

        transition: transform .2s ease;
    }

    [data-account-menu-root]
    .account-menu-toggle[aria-expanded="true"]
    svg {
        transform: rotate(180deg);
    }

    [data-account-menu-root]
    .account-menu-navigation {
        display: none !important;

        width: 100%;
        min-width: 0;
        max-width: 100%;

        box-sizing: border-box;

        margin: 10px 0 0;
        padding: 8px 0 0;

        overflow: hidden !important;

        border-top: 1px solid #f0e8db;
    }

    [data-account-menu-root]
    .account-menu-navigation.is-open {
        display: block !important;
    }

    [data-account-menu-root]
    .account-menu-navigation > a {
        display: flex !important;

        align-items: center;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        box-sizing: border-box;

        min-height: 46px;

        margin: 4px 0 !important;
        padding: 11px 14px !important;

        border-radius: 12px;

        background: transparent;

        color: #111827;

        font-size: 14px;
        font-weight: 850;

        line-height: 1.5;

        text-decoration: none;

        white-space: normal !important;

        overflow-wrap: anywhere;
    }

    [data-account-menu-root]
    .account-menu-navigation > a:hover {
        background: #faf7f1;
    }

    [data-account-menu-root]
    .account-menu-navigation > a.is-active {
        background: #fff1cf !important;
        color: #9a6500 !important;
    }

    [data-account-menu-root]
    .company-profile-incomplete {
        width: 100% !important;
        min-width: 0;

        box-sizing: border-box;

        white-space: normal !important;
    }
}

@media (max-width: 640px) {

    .account-page {
        width: min(
            calc(100% - 24px),
            1220px
        ) !important;
    }

    [data-account-menu-root].account-menu {
        padding: 12px !important;

        border-radius: 20px;
    }

    [data-account-menu-root] .account-user-box {
        padding: 15px 16px;

        border-radius: 15px;
    }

    [data-account-menu-root]
    .account-menu-toggle {
        min-height: 48px;

        padding:
            10px
            14px !important;
    }
}
