/* ============================================================================
   ARCHIVO: auth-modal.css
   UBICACIÓN: CanariasApart.Web/wwwroot/css/front/auth-modal.css
   DESCRIPCIÓN: Estilos del modal de login/registro y menú dropdown de usuario
   ============================================================================ */

/* ===== MODAL AUTH ===== */
.auth-modal-dialog {
    max-width: 440px;
}

.auth-modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.auth-modal-header {
    position: relative;
    text-align: center;
    padding: 20px 24px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.auth-close-btn {
    position: absolute;
    left: 16px;
    top: 16px;
    background: none;
    border: none;
    font-size: 16px;
    color: #444;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.auth-close-btn:hover {
    background: #f5f5f5;
}

.auth-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.auth-modal-body {
    padding: 24px;
}

/* ===== PANELES ===== */
.auth-panel {
    animation: authSlideIn .3s ease;
}

@keyframes authSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-subtitle {
    color: #666;
    font-size: .9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ===== FORM ELEMENTS ===== */
.auth-form-group {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    color: #aaa;
    font-size: .85rem;
    z-index: 1;
}

.auth-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: .95rem;
    color: #1a1a1a;
    background: #fafafa;
    transition: all .2s;
    outline: none;
}

.auth-input:focus {
    border-color: #008572;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 133, 114, .1);
}

.auth-toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: .9rem;
    padding: 4px;
}

.auth-toggle-pass:hover {
    color: #008572;
}

/* Password strength bar */
.auth-password-strength {
    height: 3px;
    border-radius: 2px;
    margin-top: 6px;
    transition: all .3s;
    width: 0;
}

/* ===== OPTIONS ROW ===== */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: #555;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    accent-color: #008572;
    width: 16px;
    height: 16px;
}

.auth-link {
    font-size: .85rem;
    color: #008572;
    text-decoration: none;
    transition: color .2s;
}

.auth-link:hover {
    color: #006B5A;
    text-decoration: underline;
}

.auth-link-bold {
    color: #008572;
    font-weight: 600;
    text-decoration: none;
}

.auth-link-bold:hover {
    text-decoration: underline;
    color: #006B5A;
}

/* ===== BUTTONS ===== */
.auth-btn-primary {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #dfbb3e, #C9A227);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .3s;
    margin-bottom: 16px;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(223, 187, 62, .35);
}

.auth-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-secondary {
    width: 100%;
    padding: 12px;
    border: 2px solid #008572;
    border-radius: 10px;
    background: transparent;
    color: #008572;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .3s;
    margin-bottom: 16px;
}

.auth-btn-secondary:hover {
    background: rgba(0, 133, 114, .05);
}

/* ===== DIVIDER ===== */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 16px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e8e8e8;
}

.auth-divider span {
    position: relative;
    background: #fff;
    padding: 0 16px;
    font-size: .82rem;
    color: #999;
}

/* ===== SWITCH TEXT ===== */
.auth-switch {
    text-align: center;
    font-size: .9rem;
    color: #666;
    margin-top: 8px;
}

/* ===== ROW (nombre + apellidos) ===== */
.auth-row {
    display: flex;
    gap: 12px;
}

.auth-half {
    flex: 1;
}

/* ===== RECOVERY PANEL ===== */
.auth-recovery-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(223, 187, 62, .12);
    color: #dfbb3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 16px;
}

/* ===== VERIFICATION PANEL ===== */
.auth-verification-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 133, 114, .1);
    color: #008572;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}

.auth-verification-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.auth-verification-email {
    font-weight: 600;
    color: #008572;
    font-size: 1rem;
}

/* ===== USER MENU (NAV) ===== */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    background: none;
    border: 2px solid rgba(255,255,255,.4);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all .2s;
}

.user-menu-btn:hover {
    border-color: #dfbb3e;
    color: #dfbb3e;
}

/* Nav sobre fondo claro */
.nav-scrolled .user-menu-btn {
    color: #008572;
    border-color: rgba(0,133,114,.3);
}

.user-avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.user-avatar-mini {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dfbb3e, #C9A227);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    border: 2px solid rgba(255,255,255,.5);
    transition: all .2s;
    overflow: hidden;
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-mini:hover {
    border-color: #dfbb3e;
    transform: scale(1.05);
}

.user-badge-msgs {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ===== DROPDOWN ===== */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    z-index: 1050;
    overflow: hidden;
    animation: dropdownIn .2s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.user-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dfbb3e, #C9A227);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
    overflow: hidden;
}

.user-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown-info {
    min-width: 0;
}

.user-dropdown-name {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-email {
    display: block;
    font-size: .78rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: #444;
    font-size: .88rem;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

.user-dropdown-item:hover {
    background: #f8f8f8;
    color: #008572;
}

.user-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: .85rem;
}

.user-dropdown-badge {
    margin-left: auto;
    background: #dc3545;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.user-dropdown-logout {
    color: #dc3545;
}

.user-dropdown-logout:hover {
    background: #fff5f5;
    color: #dc3545;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .auth-modal-dialog {
        margin: 10px;
        max-width: 100%;
    }

    .auth-modal-body {
        padding: 20px 16px;
    }

    .auth-row {
        flex-direction: column;
        gap: 0;
    }

    .user-dropdown {
        width: 260px;
        right: -20px;
    }
}

/* ===== LABEL DEL BOTÓN LOGIN ===== */
/* En contexto _Layout (genérico): ocultar texto, solo icono circular */
.user-menu-label {
    display: none;
}

/* En contexto Propiedad (slot del nav): mostrar texto como botón pill */
.prop-user-menu-slot .user-menu-btn {
    border-radius: 50px;
    width: auto;
    height: auto;
    padding: 8px 20px;
    background: #008572;
    color: #fff;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    gap: 6px;
}

    .prop-user-menu-slot .user-menu-btn:hover {
        background: #006b5c;
        color: #fff;
        border-color: transparent;
    }

.prop-user-menu-slot .user-menu-label {
    display: inline;
}

/* Nav scrolled no afecta en Propiedad (no hay clase nav-scrolled) */
.prop-user-menu-slot .user-menu-btn i {
    font-size: 0.9rem;
}