/**
 * WP Advanced Login Pro - Estilo Airbnb PREMIUM
 * CSS optimizado con tamaños, spacing y animaciones estilo Airbnb real
 * Color principal: Dorado (#cbb781) en lugar del rojo de Airbnb
 */

/* Reset completo y font system */
.wpalp-modal-wrapper *,
.wpalp-modal-wrapper *::before,
.wpalp-modal-wrapper *::after {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Open Sans', 'Helvetica Neue', sans-serif !important;
}

/* Variables del tema - Colores dorados premium */
.wpalp-modal-wrapper {
    --wpalp-primary: #cbb781 !important;
    --wpalp-primary-hover: #b8a572 !important; 
    --wpalp-primary-dark: #a99969 !important;
    --wpalp-primary-light: #dcc896 !important;
    --wpalp-black: #222222 !important;
    --wpalp-gray-darkest: #484848 !important;
    --wpalp-gray-dark: #717171 !important;
    --wpalp-gray: #B0B0B0 !important;
    --wpalp-gray-light: #DDDDDD !important;
    --wpalp-gray-lighter: #EBEBEB !important;
    --wpalp-gray-lightest: #F7F7F7 !important;
    --wpalp-white: #FFFFFF !important;
    --wpalp-border: #DDDDDD !important;
    
    /* Sombras suaves estilo Airbnb */
    --wpalp-shadow-sm: 0 1px 2px rgba(0,0,0,0.08) !important;
    --wpalp-shadow-md: 0 2px 8px rgba(0,0,0,0.12) !important;
    --wpalp-shadow-lg: 0 6px 16px rgba(0,0,0,0.12) !important;
    --wpalp-shadow-xl: 0 8px 28px rgba(0,0,0,0.16) !important;
    
    /* Radius estilo Airbnb */
    --wpalp-radius-sm: 8px !important;
    --wpalp-radius-md: 12px !important;
    --wpalp-radius-lg: 16px !important;
    
    /* Spacing estilo Airbnb - más generoso */
    --wpalp-space-xs: 8px !important;
    --wpalp-space-sm: 16px !important;
    --wpalp-space-md: 24px !important;
    --wpalp-space-lg: 32px !important;
    --wpalp-space-xl: 40px !important;
    --wpalp-space-xxl: 48px !important;
}

/* Overlay del modal */
.wpalp-modal-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    z-index: 2147483647 !important;
    display: none; /* Por defecto oculto */
    justify-content: center !important;
    align-items: flex-start !important;
    padding: var(--wpalp-space-xl) 20px !important;
    overflow-y: auto !important;
}

/* Cuando el modal está activo */
.wpalp-modal-wrapper.wpalp-modal-active {
    display: flex !important;
    animation: wpalp-fadeIn 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Container del modal - Tamaños estilo Airbnb */
.wpalp-auth-modal {
    background-color: var(--wpalp-white) !important;
    border-radius: var(--wpalp-radius-md) !important;
    width: 100% !important;
    max-width: 600px !important; /* Más ancho que antes */
    margin: auto !important;
    box-shadow: var(--wpalp-shadow-xl) !important;
    position: relative !important;
    animation: wpalp-slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    overflow: hidden !important;
}

/* Header del modal - Spacing mejorado */
.wpalp-modal-header {
    position: relative !important;
    padding: var(--wpalp-space-lg) var(--wpalp-space-xl) !important; /* 32px 40px */
    border-bottom: 1px solid var(--wpalp-gray-lighter) !important;
    min-height: 80px !important; /* Más alto */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--wpalp-white) !important;
}

/* Títulos - Tipografía estilo Airbnb */
.wpalp-modal-title {
    font-size: 18px !important; /* Más grande */
    font-weight: 700 !important; /* Más bold */
    color: var(--wpalp-black) !important;
    text-align: center !important;
    letter-spacing: -0.02em !important;
    line-height: 24px !important;
}

.wpalp-welcome-title {
    font-size: 28px !important; /* Mucho más grande */
    font-weight: 600 !important;
    color: var(--wpalp-black) !important;
    margin-bottom: var(--wpalp-space-lg) !important; /* 32px */
    line-height: 32px !important;
    letter-spacing: -0.02em !important;
}

