/* ============================================================
   CdA Ferramentas — Menu Atendimento (Convert)
   CSS estrutural apenas — cores e tamanhos via Elementor
   ============================================================ */

.cdaf-ma-wrap {
    position: relative;
    display: inline-block;
}

/* ── Trigger — reset completo para não herdar estilo do tema ── */
.cdaf-ma-wrap .cdaf-ma-trigger,
.cdaf-ma-wrap .cdaf-ma-trigger:hover,
.cdaf-ma-wrap .cdaf-ma-trigger:focus,
.cdaf-ma-wrap .cdaf-ma-trigger:active {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 4px 6px !important;
    margin: 0 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    font-family: inherit !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    width: auto !important;
}

.cdaf-ma-wrap .cdaf-ma-trigger:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

.cdaf-ma-trigger-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cdaf-ma-trigger-texts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.cdaf-ma-trigger-top {
    font-size: 11px;
    line-height: 1.2;
}

.cdaf-ma-trigger-main {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.cdaf-ma-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cdaf-ma-wrap.cdaf-ma--open .cdaf-ma-chevron {
    transform: rotate(180deg);
}

/* ── Dropdown ── */
.cdaf-ma-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    z-index: 9999;
    background: #fff;
    border-radius: 8px;
    min-width: 300px;
    overflow: hidden;
}

.cdaf-ma-wrap.cdaf-ma--open .cdaf-ma-dropdown {
    display: block;
}

.cdaf-ma-pos-left.cdaf-ma--open  .cdaf-ma-dropdown,
.cdaf-ma-pos-right.cdaf-ma--open .cdaf-ma-dropdown {
    animation: cdaf-ma-fadein .18s ease;
}

.cdaf-ma-pos-center.cdaf-ma--open .cdaf-ma-dropdown {
    animation: cdaf-ma-fadein-center .18s ease;
}

@keyframes cdaf-ma-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes cdaf-ma-fadein-center {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* posicionamentos */
.cdaf-ma-pos-left  .cdaf-ma-dropdown { left: 0; }
.cdaf-ma-pos-right .cdaf-ma-dropdown { right: 0; }
.cdaf-ma-pos-center .cdaf-ma-dropdown { left: 50%; }

/* ── Seta decorativa ── */
.cdaf-ma-arrow {
    position: absolute;
    top: -7px;
    left: 28px;
    width: 14px;
    height: 14px;
    background: inherit;
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
    box-shadow: -2px -2px 5px rgba(0,0,0,.06);
    z-index: 1;
}

.cdaf-ma-pos-right  .cdaf-ma-arrow { left: auto; right: 28px; }
.cdaf-ma-pos-center .cdaf-ma-arrow { left: 50%; transform: translateX(-50%) rotate(45deg); }

/* ── Itens ── */
.cdaf-ma-item {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    background: inherit;
    cursor: default;
    transition: background-color .12s ease;
}

a.cdaf-ma-item { cursor: pointer; }

.cdaf-ma-item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.cdaf-ma-item:hover { background-color: #f8f8f8; }

/* ── Ícone ── */
.cdaf-ma-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    line-height: 0;
}

.cdaf-ma-icon svg {
    display: block;
    flex-shrink: 0;
}

/* ── Textos ── */
.cdaf-ma-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cdaf-ma-label    { font-size: 12px; line-height: 1.3; }
.cdaf-ma-value    { font-size: 14px; font-weight: 700; line-height: 1.3; word-break: break-word; }
.cdaf-ma-subvalue { font-size: 12px; line-height: 1.3; }

/* ── Mobile: dropdown sempre centralizado na tela ── */
@media (max-width: 767px) {
    .cdaf-ma-wrap.cdaf-ma--open .cdaf-ma-dropdown {
        position: fixed;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        top: auto;
        z-index: 99999;
    }

    .cdaf-ma-wrap.cdaf-ma--open .cdaf-ma-arrow {
        display: none;
    }
}
