/**
 * Contact FAB · F28 rev. editorial premium (estilo portocarrero wa-float)
 * Fondo navy casi negro · icono ámbar sutil · pulso solo en border.
 * Sin border-radius · sin gradient saturado · sin glow.
 */

.contact-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1200;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 12px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-fab[data-state="hidden"] {
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
}

/* Botón cuadrado · fondo navy (header) · sobre blanco · pulso ámbar en border */
.contact-fab__btn {
    width: 52px;
    height: 52px;
    border-radius: 0;
    background: #14213D;
    border: 1px solid rgba(252, 163, 17, 0.1);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0;
    animation: contactFabPulse 4s ease-in-out infinite;
}

/* Hover · navy ligeramente más claro + border ámbar visible · sube 3px */
.contact-fab__btn:hover {
    background: #1a2a4e;
    border-color: rgba(252, 163, 17, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(252, 163, 17, 0.18);
}

.contact-fab__btn:focus-visible {
    outline: none;
    border-color: rgba(252, 163, 17, 0.6);
}

/* Icono sobre · blanco pleno */
.contact-fab__icon {
    font-size: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
    line-height: 1;
}
.contact-fab__btn:hover .contact-fab__icon {
    opacity: 1;
}

/* Glow (lo dejamos pero invisible — borrar el div en el HTML rompería el patrón) */
.contact-fab__glow { display: none; }

/* Pulso · border ámbar parpadeando sobre fondo navy */
@keyframes contactFabPulse {
    0%, 100% { border-color: rgba(252, 163, 17, 0.15); }
    50%      { border-color: rgba(252, 163, 17, 0.5); }
}
.contact-fab__btn:hover { animation: none; }

/* Tooltip · mismo lenguaje editorial · oculto por defecto */
.contact-fab__tooltip {
    background: rgba(20, 24, 36, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.78);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.contact-fab:hover .contact-fab__tooltip,
.contact-fab__btn:focus-visible ~ .contact-fab__tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile · sin tooltip */
@media (max-width: 768px) {
    .contact-fab { right: 1.25rem; bottom: 1.25rem; }
    .contact-fab__btn { width: 48px; height: 48px; }
    .contact-fab__icon { font-size: 18px; }
    .contact-fab__tooltip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .contact-fab__btn { animation: none; transition: none; }
    .contact-fab__btn:hover { transform: none; }
}

/* ───────── Mini-menú móvil (3 opciones encima del botón) ───────── */
.contact-fab__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.contact-fab__menu[hidden] { display: none; }
.contact-fab.is-open .contact-fab__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contact-fab__opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #14213D;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid rgba(252, 163, 17, 0.18);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.contact-fab__opt:hover,
.contact-fab__opt:focus-visible {
    background: #1a2a4e;
    border-color: rgba(252, 163, 17, 0.55);
    outline: none;
    transform: translateX(-2px);
}
.contact-fab__opt-icon {
    font-size: 18px;
    color: #FCA311;
    line-height: 1;
    flex-shrink: 0;
}

/* Indicar estado abierto en el botón: el sobre rota suave */
.contact-fab.is-open .contact-fab__btn { animation: none; border-color: rgba(252, 163, 17, 0.6); }
.contact-fab.is-open .contact-fab__icon { transform: rotate(8deg); }

