/* Sidebar Drawer Base Styling */
.drawer-trigger-517a8df5 {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: #6EC1E4; /* Primary Site Theme Color */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

body.admin-bar .drawer-trigger-517a8df5 {
    top: calc(var(--wp-admin--admin-bar--height, 32px) + 24px);
}

@media screen and (max-width: 782px) {
    /* Fixed at the left side, slightly below the top search header area */
    .drawer-trigger-517a8df5 {
        position: fixed;
        top: 140px; /* Positioned slightly below the search area */
        bottom: auto;
        left: 16px;
        right: auto;
    }
    body.admin-bar .drawer-trigger-517a8df5 {
        top: calc(var(--wp-admin--admin-bar--height, 46px) + 140px);
        bottom: auto;
        left: 16px;
        right: auto;
    }
}

.drawer-trigger-517a8df5:hover {
    background-color: #54595F;
    transform: scale(1.05);
}

.bar-517a8df5 {
    width: 20px;
    height: 2px;
    background-color: #FFFFFF;
    transition: 0.3s;
}

/* Backdrop */
.drawer-backdrop-517a8df5 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999998;
}

body.admin-bar .drawer-backdrop-517a8df5 {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .drawer-backdrop-517a8df5 {
        top: 46px;
    }
}

.drawer-backdrop-517a8df5.is-active {
    opacity: 1;
    visibility: visible;
}

/* Panel Design */
.drawer-panel-517a8df5 {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background-color: #FFFFFF;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    font-family: 'Montserrat', sans-serif;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

body.admin-bar .drawer-panel-517a8df5 {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100% - var(--wp-admin--admin-bar--height, 32px));
}
@media screen and (max-width: 782px) {
    body.admin-bar .drawer-panel-517a8df5 {
        top: 46px;
        height: calc(100% - 46px);
    }
}

.drawer-panel-517a8df5.is-active {
    left: 0;
}

/* Header */
.drawer-header-517a8df5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #EEEEEE;
}

.drawer-logo-517a8df5 {
    font-size: 18px;
    font-weight: 700;
    color: #54595F;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.drawer-close-517a8df5 {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #7A7A7A;
    transition: color 0.2s;
    padding: 0;
}

.drawer-close-517a8df5:hover {
    color: #54595F;
}

/* Navigation lists */
.drawer-nav-517a8df5 {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.drawer-menu-517a8df5,
.drawer-secondary-menu-517a8df5 {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-menu-517a8df5 > li {
    border-bottom: 1px solid #F5F5F5;
}

.drawer-menu-517a8df5 a,
.drawer-menu-517a8df5 .submenu-toggle-517a8df5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 24px;
    text-decoration: none;
    color: #222222;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: color 0.2s, background-color 0.2s;
}

.drawer-menu-517a8df5 a:hover,
.drawer-menu-517a8df5 .submenu-toggle-517a8df5:hover {
    color: #6EC1E4;
    background-color: #FAFAFA;
}

/* Submenu Accordion */
.submenu-517a8df5 {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: #FAFAFA;
}

.submenu-517a8df5 a {
    padding: 12px 36px;
    font-size: 13px;
    font-weight: 400;
    color: #54595F;
}

.has-submenu-517a8df5.is-open .submenu-517a8df5 {
    max-height: 200px; /* Safe upper bound */
}

.chevron-517a8df5 {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.has-submenu-517a8df5.is-open .chevron-517a8df5 {
    transform: rotate(180deg);
}

/* Secondary menu at bottom */
.drawer-secondary-menu-517a8df5 {
    padding-top: 24px;
    border-top: 1px solid #EEEEEE;
    margin-top: auto;
}

.drawer-secondary-menu-517a8df5 a {
    display: block;
    padding: 10px 24px;
    text-decoration: none;
    color: #7A7A7A;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.drawer-secondary-menu-517a8df5 a:hover {
    color: #6EC1E4;
}

/* Prevent scroll on body when drawer is open */
body.drawer-open-517a8df5 {
    overflow: hidden;
}
