/* Hide everything by default (desktop) */
.angie-slide-menu-toggle,
.angie-slide-menu-overlay,
.angie-slide-menu {
    display: none !important;
}

/* Show only on tablet and mobile (max-width: 1024px is standard tablet breakpoint) */
@media screen and (max-width: 1024px) {
    .angie-slide-menu-toggle {
        display: flex !important;
        position: fixed;
        /* Position at top right, centered vertically within a typical 80px header */
        top: 50%;
        transform: translateY(-50%);
        right: 15px;
        width: 56px; /* Increased from 48px to accommodate larger SVG */
        height: 56px; /* Increased from 48px */
        background-color: transparent;
        color: #000;
        border: none;
        border-radius: 4px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 9998;
        transition: background-color 0.3s ease;
    }

    /* Wrap the toggle in a container positioned at the top to allow vertical centering relative to header height */
    .angie-slide-menu-toggle-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        height: 80px; /* Adjust this to match your actual header height */
        width: 100%;
        pointer-events: none;
        z-index: 9998;
    }

    .angie-slide-menu-toggle {
        pointer-events: auto;
        position: absolute; /* Relative to wrapper now */
    }
    
    body.admin-bar .angie-slide-menu-toggle-wrapper {
        top: var(--wp-admin--admin-bar--height, 32px);
    }
    @media screen and (max-width: 782px) {
        body.admin-bar .angie-slide-menu-toggle-wrapper {
            top: 46px;
        }
    }

    .angie-slide-menu-toggle:hover {
        background-color: rgba(0,0,0,0.05);
    }

    .angie-slide-menu {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 80vw;
        height: 100vh;
        background-color: #fff;
        z-index: 10000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.05);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        flex-direction: column;
    }

    body.admin-bar .angie-slide-menu {
        top: var(--wp-admin--admin-bar--height, 32px);
        height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
    }
    @media screen and (max-width: 782px) {
        body.admin-bar .angie-slide-menu {
            top: 46px;
            height: calc(100vh - 46px);
        }
    }

    .angie-slide-menu.is-open {
        right: 0;
    }

    .angie-slide-menu-header {
        padding: 20px;
        display: flex;
        justify-content: flex-end;
        border-bottom: 1px solid #f0f0f0;
    }

    .angie-slide-menu-close {
        background: none;
        border: none;
        cursor: pointer;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
        transition: color 0.3s ease;
    }

    .angie-slide-menu-close:hover {
        color: #000;
    }

    .angie-slide-menu-content {
        padding: 30px 40px;
        overflow-y: auto;
    }

    .angie-slide-menu-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .angie-slide-menu-list li {
        margin-bottom: 20px;
    }

    .angie-slide-menu-list a {
        text-decoration: none;
        color: #333;
        font-size: 1.2rem;
        font-weight: 500;
        transition: color 0.3s ease;
        display: block;
    }

    .angie-slide-menu-list a:hover {
        color: #666;
    }

    .angie-slide-menu-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0,0,0,0.4);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .angie-slide-menu-overlay.is-active {
        opacity: 1;
        visibility: visible;
    }
}