/* ============================================ */
/* VENTANA DE CONTACTO - ABOGADOS TRÁFICO */
/* Tarjeta pequeña arriba a la derecha, no bloquea la página */
/* ============================================ */

.exit-popup {
    position: fixed;
    top: 96px;              /* debajo de la cabecera fija */
    right: 16px;
    z-index: 1500;          /* sobre la cabecera, bajo el aviso de cookies */
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    border-radius: 14px;
    border-top: 4px solid #ff6b35;
    box-shadow: 0 12px 32px rgba(26, 58, 95, 0.25);
    padding: 18px 18px 14px;
    font-family: 'Manrope', sans-serif;
    color: #2c3e50;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.exit-popup--visible {
    opacity: 1;
    transform: translateY(0);
}

.exit-popup-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}

.exit-popup-close:hover,
.exit-popup-close:focus-visible {
    color: #ff6b35;
    background: #f0f4f8;
}

.exit-popup-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a3a5f;
    margin: 0 28px 4px 0;
    line-height: 1.3;
}

.exit-popup-subtitle {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 12px;
    line-height: 1.4;
}

.exit-popup-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exit-popup-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
}

.exit-popup-input:focus {
    outline: none;
    border-color: #1a3a5f;
}

.exit-popup-input--error {
    border-color: #d93025;
}

.exit-popup-privacy {
    font-size: 0.78rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.exit-popup-privacy a,
.exit-popup-note a,
.exit-popup-ok a,
.exit-popup-error a {
    color: #1a3a5f;
    font-weight: 600;
}

.exit-popup-error {
    margin: 0;
    font-size: 0.8rem;
    color: #b3261e;
}

.exit-popup-btn {
    width: 100%;
    background: #ff6b35;
    color: #fff;
    border: none;
    padding: 11px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.exit-popup-btn:hover {
    background: #e55a2b;
}

.exit-popup-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.exit-popup-note {
    font-size: 0.8rem;
    color: #666;
    margin: 10px 0 0;
    text-align: center;
}

.exit-popup-ok {
    margin: 4px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1a3a5f;
}

@media (max-width: 768px) {
    .exit-popup {
        top: 72px;
        right: 16px;
        width: 280px;
        padding: 14px 14px 12px;
    }

    /* En móvil, solo lo imprescindible para que ocupe poco */
    .exit-popup-opcional {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .exit-popup {
        transition: none;
    }
}
