/* Meu Lar — barra modular de ações do perfil */

.meular-profile-actions {
    --ml-actions-green: #0d5c2f;
    --ml-actions-green-dark: #084a25;
    --ml-actions-green-soft: #eaf5ee;
    --ml-actions-ink: #183025;
    --ml-actions-border: #dfe8e2;
    box-sizing: border-box;
    position: relative;
    z-index: 2147483640;
    width: 100%;
    padding: 16px 24px 4px;
    background: transparent;
}

.meular-profile-actions,
.meular-profile-actions * {
    box-sizing: border-box;
}

.meular-profile-actions__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.meular-profile-action {
    appearance: none;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--ml-actions-border);
    border-radius: 12px;
    background: #fff;
    color: var(--ml-actions-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 160ms cubic-bezier(.23,1,.32,1), background-color 160ms cubic-bezier(.23,1,.32,1), border-color 160ms cubic-bezier(.23,1,.32,1), transform 160ms cubic-bezier(.23,1,.32,1), box-shadow 160ms cubic-bezier(.23,1,.32,1);
}

.meular-profile-action:hover {
    border-color: #bdd3c4;
    background: #f8fbf9;
    color: var(--ml-actions-green);
}

.meular-profile-action:active {
    transform: scale(.97);
}

.meular-profile-action:focus-visible,
.meular-profile-actions__menu a:focus-visible,
.meular-profile-actions__menu button:focus-visible {
    outline: 3px solid rgba(13, 92, 47, .24);
    outline-offset: 2px;
}

.meular-profile-action--share:focus,
.meular-profile-action--share:active,
.meular-profile-action--share[aria-expanded="true"] {
    border-color: #bdd3c4;
    background: var(--ml-actions-green-soft);
    color: var(--ml-actions-green);
    outline: none;
    box-shadow: none;
}

.meular-profile-action--primary {
    border-color: var(--ml-actions-green);
    background: var(--ml-actions-green);
    color: #fff;
    box-shadow: 0 7px 18px rgba(13, 92, 47, .17);
}

.meular-profile-action--primary:hover,
.meular-profile-action--primary.seguindo {
    border-color: var(--ml-actions-green-dark);
    background: var(--ml-actions-green-dark);
    color: #fff;
}

/* O profile.css antigo possui uma regra clara para .meular-follow-btn.seguindo.
 * Esta regra mais específica mantém o estado inicial forte e legível. */
.meular-profile-action.meular-follow-btn.seguindo,
.meular-profile-action.meular-follow-btn.seguindo:hover,
.meular-profile-action.meular-follow-btn.seguindo:active {
    border-color: var(--ml-actions-green-dark) !important;
    background: var(--ml-actions-green-dark) !important;
    color: #fff !important;
}

.meular-profile-action--whatsapp {
    border-color: #c8e7d3;
    color: var(--ml-actions-green);
}

.meular-profile-action--more {
    min-width: 46px;
    padding-right: 13px;
    padding-left: 13px;
}

.meular-profile-action__icon {
    display: inline-flex;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.meular-profile-action__icon svg,
.meular-profile-actions__menu svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.meular-profile-actions__control {
    position: relative;
}

.meular-profile-actions__menu[hidden] {
    display: none !important;
}

.meular-profile-actions__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1000;
    width: max-content;
    min-width: 236px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 7px;
    border: 1px solid var(--ml-actions-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(21, 50, 34, .18);
    transform-origin: top right;
}

.meular-profile-actions__menu a,
.meular-profile-actions__menu button {
    appearance: none;
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ml-actions-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
}

.meular-profile-actions__menu a:hover,
.meular-profile-actions__menu button:hover {
    background: var(--ml-actions-green-soft);
    color: var(--ml-actions-green);
}

.meular-profile-actions__menu svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.meular-profile-actions__native-options:empty {
    display: none;
}

.meular-profile-actions__status {
    min-height: 18px;
    margin: 6px auto 0;
    color: var(--ml-actions-green);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    max-width: 1180px;
}

/* A barra nova substitui a engrenagem do UM e os botões legados do template. */
.meular-profile-actions-enabled .um-profile-edit,
.meular-profile-actions-enabled .ml-profile-actions > .ml-btn,
.meular-profile-actions-enabled .ml-profile-actions > button.ml-btn,
.meular-profile-actions-enabled .meular-um-social-wrapper {
    display: none !important;
}

@media (max-width: 767px) {
    .meular-profile-actions {
        padding: 10px 10px 0;
    }

    .meular-profile-actions__inner {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
        gap: 5px;
    }

    .meular-profile-action {
        width: 100%;
        min-width: 0;
        min-height: 58px;
        flex-direction: column;
        gap: 4px;
        padding: 7px 4px;
        border-radius: 12px;
        font-size: 11px;
        line-height: 1.15;
        text-align: center;
    }

    .meular-profile-action__icon {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }

    .meular-profile-action--more {
        min-width: 0;
    }

    .meular-profile-actions__menu {
        position: fixed !important;
        top: var(--ml-actions-menu-top, 96px) !important;
        right: 12px;
        bottom: auto !important;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - var(--ml-actions-menu-top, 96px) - 12px);
        overflow-y: auto;
        padding: 9px;
        border-radius: 18px;
        z-index: 2147483647 !important;
        background: #fff !important;
        opacity: 1 !important;
        isolation: isolate;
        transform-origin: bottom center;
    }

    .meular-profile-actions__menu a,
    .meular-profile-actions__menu button {
        min-height: 50px;
        font-size: 15px;
    }

    .meular-profile-actions__status {
        text-align: center;
    }
}

@media (max-width: 360px) {
    .meular-profile-actions {
        padding-right: 8px;
        padding-left: 8px;
    }

    .meular-profile-actions__inner {
        gap: 5px;
    }

    .meular-profile-action {
        font-size: 10px;
    }
}


/* Acessibilidade: reduzir animações */
@media (prefers-reduced-motion: reduce) {
    .meular-profile-action {
        transition: none;
    }
}

/* MEU LAR — Botão Editar Perfil do proprietário */
/* Aplicado em computadores, tablets e celulares */

.meular-profile-actions[data-owner="1"]
.meular-profile-action--primary,
.meular-profile-actions[data-owner="1"]
.meular-profile-action--primary:hover,
.meular-profile-actions[data-owner="1"]
.meular-profile-action--primary:focus,
.meular-profile-actions[data-owner="1"]
.meular-profile-action--primary:active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0d5c2f !important;
    border: 1px solid #0d5c2f !important;
    box-shadow: none !important;
}

/* Ícone e texto do botão */
.meular-profile-actions[data-owner="1"]
.meular-profile-action--primary svg {
    color: #0d5c2f !important;
    stroke: currentColor !important;
}

.meular-profile-actions[data-owner="1"]
.meular-profile-action--primary
.meular-profile-action__text {
    color: #0d5c2f !important;
}