.wpalp-section-title {
    font-size: 20px !important; /* Más grande */
    font-weight: 600 !important;
    color: var(--wpalp-black) !important;
    margin-bottom: var(--wpalp-space-md) !important; /* 24px */
    letter-spacing: -0.01em !important;
    line-height: 26px !important;
}

/* Botones de cerrar y volver */
.wpalp-btn-close,
.wpalp-btn-back {
    position: absolute !important;
    left: var(--wpalp-space-lg) !important; /* 32px */
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important; /* Más grande */
    height: 36px !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    z-index: 10 !important;
}

.wpalp-btn-close:hover,
.wpalp-btn-back:hover {
    background-color: var(--wpalp-gray-lightest) !important;
    transform: translateY(-50%) scale(1.05) !important;
}

/* Iconos mejorados */
.wpalp-icon-close,
.wpalp-icon-back {
    width: 14px !important;
    height: 14px !important;
    position: relative !important;
}

.wpalp-icon-close::before,
.wpalp-icon-close::after {
    content: '' !important;
    position: absolute !important;
    width: 16px !important;
    height: 2px !important;
    background-color: var(--wpalp-black) !important;
    top: 50% !important;
    left: 50% !important;
    transform-origin: center !important;
}

.wpalp-icon-close::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.wpalp-icon-close::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.wpalp-icon-back::before {
    content: '' !important;
    position: absolute !important;
    width: 10px !important;
    height: 10px !important;
    border-left: 2px solid var(--wpalp-black) !important;
    border-bottom: 2px solid var(--wpalp-black) !important;
    transform: rotate(45deg) !important;
    left: 2px !important;
    top: 50% !important;
    margin-top: -5px !important;
}

/* Contenido del modal - Spacing generoso */
.wpalp-modal-body {
    padding: var(--wpalp-space-xl) !important; /* 40px */
}

/* Grupos de campos - Spacing estilo Airbnb */
.wpalp-field-group {
    margin-bottom: var(--wpalp-space-lg) !important; /* 32px en lugar de 24px */
    position: relative !important;
}

/* Labels - Estilo Airbnb */
.wpalp-field-label {
    display: block !important;
    font-size: 14px !important; /* Más grande */
    font-weight: 600 !important;
    color: var(--wpalp-black) !important;
    margin-bottom: 12px !important; /* Más espacio */
    letter-spacing: -0.01em !important;
    line-height: 18px !important;
}

/* Inputs - Tamaño estilo Airbnb */
.wpalp-field-input {
    width: 100% !important;
    padding: 18px 16px !important; /* Más alto: 18px vs 14px */
    font-size: 16px !important;
    font-weight: 400 !important;
    color: var(--wpalp-black) !important;
    background-color: var(--wpalp-white) !important;
    border: 1px solid var(--wpalp-border) !important;
    border-radius: var(--wpalp-radius-sm) !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 20px !important;
}

.wpalp-field-input:hover {
    border-color: var(--wpalp-gray-dark) !important;
}

.wpalp-field-input:focus {
    border-color: var(--wpalp-black) !important;
    border-width: 2px !important;
    padding: 17px 15px !important; /* Compensar border */
    box-shadow: 0 0 0 1px var(--wpalp-black) !important;
}

.wpalp-field-input::placeholder {
    color: var(--wpalp-gray) !important;
    font-weight: 400 !important;
}

/* Select estilo Airbnb */
.wpalp-field-select {
    width: 100% !important;
    padding: 18px 50px 18px 16px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: var(--wpalp-black) !important;
    background-color: var(--wpalp-white) !important;
    border: 1px solid var(--wpalp-border) !important;
    border-radius: var(--wpalp-radius-sm) !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    outline: none !important;
    appearance: none !important;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDE0IDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgOEwwIDFsMS40MS0xLjQxTDcgNS4xNyAxMS41OS4xOUwxNSAxdjdaIiBmaWxsPSIjMjIyIi8+PC9zdmc+') !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 14px !important;
    cursor: pointer !important;
}

.wpalp-field-select:hover,
.wpalp-field-select:focus {
    border-color: var(--wpalp-black) !important;
}

/* Wrapper de contraseña */
.wpalp-password-wrapper {
    position: relative !important;
}

.wpalp-password-toggle {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--wpalp-gray-dark) !important;
    cursor: pointer !important;
    text-decoration: underline !important;
    padding: 8px !important;
    transition: color 0.2s ease !important;
}

