/* ==========================================================================
   Widget Botão Expansível — CSS base v1.0
   Prefixo: thm-eb-
   ========================================================================== */

.thm-eb-menu {
    position: relative;
    display: inline-grid;
    place-items: center;
    min-width: 220px;
    min-height: 54px;
}

/* Regra estrutural fixa: todo botão é inline-flex + align-items center,
   independentemente de ter ou não ícone, para manter ícone e texto
   sempre alinhados na mesma linha de base vertical. */
.thm-eb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    min-height: 54px;
    padding: 0 28px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: #0b0073;
    cursor: pointer;
    text-decoration: none;
    transition-property: opacity, transform, background-color, color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

.thm-eb-btn i,
.thm-eb-btn svg {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

.thm-eb-btn--main {
    position: absolute;
    z-index: 2;
    gap: var(--thm-eb-icon-gap, 8px);
}

.thm-eb-btn--opt1 {
    gap: var(--thm-eb-icon-gap-opt1, 8px);
    color: #0b0073;
    background: #eeeaff;
}

.thm-eb-btn--opt2 {
    gap: var(--thm-eb-icon-gap-opt2, 8px);
    color: #0b0073;
    background: #eeeaff;
}

.thm-eb-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.75);
    pointer-events: none;
    transition-property: opacity, transform, visibility;
    transition-duration: 0.25s;
    transition-timing-function: ease;
}

.thm-eb-menu.is-open .thm-eb-btn--main {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}

.thm-eb-menu.is-open .thm-eb-options {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

.thm-eb-btn:focus-visible {
    outline: 3px solid rgba(11, 0, 115, 0.25);
    outline-offset: 4px;
}

@media (max-width: 430px) {
    .thm-eb-menu {
        width: 100%;
        min-width: 0;
        min-height: 122px;
    }

    .thm-eb-options {
        width: 100%;
        flex-direction: column;
    }

    .thm-eb-options .thm-eb-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .thm-eb-btn,
    .thm-eb-options {
        transition: none;
    }
}
