/**
 * Estilos globales premium — paucompany.es
 * Transiciones + Card de contacto inteligente
 *
 * @version 1.0.0
 */

/* ═══════════════════════════════════════════════════════
   CARD DE CONTACTO INTELIGENTE
   ═══════════════════════════════════════════════════════ */
#pau-contact-card {
    position: fixed;
    bottom: 90px; /* por encima del botón de WhatsApp */
    right: 24px;
    width: 300px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.05),
        0 10px 32px rgba(0,0,0,0.12),
        0 0 0 1px rgba(184,148,31,0.15);
    border-top: 3px solid #b8941f;
    z-index: 9990;
    /* oculta por defecto */
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    /* accesibilidad */
    aria-hidden: true;
}

#pau-contact-card.pau-card-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.pau-card-inner {
    padding: 18px 18px 16px;
}

.pau-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pau-card-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}

.pau-card-title-wrap {
    flex: 1;
    padding: 0 10px;
}

.pau-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    line-height: 1.3;
}

.pau-card-role {
    font-size: 11px;
    color: #888888;
    margin-top: 1px;
}

.pau-card-close {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: #888888;
    flex-shrink: 0;
    transition: background 0.15s;
    line-height: 1;
}

.pau-card-close:hover {
    background: #e5e5e5;
    color: #333333;
}

.pau-card-close:focus-visible {
    outline: 2px solid #b8941f;
    outline-offset: 2px;
}

.pau-card-msg {
    font-size: 13px;
    color: #444444;
    line-height: 1.65;
    margin-bottom: 14px;
    padding-top: 4px;
    border-top: 0.5px solid #f0f0f0;
}

.pau-card-msg strong {
    color: #111111;
}

.pau-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #b8941f, #d4af37);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(184,148,31,0.25);
}

.pau-card-btn:hover {
    box-shadow: 0 4px 16px rgba(184,148,31,0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.pau-card-btn:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 3px;
}

/* indicador "en línea" */
.pau-card-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #595959; /* WCAG AA */
    margin-top: 10px;
    justify-content: center;
}

.pau-card-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: pau-card-pulse 2.4s infinite;
    flex-shrink: 0;
}

@keyframes pau-card-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50%       { opacity: 0.6; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 480px) {
    #pau-contact-card {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 80px;
    }
}

/* ── REDUCED MOTION ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    #pau-contact-card {
        transition: opacity 0.15s ease;
        transform: none !important;
    }
    .pau-card-status-dot {
        animation: none;
    }
}