.wpalp-password-toggle:hover {
    color: var(--wpalp-black) !important;
}

/* Texto de ayuda */
.wpalp-field-info,
.wpalp-help-text {
    font-size: 14px !important;
    color: var(--wpalp-gray-dark) !important;
    margin-top: 12px !important;
    line-height: 18px !important;
    font-weight: 400 !important;
}

/* Botón principal - Gradiente dorado premium */
.wpalp-btn-primary {
    width: 100% !important;
    padding: 18px 24px !important; /* Más alto */
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--wpalp-white) !important;
    background: linear-gradient(135deg, #cbb781 0%, #b8a572 25%, #a99969 50%, #9b8b60 75%, #8d7d57 100%) !important;
    border-radius: var(--wpalp-radius-sm) !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative !important;
    overflow: hidden !important;
    letter-spacing: 0.02em !important;
    line-height: 20px !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(203, 183, 129, 0.3) !important;
}

.wpalp-btn-primary:hover {
    background: linear-gradient(135deg, #b8a572 0%, #a99969 25%, #9b8b60 50%, #8d7d57 75%, #7f6f4e 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(203, 183, 129, 0.4) !important;
}

.wpalp-btn-primary:active {
    transform: translateY(0px) !important;
    box-shadow: 0 2px 4px rgba(203, 183, 129, 0.2) !important;
}

/* Botones sociales - Estilo Airbnb */
.wpalp-social-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--wpalp-space-sm) !important; /* 16px */
}

.wpalp-btn-social {
    width: 100% !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--wpalp-black) !important;
    background-color: var(--wpalp-white) !important;
    border: 2px solid var(--wpalp-black) !important;
    border-radius: var(--wpalp-radius-sm) !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    letter-spacing: 0.01em !important;
    line-height: 20px !important;
}

.wpalp-btn-social:hover {
    background-color: var(--wpalp-gray-lightest) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--wpalp-shadow-sm) !important;
}

.wpalp-btn-social:active {
    transform: translateY(0px) !important;
}

.wpalp-social-icon {
    width: 20px !important;
    height: 20px !important;
    margin-right: 12px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* Divider - Estilo Airbnb */
.wpalp-auth-divider {
    position: relative !important;
    text-align: center !important;
    margin: var(--wpalp-space-lg) 0 !important; /* 32px */
}

.wpalp-auth-divider::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background-color: var(--wpalp-gray-light) !important;
}

.wpalp-divider-text {
    position: relative !important;
    display: inline-block !important;
    padding: 0 var(--wpalp-space-md) !important; /* 24px */
    font-size: 14px !important;
    color: var(--wpalp-gray-dark) !important;
    background-color: var(--wpalp-white) !important;
    font-weight: 400 !important;
}

/* Secciones de formulario */
.wpalp-form-section {
    padding: var(--wpalp-space-lg) 0 !important; /* 32px */
    border-bottom: 1px solid var(--wpalp-gray-lighter) !important;
}

