/* FAB styling */
.category-drawer-wrapper-18a1a8ea {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Ensure the wrapper doesn't block clicks */
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* Visibility toggles */
.fab-desktop-visibility-no .category-drawer-wrapper-18a1a8ea {
    display: none;
}
@media screen and (max-width: 768px) {
    .fab-mobile-visibility-no .category-drawer-wrapper-18a1a8ea {
        display: none !important;
    }
    .fab-desktop-visibility-no .category-drawer-wrapper-18a1a8ea {
        display: block; /* revert desktop hide if mobile is yes */
    }
    .fab-desktop-visibility-no.fab-mobile-visibility-no .category-drawer-wrapper-18a1a8ea {
        display: none !important;
    }
}

.fab-container-18a1a8ea {
    position: absolute;
    z-index: 10000;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.fab-container-18a1a8ea.is-dismissed {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.fab-trigger-18a1a8ea {
    border-radius: 50%;
    background-color: #d11e5d; /* Fallback, overridden by controls */
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fab-pulse-animation {
    animation: fab-pulse-18a1a8ea 2s infinite;
}

@keyframes fab-pulse-18a1a8ea {
    0% { box-shadow: 0 0 0 0 rgba(209, 30, 93, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(209, 30, 93, 0); }
    100% { box-shadow: 0 0 0 0 rgba(209, 30, 93, 0); }
}

.fab-trigger-18a1a8ea:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.fab-trigger-18a1a8ea svg {
    fill: #ffffff; /* Fallback */
    transition: transform 0.3s ease, opacity 0.3s ease;
    width: 40%; /* Scale icon with button */
    height: 40%;
    position: absolute;
}

.fab-icon-menu-18a1a8ea {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.fab-icon-close-18a1a8ea {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

/* When drawer is open, FAB can morph into a close button or we just hide it behind drawer.
   We will keep it visible but transform the icon */
.category-drawer-wrapper-18a1a8ea.is-drawer-open .fab-icon-menu-18a1a8ea {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.category-drawer-wrapper-18a1a8ea.is-drawer-open .fab-icon-close-18a1a8ea {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Dismiss Button */
.fab-dismiss-18a1a8ea {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
    padding: 0;
    transition: background-color 0.2s, transform 0.2s;
}

.fab-dismiss-18a1a8ea:hover {
    background-color: #f5f5f5;
    transform: scale(1.1);
}
.fab-dismiss-18a1a8ea svg {
    fill: #333;
}


/* Backdrop - CRITICAL FIX */
.drawer-backdrop-18a1a8ea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9998; 
    opacity: 0;
    visibility: hidden;
    /* When closed, pointer events MUST be none so it doesn't block the site */
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(3px); /* Modern touch */
    -webkit-backdrop-filter: blur(3px);
}

.drawer-backdrop-18a1a8ea.is-active {
    opacity: 1;
    visibility: visible;
    /* When open, it needs to capture clicks to close the drawer */
    pointer-events: auto;
}

/* Drawer */
.category-drawer-18a1a8ea {
    position: absolute;
    top: 0;
    left: 0;
    width: 340px; /* Desktop width */
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    transform: translateX(-100%); /* Hidden state */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* hardware accelerated */
    will-change: transform;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(0,0,0,0.15);
    /* We don't want the drawer itself to block interaction when it's hidden */
    visibility: hidden;
    pointer-events: none;
}

.fab-position-right .category-drawer-18a1a8ea {
    left: auto;
    right: 0;
    transform: translateX(100%);
    box-shadow: -4px 0 25px rgba(0,0,0,0.15);
}

.category-drawer-18a1a8ea.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Header */
.drawer-header-18a1a8ea {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px; 
    border-bottom: 1px solid #eeeeee;
    flex-shrink: 0;
    background-color: #fff;
    z-index: 2;
}

.drawer-logo-link-18a1a8ea {
    display: flex;
    align-items: center;
    max-width: 80%; /* Ensure it doesn't overlap with close button */
}

/* Adjusted logo default state */
.drawer-logo-18a1a8ea {
    display: block;
    max-height: 50px; /* Max height to prevent blowing up the header */
}

.drawer-close-18a1a8ea {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.drawer-close-18a1a8ea:hover {
    background-color: #f0f0f0;
    transform: rotate(90deg);
}

.drawer-close-18a1a8ea svg {
    fill: #333;
}

.drawer-content-scroll-18a1a8ea {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 30px;
}

/* Scrollbar styling for drawer */
.drawer-content-scroll-18a1a8ea::-webkit-scrollbar {
    width: 6px;
}
.drawer-content-scroll-18a1a8ea::-webkit-scrollbar-track {
    background: transparent;
}
.drawer-content-scroll-18a1a8ea::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}
.drawer-content-scroll-18a1a8ea::-webkit-scrollbar-thumb:hover {
    background: #c0c0c0;
}


/* List */
.category-list-18a1a8ea {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.category-list-item-18a1a8ea {
    border-bottom: 1px solid #f5f5f5;
}

.category-item-wrapper-18a1a8ea {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: background-color 0.2s ease;
}

.category-item-wrapper-18a1a8ea:hover {
    background-color: #fbfbfb;
}

.category-item-18a1a8ea {
    display: block;
    padding: 16px 0;
    text-decoration: none;
    color: #333333;
    font-size: 1.05rem;
    font-weight: 500;
    transition: color 0.2s ease;
    flex-grow: 1;
}

.category-item-wrapper-18a1a8ea:hover .category-item-18a1a8ea {
    color: #d11e5d; /* Fallback */
}

/* Sub-categories */
.sub-category-toggle-18a1a8ea {
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    border-radius: 50%;
}
.sub-category-toggle-18a1a8ea:hover {
    background-color: #f0f0f0;
}
.sub-category-toggle-18a1a8ea svg {
    fill: #666;
    transition: transform 0.3s ease;
}

.category-list-item-18a1a8ea.is-expanded .sub-category-toggle-18a1a8ea svg {
    transform: rotate(180deg);
}

.sub-category-list-18a1a8ea {
    list-style: none;
    margin: 0;
    padding: 0 0 0 30px; /* indent */
    display: none; /* hidden by default */
    background-color: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.sub-category-item-18a1a8ea {
    display: block;
    padding: 12px 20px 12px 0;
    text-decoration: none;
    color: #555555;
    font-size: 0.95rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}
.sub-category-list-18a1a8ea li:last-child .sub-category-item-18a1a8ea {
    border-bottom: none;
}

.sub-category-item-18a1a8ea:hover {
    color: #d11e5d;
    padding-left: 5px; /* Subtle slide effect on hover */
}


/* Admin Bar Adjustments */
body.admin-bar .category-drawer-wrapper-18a1a8ea {
    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 .category-drawer-wrapper-18a1a8ea {
        top: 46px;
        height: calc(100% - 46px);
    }
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .category-drawer-18a1a8ea {
        width: 85%; /* Mobile width requirement */
        max-width: 320px;
    }
}