.bidoro-category-toggle-wrapper {
    width: 100%;
    max-width: var(--bct-desktop-max-width-closed, 520px);
    margin: 18px 0 26px 0;
    font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
    z-index: 12;
    transition: max-width .22s ease;
}

.bidoro-category-toggle-wrapper.is-open {
    max-width: var(--bct-desktop-max-width-open, 760px);
}

.bidoro-category-toggle-button {
    width: 100%;
    min-height: var(--bct-button-height, 58px);
    padding: 0 18px;
    border: 1px solid var(--bct-border, rgba(0, 69, 59, 0.12));
    border-radius: var(--bct-button-radius, 18px);
    background: var(--bct-bg, #ffffff);
    box-shadow: var(--bct-shadow, 0 8px 24px rgba(0, 69, 59, 0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    color: var(--bct-text, #001b3a);
    appearance: none;
    -webkit-appearance: none;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease, background-color .2s ease;
}

.bidoro-category-toggle-button:hover,
.bidoro-category-toggle-button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(0, 121, 64, .26);
    box-shadow: var(--bct-shadow-hover, 0 12px 28px rgba(0, 69, 59, 0.13));
    outline: none;
}

.bidoro-category-toggle-button.is-open {
    border-color: rgba(0, 121, 64, .25);
}

.bidoro-category-toggle-left,
.bidoro-category-toggle-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bidoro-category-toggle-text {
    font-size: 15px;
    font-weight: 800;
    color: var(--bct-text, #001b3a);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bidoro-category-toggle-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(0, 121, 64, .08);
    color: var(--bct-green-dark, #00453b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}

.bidoro-category-toggle-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

.bidoro-category-toggle-count {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bct-green, #007940);
    background: rgba(0, 121, 64, .08);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.bidoro-category-toggle-arrow {
    width: 22px;
    height: 22px;
    color: var(--bct-green-dark, #00453b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .22s ease;
    flex: 0 0 22px;
}

.bidoro-category-toggle-arrow svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.bidoro-category-toggle-button.is-open .bidoro-category-toggle-arrow {
    transform: rotate(180deg);
}

.bidoro-category-toggle-panel {
    margin-top: 12px;
    padding: 14px;
    border-radius: var(--bct-panel-radius, 20px);
    background: var(--bct-bg, #ffffff);
    border: 1px solid rgba(0, 69, 59, .08);
    box-shadow: var(--bct-panel-shadow, 0 14px 34px rgba(0, 69, 59, .10));
    animation: bidoroCategoryPanelIn .22s ease both;
    overflow: visible;
}

.bidoro-category-toggle-panel[hidden] {
    display: none !important;
}

.bidoro-category-toggle-panel-inner {
    width: 100%;
}

/* Proteção para menus internos com layouts próprios. */
.bidoro-category-toggle-panel-inner > * {
    max-width: 100%;
}

/* Se o shortcode interno tiver cards largos ou 2 colunas em desktop, esta área dá espaço sem esmagar. */
@media (min-width: 768px) {
    .bidoro-category-toggle-panel-inner {
        min-width: 0;
    }
}

@keyframes bidoroCategoryPanelIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Ajustes desktop: barra alinhada à esquerda e mais parecida com a barra de ordenação. */
@media (min-width: 768px) {
    .bidoro-category-toggle-wrapper {
        margin-left: 0 !important;
        margin-right: auto !important;
        justify-self: flex-start;
        align-self: flex-start;
        text-align: left;
    }

    .bidoro-category-toggle-button {
        min-height: var(--bct-button-height, 46px);
        padding: 0 16px;
    }

    .bidoro-category-toggle-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-radius: 10px;
    }

    .bidoro-category-toggle-icon svg {
        width: 18px;
        height: 18px;
    }

    .bidoro-category-toggle-text {
        font-size: 14px;
    }

    .bidoro-category-toggle-count {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .bidoro-category-toggle-wrapper,
    .bidoro-category-toggle-wrapper.is-open {
        max-width: var(--bct-mobile-max-width, 100%);
        margin: 16px 0 22px 0;
    }

    .bidoro-category-toggle-button {
        min-height: 56px;
        padding: 0 14px;
        border-radius: 16px;
    }

    .bidoro-category-toggle-text {
        font-size: 14px;
    }

    .bidoro-category-toggle-count {
        display: none;
    }

    .bidoro-category-toggle-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .bidoro-category-toggle-panel {
        padding: 10px;
        border-radius: 18px;
    }
}