.wpalp-form-section:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* Enlaces */
.wpalp-link {
    color: var(--wpalp-black) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.wpalp-link:hover {
    color: var(--wpalp-gray-dark) !important;
}

.wpalp-forgot-password {
    margin-top: var(--wpalp-space-sm) !important; /* 16px */
    text-align: left !important;
}

/* Términos y condiciones */
.wpalp-terms {
    font-size: 12px !important;
    color: var(--wpalp-gray-dark) !important;
    line-height: 18px !important;
    margin: var(--wpalp-space-lg) 0 !important; /* 32px */
    text-align: center !important;
}

.wpalp-terms a {
    color: var(--wpalp-black) !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

/* Mensajes - Estilo Airbnb */
.wpalp-message {
    padding: var(--wpalp-space-sm) var(--wpalp-space-md) !important; /* 16px 24px */
    border-radius: var(--wpalp-radius-sm) !important;
    margin-bottom: var(--wpalp-space-md) !important; /* 24px */
    font-size: 14px !important;
    line-height: 20px !important;
    font-weight: 500 !important;
    animation: wpalp-slideDown 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.wpalp-message-error {
    background-color: #FFF8F6 !important;
    color: #C13515 !important;
    border: 1px solid #FFEBEE !important;
}

.wpalp-message-success {
    background-color: #F0FFF4 !important;
    color: #0A7C42 !important;
    border: 1px solid #E8F5E9 !important;
}

/* Estados de campos */
.wpalp-field-error .wpalp-field-input {
    border-color: #C13515 !important;
    background-color: #FFF8F6 !important;
}

.wpalp-field-success .wpalp-field-input {
    border-color: #0A7C42 !important;
}

.wpalp-field-disabled {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.wpalp-field-disabled .wpalp-field-input {
    background-color: var(--wpalp-gray-lightest) !important;
    color: var(--wpalp-gray-dark) !important;
}

/* Loader elegante */
.wpalp-loading-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    display: none; /* Por defecto oculto */
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    border-radius: var(--wpalp-radius-md) !important;
    backdrop-filter: blur(2px) !important;
}

.wpalp-loading-overlay.wpalp-loader-active {
    display: flex !important;
}

.wpalp-spinner {
    width: 36px !important;
    height: 36px !important;
    border: 3px solid var(--wpalp-gray-lighter) !important;
    border-top-color: var(--wpalp-primary) !important;
    border-radius: 50% !important;
    animation: wpalp-spin 0.8s linear infinite !important;
}

/* Animaciones suaves estilo Airbnb */
@keyframes wpalp-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wpalp-slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wpalp-slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wpalp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Transiciones entre formularios */
.wpalp-form-exit {
    opacity: 0 !important;
    transform: translateX(-20px) !important;
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.wpalp-form-enter {
    opacity: 0 !important;
    transform: translateX(20px) !important;
    animation: wpalp-formEnter 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

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

/* Responsive - Mobile optimizado */
@media (max-width: 768px) {
    .wpalp-modal-wrapper {
        padding: 0 !important;
        align-items: stretch !important;
    }
    
    .wpalp-auth-modal {
        max-width: 100% !important;
        height: 100vh !important;
        border-radius: 0 !important;
        animation: wpalp-slideUpMobile 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    }
    
    .wpalp-modal-header {
        position: sticky !important;
        top: 0 !important;
        background-color: var(--wpalp-white) !important;
        z-index: 10 !important;
        padding: var(--wpalp-space-md) var(--wpalp-space-lg) !important;
        border-bottom: 1px solid var(--wpalp-gray-lighter) !important;
    }
    
    .wpalp-modal-body {
        padding: var(--wpalp-space-lg) var(--wpalp-space-md) !important;
        overflow-y: auto !important;
        flex: 1 !important;
    }
    
    .wpalp-welcome-title {
        font-size: 24px !important;
        line-height: 28px !important;
    }
    
    .wpalp-field-input,
    .wpalp-field-select {
        padding: 20px 16px !important; /* Más alto en mobile */
        font-size: 16px !important; /* Evitar zoom en iOS */
    }
    
    .wpalp-btn-primary,
    .wpalp-btn-social {
        padding: 20px 24px !important; /* Más alto en mobile */
        font-size: 16px !important;
    }
}

@keyframes wpalp-slideUpMobile {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .wpalp-modal-header {
        padding: var(--wpalp-space-sm) var(--wpalp-space-md) !important;
    }
    
    .wpalp-modal-body {
        padding: var(--wpalp-space-md) var(--wpalp-space-sm) !important;
    }
    
    .wpalp-field-group {
        margin-bottom: var(--wpalp-space-md) !important; /* 24px en vez de 32px */
    }
    
    .wpalp-welcome-title {
        font-size: 22px !important;
        line-height: 26px !important;
    }
    
    .wpalp-btn-close,
    .wpalp-btn-back {
        left: var(--wpalp-space-sm) !important; /* 16px */
    }
}

/* Estados de hover mejorados */
.wpalp-btn-primary,
.wpalp-btn-social {
    transform: translateZ(0) !important; /* Forzar aceleración hardware */
}

.wpalp-field-input,
.wpalp-field-select {
    transform: translateZ(0) !important; /* Forzar aceleración hardware */
}

/* Focus visible para accesibilidad */
.wpalp-btn-close:focus-visible,
.wpalp-btn-back:focus-visible,
.wpalp-btn-primary:focus-visible,
.wpalp-btn-social:focus-visible,
.wpalp-field-input:focus-visible,
.wpalp-link:focus-visible {
    outline: 2px solid var(--wpalp-primary) !important;
    outline-offset: 2px !important;
}