/* ═══════════════════════════════════════════════════════════════
   auth-public.css — Modal de autenticación clientes SOULAI
   Diseño oscuro de Alta Relojería. Compatible con todas las páginas.
═══════════════════════════════════════════════════════════════ */

/* ─── Botón en el navbar de escritorio ─────────────────────────────── */
.auth-nav-btn {
    background: none;
    border: 1px solid rgba(184, 154, 62, 0.45);
    border-radius: 6px;
    padding: 6px 14px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b89a3e;
    cursor: pointer;
    transition: background 0.22s, border-color 0.22s, color 0.22s;
    white-space: nowrap;
}
.auth-nav-btn:hover {
    background: rgba(184, 154, 62, 0.1);
    border-color: #b89a3e;
    color: #d4af37;
}
.auth-nav-btn--logged {
    border-color: rgba(184, 154, 62, 0.6);
    background: rgba(184, 154, 62, 0.08);
}

/* Wrapper para agrupar el enlace derecho + botón auth */
.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ─── Tab móvil (app-bar) ───────────────────────────────────────────── */
.app-tab-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    padding: 6px 4px 2px;
    cursor: pointer;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.app-tab-auth svg { opacity: 0.8; }
.app-tab-auth:hover,
.app-tab-auth.active { color: #b89a3e; }
.app-tab-auth.active svg { opacity: 1; }
.app-tab-auth--logged { color: #b89a3e; }

/* ─── Modal overlay ─────────────────────────────────────────────────── */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.82);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.auth-modal[hidden] { display: none; }

/* ─── Tarjeta del modal ─────────────────────────────────────────────── */
.auth-modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 92vh;
    overflow-y: auto;
    background: #0d0d0f;
    border: 1px solid rgba(184, 154, 62, 0.28);
    border-radius: 18px;
    padding: 36px 32px 32px;
    box-shadow:
        0 0 0 1px rgba(184, 154, 62, 0.05),
        0 30px 80px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: authCardIn 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Scrollbar mínimo dentro de la card */
.auth-modal-card::-webkit-scrollbar { width: 4px; }
.auth-modal-card::-webkit-scrollbar-track { background: transparent; }
.auth-modal-card::-webkit-scrollbar-thumb { background: rgba(184,154,62,.25); border-radius: 4px; }

/* ─── Botón cerrar ──────────────────────────────────────────────────── */
.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.18s, background 0.18s;
    line-height: 0;
}
.auth-modal-close:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}

/* ─── Cabecera del modal ────────────────────────────────────────────── */
.auth-modal-header {
    text-align: center;
    margin-bottom: 24px;
}
.auth-modal-logo {
    height: 38px;
    width: auto;
    margin-bottom: 14px;
    opacity: 0.92;
    /* El logo es oscuro; en fondo oscuro añadir filtro para hacerlo visible */
    filter: brightness(0) invert(1);
}
.auth-modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 500;
    color: #e8e0d0;
    margin: 0 0 6px;
    letter-spacing: 0.02em;
}
.auth-modal-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── Tabs Login / Registro ─────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 22px;
}
.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 9px 0;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.auth-tab.active {
    background: rgba(184, 154, 62, 0.15);
    color: #d4af37;
    box-shadow: 0 0 0 1px rgba(184, 154, 62, 0.3);
}
.auth-tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.65);
}

/* ─── Botón Google ──────────────────────────────────────────────────── */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f1f1f;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 18px;
}
.auth-google-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}
.auth-google-btn:active { transform: translateY(0); }
.auth-google-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ─── Divisor "o continúa con email" ───────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.22);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}
.auth-divider span { white-space: nowrap; }

