/*
MENU COMPARTILHADO DOS SITES MARQZ (SWITCH DE TEMA + MENU + BANNER DE CONTATO).
O MESMO ARQUIVO É COPIADO EM CADA SITE (marqz.com.br, erp.marqz.com.br, ferramentas.marqz.com.br).
TUDO PREFIXADO COM mz- PARA NÃO CONFLITAR COM O CSS DE CADA PÁGINA. O TEMA SEGUE A CLASSE .dark NO <html>.
*/

.mz-corner,
.mz-contact {
    --mz-primary: #EB2850;
    --mz-glass: rgba(255, 255, 255, 0.72);
    --mz-border: rgba(203, 213, 225, 0.8);
    --mz-text: #0F172A;
    --mz-muted: #64748B;
    font-family: 'Open Runde', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dark .mz-corner,
.dark .mz-contact {
    --mz-glass: rgba(18, 21, 28, 0.72);
    --mz-border: rgba(255, 255, 255, 0.08);
    --mz-text: #F8FAFC;
    --mz-muted: #94A3B8;
}

.mz-glass {
    background: var(--mz-glass);
    border: 1px solid var(--mz-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.mz-corner[hidden],
.mz-contact[hidden] {
    display: none !important;
}

/* CANTO SUPERIOR DIREITO: SWITCH DE TEMA E, ABAIXO, O MENU */
.mz-corner {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* SWITCH DE TEMA (MESMO PILL DO HUB) */
.mz-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 9999px;
    cursor: pointer;
}

.mz-pill-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 28px;
    height: 22px;
    border-radius: 9999px;
    background: #FFF;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.dark .mz-pill-thumb {
    transform: translateX(28px);
    background: var(--mz-primary);
}

.mz-pill-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    color: #94A3B8;
    transition: color 0.2s ease;
}

.mz-pill-icon.is-sun {
    color: #0F172A;
}

.dark .mz-pill-icon.is-sun {
    color: #94A3B8;
}

.dark .mz-pill-icon.is-moon {
    color: #FFF;
}

.mz-pill-icon svg {
    width: 14px;
    height: 14px;
}

/* MENU: BOTÃO QUE EXPANDE PARA BAIXO, EM COLUNA */
.mz-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 64px;
}

.mz-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    color: var(--mz-text);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.mz-btn svg {
    width: 16px;
    height: 16px;
}

.mz-toggle svg {
    width: 18px;
    height: 18px;
}

.mz-btn:hover,
.mz-btn:focus-visible {
    color: var(--mz-primary);
    border-color: var(--mz-primary);
    outline: none;
}

/* PÁGINA ATUAL: ÍCONE E BORDA NA COR PRINCIPAL */
.mz-btn.is-current {
    color: var(--mz-primary);
    border-color: color-mix(in srgb, var(--mz-primary) 60%, transparent);
}

.mz-toggle.is-open {
    color: #FFF;
    background: var(--mz-primary);
    border-color: var(--mz-primary);
}

.mz-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mz-items .mz-btn {
    opacity: 0;
    transform: translateY(-8px) scale(0.92);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease, border-color 0.15s ease;
}

.mz-menu.is-open .mz-items .mz-btn {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* ABRE EM CASCATA, DE CIMA PARA BAIXO */
.mz-menu.is-open .mz-items .mz-btn:nth-child(2) { transition-delay: 0.04s; }
.mz-menu.is-open .mz-items .mz-btn:nth-child(3) { transition-delay: 0.08s; }
.mz-menu.is-open .mz-items .mz-btn:nth-child(4) { transition-delay: 0.12s; }
.mz-menu.is-open .mz-items .mz-btn:nth-child(5) { transition-delay: 0.16s; }

/* RÓTULO QUE APARECE À ESQUERDA DO ÍCONE */
.mz-tip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translate(6px, -50%);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--mz-text);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mz-btn:hover .mz-tip,
.mz-btn:focus-visible .mz-tip {
    opacity: 1;
    transform: translate(0, -50%);
}

/* BANNER DE CONTATO: SOBE DA BASE DA TELA (ACIMA DE UMA EVENTUAL FAIXA DE RODAPÉ) */
.mz-contact {
    position: fixed;
    left: 50%;
    bottom: var(--mz-bottom, 24px);
    z-index: 60;
    width: min(420px, calc(100% - 32px));
    padding: 18px 20px;
    border-radius: 16px;
    color: var(--mz-text);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    transform: translate(-50%, 24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mz-contact.is-open {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.mz-contact-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mz-contact-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mz-contact-close {
    display: inline-flex;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--mz-muted);
    cursor: pointer;
}

.mz-contact-close:hover {
    color: var(--mz-text);
    background: rgba(148, 163, 184, 0.15);
}

.mz-contact-close svg {
    width: 16px;
    height: 16px;
}

.mz-contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--mz-text);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.mz-contact-row:hover {
    background: rgba(148, 163, 184, 0.14);
}

.mz-contact-row + .mz-contact-row {
    margin-top: 4px;
}

.mz-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--mz-primary);
    background: rgba(235, 40, 80, 0.12);
}

.mz-contact-icon svg {
    width: 16px;
    height: 16px;
}

.mz-contact-label {
    display: block;
    font-size: 11px;
    color: var(--mz-muted);
}

.mz-contact-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
}
