
/* ==========================================================
   ELEGANT DRIVING ACADEMY
   MOBILE & TABLET NAVIGATION

   Blue: #234084
   Red:  #DC2C1D

   Mobile / Tablet: up to 992px
   Desktop: 993px and above

   File: assets/css/mobile-navigation.css
   ========================================================== */

/* Hide mobile navigation by default */

.eda-mobile-nav {
    display: none;
}

/* ==========================================================
   MOBILE AND TABLET NAVIGATION
   ========================================================== */

@media (max-width: 992px) {

    .eda-mobile-nav,
    .eda-mobile-nav * {
        box-sizing: border-box;
    }

    .eda-mobile-nav {
        display: block;
        position: relative;
        z-index: 100000;
        font-family: "Poppins", Arial, sans-serif;
    }

    /* ======================================================
       MOBILE HEADER - FIXED 66PX
       ====================================================== */

    .eda-mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 66px;
        padding: 0 15px;
        background: #ffffff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #e6ebf3;
        box-shadow: 0 2px 12px rgba(20, 40, 80, 0.07);
        z-index: 100001;
    }

    /* ======================================================
       ORIGINAL ELEGANT LOGO
       ====================================================== */

    .eda-mobile-topbar .eda-mobile-brand {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        flex: 0 1 185px;
        width: 185px;
        max-width: 185px;
        min-width: 0;
        height: 56px;
        margin-right: auto;
        padding: 0;
        text-decoration: none;
        overflow: hidden;
    }

    .eda-mobile-topbar .eda-mobile-logo {
        display: block !important;
        width: 185px !important;
        max-width: 100% !important;
        height: 52px !important;
        max-height: 52px !important;
        object-fit: contain;
        object-position: left center;
    }

    /* ======================================================
       WOOCOMMERCE SHOPPING CART ICON
       ====================================================== */

    .eda-mobile-topbar .cart-elegent-mobile-menu-upper {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        margin: 0 18px 0 0 !important;
        padding: 0 !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: transparent !important;
        z-index: 2 !important;
    }

    .eda-mobile-topbar .cart-elegent-bars {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        cursor: pointer;
    }

    .eda-mobile-topbar .subscript-count-1 {
        position: relative !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        color: #234084;
        font-size: 19px;
    }

    .eda-mobile-topbar .subscript-count-1 > i {
        color: #234084;
    }

    /* Cart count badge */

    .eda-mobile-topbar .subscript-count {
        position: absolute !important;
        top: -9px !important;
        right: -12px !important;
        min-width: 17px;
        height: 17px;
        padding: 0 3px;
        border-radius: 50%;
        background: #DC2C1D !important;
        color: #ffffff !important;
        font-size: 10px;
        line-height: 17px;
        text-align: center;
    }

    .eda-mobile-topbar .subscript-count[data-count="0"],
    .eda-mobile-topbar .subscript-count:empty {
        display: none !important;
    }

    /* ======================================================
       HAMBURGER BUTTON
       ====================================================== */

    .eda-mobile-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        gap: 5px;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid #e4e9f2;
        border-radius: 8px;
        background: #ffffff;
        cursor: pointer;
    }

    .eda-mobile-toggle span {
        display: block;
        width: 21px;
        height: 2px;
        background: #234084;
        border-radius: 2px;
    }

    /* ======================================================
       DARK BACKDROP
       ====================================================== */

    .eda-mobile-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(10, 22, 45, 0.56);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.25s ease,
            visibility 0.25s ease;
        z-index: 100002;
    }

    /* ======================================================
       RIGHT-SIDE SLIDING NAVIGATION DRAWER
       ====================================================== */

    .eda-mobile-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 380px);
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        background: #ffffff;
        box-shadow: -18px 0 55px rgba(15, 32, 70, 0.18);
        transform: translateX(105%);
        visibility: hidden;
        pointer-events: none;
        transition:
            transform 0.3s ease,
            visibility 0.3s ease;
        z-index: 100003;
    }

    /* Open navigation */

    .eda-mobile-nav.is-open .eda-mobile-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .eda-mobile-nav.is-open .eda-mobile-drawer {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    /* ======================================================
       DRAWER HEADER
       ====================================================== */

    .eda-mobile-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
        min-height: 70px;
        padding: 14px 19px;
        border-bottom: 1px solid #edf0f6;
        background: #ffffff;
    }

    .eda-mobile-drawer-brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.15;
    }

    .eda-mobile-drawer-brand strong {
        color: #DC2C1D;
        font-size: 20px;
        font-weight: 800;
        letter-spacing: 1.5px;
    }

    .eda-mobile-drawer-brand span {
        color: #234084;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 2.1px;
    }

    .eda-mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid #e9edf5;
        border-radius: 10px;
        background: #f4f6fb;
        color: #234084;
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
    }

    .eda-mobile-close:active {
        background: #e8edf7;
    }

    /* ======================================================
       DRAWER CONTENT
       ====================================================== */

    .eda-mobile-drawer-content {
        flex: 1;
        min-height: 0;
        padding: 18px 18px 24px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    .eda-mobile-drawer-content::-webkit-scrollbar {
        display: none;
    }

    .eda-mobile-section {
        margin-bottom: 21px;
    }

    .eda-mobile-section-title {
        margin-bottom: 12px;
        color: #234084;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 1.5px;
    }

    /* ======================================================
       CAR TRAINING ACCORDION
       ====================================================== */

    .eda-mobile-accordion {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 52px;
        padding: 0 13px 0 16px;
        border: 1px solid #e2e8f3;
        border-radius: 11px;
        background: #f6f8fc;
        color: #234084;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 1px;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .eda-mobile-accordion:active {
        background: #eef2f9;
    }

    .eda-mobile-accordion-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #DC2C1D;
        color: #ffffff;
        font-size: 20px;
        font-weight: 400;
        line-height: 1;
        box-shadow: 0 3px 8px rgba(220, 44, 29, 0.16);
    }

    .eda-mobile-course-links {
        padding: 8px 4px 0 13px;
    }

    .eda-mobile-course-links[hidden] {
        display: none !important;
    }

    .eda-mobile-course-links a {
        display: block;
        padding: 12px 7px;
        border-bottom: 1px solid #edf1f7;
        color: #344361;
        text-decoration: none;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.5;
    }

    .eda-mobile-course-links a:last-child {
        border-bottom: 0;
    }

    /* ======================================================
       STUDENT AND INSTRUCTOR PORTAL
       ====================================================== */

    .eda-mobile-portal-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .eda-mobile-portal-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 105px;
        padding: 13px 7px;
        border: 1px solid #dce5f3;
        border-radius: 11px;
        background: #ffffff;
        box-shadow: 0 4px 14px rgba(35, 64, 132, 0.045);
        text-align: center;
        text-decoration: none;
        color: #234084;
        transition:
            transform 0.2s ease,
            border-color 0.2s ease;
    }

    .eda-mobile-portal-card:active {
        transform: scale(0.98);
        border-color: #234084;
    }

    .eda-mobile-portal-icon {
        margin-bottom: 3px;
        color: #234084;
        font-size: 23px;
        line-height: 1.2;
    }

    .eda-mobile-portal-card strong {
        color: #234084;
        font-size: 11px;
        font-weight: 700;
    }

    .eda-mobile-portal-card small {
        color: #68748a;
        font-size: 9px;
        line-height: 1.4;
    }

    /* ======================================================
       BOOK LESSONS / CONTACT US
       ====================================================== */

    .eda-mobile-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 1px 0 24px;
    }

    .eda-mobile-actions a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        border-radius: 9px;
        color: #ffffff;
        text-decoration: none;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.7px;
        transition:
            transform 0.2s ease,
            filter 0.2s ease;
    }

    .eda-mobile-book-btn {
        background: #DC2C1D;
    }

    .eda-mobile-contact-btn {
        background: #234084;
    }

    .eda-mobile-actions a:hover {
        color: #ffffff;
        filter: brightness(0.95);
    }

    .eda-mobile-actions a:active {
        transform: scale(0.985);
    }

    /* ======================================================
       QUICK LINKS
       ====================================================== */

    .eda-mobile-quick-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .eda-mobile-quick-links a {
        display: flex;
        align-items: center;
        gap: 13px;
        min-height: 43px;
        padding: 9px 4px;
        border-bottom: 1px solid #edf1f6;
        color: #344361;
        font-size: 12px;
        font-weight: 500;
        text-decoration: none;
    }

    .eda-mobile-quick-links a span {
        width: 21px;
        flex-shrink: 0;
        color: #234084;
        font-size: 16px;
        text-align: center;
    }

    /* ======================================================
       PHONE SECTION
       ====================================================== */

    .eda-mobile-phone-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin: 5px 0 21px;
        padding: 15px 13px;
        border: 1px solid #edf0f7;
        border-radius: 11px;
        background: #f5f7fc;
    }

    .eda-mobile-phone-section > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .eda-mobile-phone-section small {
        color: #68748a;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.7px;
    }

    .eda-mobile-phone-section > div a {
        color: #234084;
        font-size: 15px;
        font-weight: 800;
        text-decoration: none;
    }

    .eda-mobile-call-btn {
        flex-shrink: 0;
        padding: 10px 12px;
        border: 1px solid #234084;
        border-radius: 8px;
        background: #ffffff;
        color: #234084;
        font-size: 11px;
        font-weight: 700;
        text-decoration: none;
    }

    /* ======================================================
       SOCIAL MEDIA
       ====================================================== */

    .eda-mobile-social-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 2px 16px;
        border-bottom: 1px solid #e9edf4;
    }

    .eda-mobile-social-section > span {
        color: #234084;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.8px;
    }

    .eda-mobile-social-links {
        display: flex;
        gap: 9px;
    }

    .eda-mobile-social-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 35px;
        border: 1px solid #dce5f3;
        border-radius: 50%;
        background: #ffffff;
        color: #234084;
        font-size: 14px;
        text-decoration: none;
        transition:
            background 0.2s ease,
            color 0.2s ease;
    }

    .eda-mobile-social-links a:active {
        background: #234084;
        color: #ffffff;
    }

    /* ======================================================
       TAGLINE
       ====================================================== */

    .eda-mobile-tagline {
        margin: 17px 0 0;
        color: #7b879a;
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 0.15px;
        text-align: center;
    }

    /* ======================================================
       FOCUS / ACCESSIBILITY
       ====================================================== */

    .eda-mobile-nav a:focus-visible,
    .eda-mobile-nav button:focus-visible {
        outline: 2px solid #DC2C1D;
        outline-offset: 3px;
    }

    .eda-mobile-nav a:hover {
        color: #DC2C1D;
    }

    .eda-mobile-actions a:hover {
        color: #ffffff;
    }

    /* ======================================================
       LOCK PAGE SCROLL WHEN MENU IS OPEN
       ====================================================== */

    body.eda-mobile-menu-open {
        overflow: hidden;
    }

    /* ======================================================
       HIDE FLOATING WHATSAPP WHILE DRAWER IS OPEN
       ====================================================== */

    body:has(.eda-mobile-nav.is-open) .whatsapp-button,
    body:has(.eda-mobile-nav.is-open) .whatsapp-float,
    body:has(.eda-mobile-nav.is-open) .floating-whatsapp,
    body:has(.eda-mobile-nav.is-open) .joinchat,
    body:has(.eda-mobile-nav.is-open) .wa__btn_popup,
    body:has(.eda-mobile-nav.is-open) .whatsapp_chat_support,
    body:has(.eda-mobile-nav.is-open) .whatsapp-floating,
    body:has(.eda-mobile-nav.is-open) a[href^="https://wa.me/"] {
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* ======================================================
       TABLET CART CLOSE BUTTON
       769PX - 992PX

       The close button follows the cart drawer visibility.
       ====================================================== */

    @media (min-width: 769px) {

        .cart-ttt .cross-icon-elegent {
            position: fixed !important;
            top: 78px !important;
            right: 18px !important;
            left: auto !important;

            display: flex !important;
            align-items: center !important;
            justify-content: center !important;

            width: 42px !important;
            height: 42px !important;

            background: #234084 !important;
            color: #ffffff !important;
            border-radius: 50% !important;

            z-index: 100020 !important;

            /* Follow the cart's actual visibility */
            visibility: inherit !important;
            opacity: 1;
            cursor: pointer;
        }

        .cart-ttt .cross-icon-elegent i {
            color: #ffffff !important;
            font-size: 20px !important;
        }
    }

}

/* ==========================================================
   DESKTOP - HIDE MOBILE NAVIGATION
   ========================================================== */

@media (min-width: 993px) {

    .eda-mobile-nav {
        display: none !important;
    }

}

/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .eda-mobile-drawer,
    .eda-mobile-backdrop,
    .eda-mobile-portal-card,
    .eda-mobile-actions a,
    .eda-mobile-accordion,
    .eda-mobile-close,
    .eda-mobile-social-links a {
        transition: none !important;
    }

}