/* ─── Formularios ───────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.auth-field label {
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}
.auth-field input {
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.92rem;
    color: #e8e0d0;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
}
.auth-field input::placeholder { color: rgba(255, 255, 255, 0.2); }
.auth-field input:focus {
    outline: none;
    border-color: rgba(184, 154, 62, 0.6);
    background: rgba(184, 154, 62, 0.05);
}

/* ─── Botón de envío del formulario ─────────────────────────────────── */
.auth-submit-btn {
    margin-top: 6px;
    width: 100%;
    padding: 12px 0;
    background: linear-gradient(135deg, #b89a3e 0%, #d4af37 100%);
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0d0d0f;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(184, 154, 62, 0.3);
}
.auth-submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(184, 154, 62, 0.45);
}
.auth-submit-btn:active { transform: translateY(0); }
.auth-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ─── Mensaje de error ──────────────────────────────────────────────── */
.auth-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(224, 91, 91, 0.1);
    border: 1px solid rgba(224, 91, 91, 0.28);
    border-radius: 8px;
    font-size: 0.82rem;
    color: #e07070;
    line-height: 1.5;
}
.auth-error[hidden] { display: none; }

/* ─── Vista de perfil (cuando está logueado) ────────────────────────── */
#auth-user-view { text-align: center; }

.auth-avatar-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 16px;
}
.auth-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b89a3e, #7a6530);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0d0d0f;
    letter-spacing: 0.02em;
    border: 2px solid rgba(184, 154, 62, 0.4);
    box-shadow: 0 0 0 4px rgba(184, 154, 62, 0.1);
}

.auth-profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #e8e0d0;
    margin: 0 0 4px;
}
.auth-profile-email {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    margin: 0 0 12px;
}
.auth-profile-role {
    display: inline-block;
    margin-bottom: 24px;
}
.auth-profile-role span {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(184, 154, 62, 0.12);
    border: 1px solid rgba(184, 154, 62, 0.3);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b89a3e;
}

.auth-logout-btn {
    width: 100%;
    padding: 11px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.auth-logout-btn:hover {
    background: rgba(224, 91, 91, 0.1);
    border-color: rgba(224, 91, 91, 0.3);
    color: #e07070;
}

/* ─── Spinner de carga ──────────────────────────────────────────────── */
.auth-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(31, 31, 31, 0.25);
    border-top-color: #1f1f1f;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-modal { padding: 12px; align-items: flex-end; }
    .auth-modal-card {
        padding: 28px 20px 24px;
        border-radius: 20px 20px 0 0;
        max-height: 88vh;
        border-bottom: none;
    }
    @keyframes authCardIn {
        from { opacity: 0; transform: translateY(60px); }
        to   { opacity: 1; transform: translateY(0);    }
    }
}


/* ---------------------------------------------------------------
   MODAL DE TELFONO  Captura del nmero de WhatsApp
--------------------------------------------------------------- */

.phone-modal-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.65;
    margin: 0 0 20px;
    text-align: center;
}

#phone-input {
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    text-align: center;
}

/* ---------------------------------------------------------------
   OVERLAY DE XITO  "Solicitud Recibida"
--------------------------------------------------------------- */

.consulta-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.consulta-success-overlay[hidden] { display: none; }

.consulta-success-card {
    text-align: center;
    max-width: 380px;
    width: 100%;
    padding: 44px 32px;
    background: #0d0d0f;
    border: 1px solid rgba(184, 154, 62, 0.35);
    border-radius: 20px;
    box-shadow:
        0 0 60px rgba(184, 154, 62, 0.12),
        0 30px 80px rgba(0, 0, 0, 0.7);
    animation: successCardIn 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes successCardIn {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1);    }
}

.consulta-success-icon {
    font-size: 2.6rem;
    color: #b89a3e;
    margin-bottom: 18px;
    display: block;
    line-height: 1;
    animation: iconPulse 1.8s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { opacity: 1;    text-shadow: 0 0 20px rgba(184,154,62,0.5); }
    50%       { opacity: 0.7; text-shadow: 0 0 40px rgba(184,154,62,0.9); }
}

.consulta-success-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #e8e0d0;
    margin: 0 0 12px;
    letter-spacing: 0.02em;
}

.consulta-success-msg {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.65;
    margin: 0 0 28px;
}

.consulta-success-card .auth-submit-btn {
    max-width: 200px;
    margin: 0 auto;
    display: block;
}
