/**
 * Estilos para Hunter Price - Temporary Access Recovery
 * 
 * @package HunterPrice\TemporaryAccessRecovery
 * @version 1.0.0
 */

/* ============================================
   VARIABLES Y COLORES
   ============================================ */
:root {
    --hp-primary: #667eea;
    --hp-primary-dark: #764ba2;
    --hp-secondary: #4caf50;
    --hp-error: #f44336;
    --hp-warning: #ff9800;
    --hp-info: #2196f3;
    --hp-light: #f5f5f5;
    --hp-light-2: #f9f9f9;
    --hp-text: #333333;
    --hp-text-light: #666666;
    --hp-text-lighter: #999999;
    --hp-border: #e0e0e0;
    --hp-border-light: #f0f0f0;
    --hp-shadow: rgba(0, 0, 0, 0.1);
    --hp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hp-color-1: #c24286;
}

/* ============================================
   LOGIN/REGISTER SECTIONS
   ============================================ */
.hp-section {
    display: none;
}

.hp-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.hp-access-recovery-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--hp-text);
}

.hp-access-recovery-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--hp-shadow);
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   HEADER
   ============================================ */
.hp-ar-header {
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
    color: #ffffff;
    padding: 40px 30px;
    text-align: center;
}

.hp-ar-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.hp-ar-subtitle {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

/* ============================================
   PASOS
   ============================================ */
.hp-ar-step {
    padding: 30px;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.hp-ar-step.hp-ar-step-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hp-ar-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.hp-ar-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
    color: #ffffff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.hp-ar-step-success {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--hp-secondary);
    color: #ffffff;
    border-radius: 50%;
    font-size: 20px;
    flex-shrink: 0;
}

.hp-ar-step-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--hp-text);
}

/* ============================================
   FORMULARIO
   ============================================ */
.hp-ar-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hp-ar-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hp-ar-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-ar-required {
    color: var(--hp-error);
}

.hp-ar-input,
.hp-ar-code-input {
    padding: 12px 15px;
    border: 2px solid var(--hp-border);
    border-radius: 6px;
    font-size: 16px;
    color: var(--hp-text);
    background: #ffffff;
    transition: var(--hp-transition);
    font-family: inherit;
}

.hp-ar-input:focus,
.hp-ar-code-input:focus {
    outline: none;
    border-color: var(--hp-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hp-ar-code-input {
    letter-spacing: 8px;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-align: center;
}

/* ============================================
   OTP INPUTS (6 CAJAS SEPARADAS)
   ============================================ */
.hp-ar-otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.hp-ar-otp-input {
    width: 50px;
    height: 60px;
    padding: 0;
    border: 2px solid var(--hp-border);
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-align: center;
    color: var(--hp-text);
    background: #ffffff;
    transition: var(--hp-transition);
}

.hp-ar-otp-input:focus {
    outline: none;
    border-color: var(--hp-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    transform: scale(1.05);
}

.hp-ar-otp-input:disabled {
    background: var(--hp-light);
    cursor: not-allowed;
}

.hp-ar-otp-input.hp-ar-input-error {
    border-color: var(--hp-error);
    background: #ffebee;
    animation: shake 0.4s ease-in-out;
}

@media (max-width: 480px) {
    .hp-ar-otp-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
    
    .hp-ar-otp-container {
        gap: 6px;
    }
}

.hp-ar-form-hint {
    font-size: 12px;
    color: var(--hp-text-lighter);
    margin-top: 5px;
}

/* ============================================
   TIMER DE EXPIRACIÓN
   ============================================ */
.hp-ar-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    border-left: 4px solid var(--hp-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--hp-text);
    transition: var(--hp-transition);
}

.hp-ar-timer-icon {
    font-size: 18px;
}

.hp-ar-timer-text {
    font-weight: 500;
}

.hp-ar-timer-countdown {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--hp-primary);
    min-width: 50px;
    text-align: center;
}

.hp-ar-timer-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffebee 100%);
    border-left-color: var(--hp-error);
    animation: pulse 1.5s ease-in-out infinite;
}

.hp-ar-timer-warning .hp-ar-timer-countdown {
    color: var(--hp-error);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* ============================================
   BOTONES
   ============================================ */
.hp-ar-button {
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--hp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.hp-ar-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hp-ar-button-primary {
    background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
    color: #ffffff;
    width: 100%;
}

.hp-ar-button-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.hp-ar-button-primary:active:not(:disabled) {
    transform: translateY(0);
}

.hp-ar-button-secondary {
    background: var(--hp-light);
    color: var(--hp-primary);
    border: 2px solid var(--hp-primary);
    width: 100%;
}

.hp-ar-button-secondary:hover:not(:disabled) {
    background: var(--hp-primary);
    color: #ffffff;
}

.hp-ar-button-link {
    background: none;
    border: none;
    color: var(--hp-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    transition: var(--hp-transition);
    text-decoration: underline;
    font-family: inherit;
}

.hp-ar-button-link:hover:not(:disabled) {
    color: var(--hp-primary-dark);
    text-decoration: none;
}

.hp-ar-button-link:disabled {
    color: var(--hp-text-lighter);
    cursor: not-allowed;
    text-decoration: none;
}

.hp-ar-resend-container {
    margin-top: 15px;
    text-align: center;
}

.hp-ar-button-text {
    display: inline;
}

.hp-ar-button-loader {
    display: none;
}

.hp-ar-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ALERTAS
   ============================================ */
.hp-ar-alert {
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

.hp-ar-shake {
    animation: shake 0.4s ease-in-out;
}

.hp-ar-alert-error {
    background: #ffebee;
    color: #b71c1c;
    border: 2px solid #ef5350;
    font-weight: 600;
}

.hp-ar-alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 2px solid #4caf50;
    font-weight: 600;
}

.hp-ar-alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 2px solid #ff9800;
    font-weight: 600;
}

/* ============================================
   CAJA DE CONTRASEÑA
   ============================================ */
.hp-ar-password-box {
    background: var(--hp-light-2);
    border: 2px solid var(--hp-border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.hp-ar-password-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--hp-text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.hp-ar-password-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hp-ar-password-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--hp-border);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: var(--hp-text);
    background: #ffffff;
}

.hp-ar-copy-btn {
    padding: 8px 12px;
    background: var(--hp-primary);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: var(--hp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-ar-copy-btn:hover {
    background: var(--hp-primary-dark);
}

/* ============================================
   CONTENIDO DE ÉXITO
   ============================================ */
.hp-ar-success-content {
    padding: 10px 0;
}

.hp-ar-success-content > p {
    margin: 0 0 20px 0;
    color: var(--hp-text-light);
    line-height: 1.6;
}

.hp-ar-loading {
    text-align: center;
    padding: 40px 0;
}

.hp-ar-loading .hp-ar-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-top-color: var(--hp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.hp-ar-loading p {
    margin-top: 15px;
    color: var(--hp-text-light);
    font-size: 14px;
}

.hp-ar-success-info {
    background: #e3f2fd;
    border-left: 4px solid var(--hp-info);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.hp-ar-success-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #0d47a1;
}

/* ============================================
   LINKS Y PIE DE PÁGINA
   ============================================ */
.hp-ar-footer-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--hp-text-light);
}

.hp-ar-footer-link a {
    color: var(--hp-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--hp-transition);
}

.hp-ar-footer-link a:hover {
    color: var(--hp-primary-dark);
    text-decoration: underline;
}

/* ============================================
   MODAL
   ============================================ */
.hp-ar-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.hp-ar-modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 30px;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hp-ar-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--hp-text-lighter);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hp-transition);
}

.hp-ar-modal-close:hover {
    color: var(--hp-text);
}

.hp-ar-modal-content h3 {
    margin: 0 0 20px 0;
    color: var(--hp-text);
    font-size: 20px;
}

.hp-ar-modal-content ol {
    margin: 0 0 20px 0;
    padding-left: 20px;
    line-height: 1.8;
}

.hp-ar-modal-content li {
    margin-bottom: 12px;
    color: var(--hp-text-light);
}

.hp-ar-modal-content p {
    margin: 15px 0 0 0;
    padding: 15px;
    background: var(--hp-light);
    border-radius: 6px;
    font-size: 13px;
    color: var(--hp-text-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .hp-access-recovery-container {
        margin: 20px 10px;
        padding: 10px;
    }

    .hp-ar-header {
        padding: 30px 20px;
    }

    .hp-ar-title {
        font-size: 24px;
    }

    .hp-ar-step {
        padding: 20px;
    }

    .hp-ar-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .hp-ar-modal-content {
        padding: 30px 20px;
        max-width: calc(100% - 40px);
    }

    .hp-ar-code-input {
        letter-spacing: 6px;
    }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */
.hp-ar-button:focus,
.hp-ar-input:focus,
.hp-ar-code-input:focus {
    outline: 2px solid var(--hp-primary);
    outline-offset: 2px;
}

/* Impresión */
@media print {
    .hp-access-recovery-container {
        box-shadow: none;
    }

    .hp-ar-button {
        display: none;
    }
}

/* ============================================
   ESTILOS PARA LOGIN/REGISTRO (hp_login shortcode)
   ============================================ */
.hp-login-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.hp-login-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

.hp-login-header {
    background: linear-gradient(135deg, var(--hp-color-1) 0%, #9b3366 100%);
    padding: 40px 30px;
    text-align: center;
}

.hp-login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffffff !important;
}

.hp-login-header p {
    font-size: 14px;
    margin: 0;
    opacity: 0.95;
    line-height: 1.5;
}

.hp-login-content {
    padding: 30px;
}

/* Form Groups */
.hp-form-group {
    margin-bottom: 20px;
}

.hp-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--hp-text);
    margin-bottom: 8px;
}

.hp-form-group input[type="text"],
.hp-form-group input[type="email"],
.hp-form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--hp-border);
    border-radius: 8px;
    transition: var(--hp-transition);
    font-family: inherit;
    box-sizing: border-box;
}

.hp-form-group input:focus {
    outline: none;
    border-color: var(--hp-color-1);
    box-shadow: 0 0 0 3px rgba(194, 66, 134, 0.1);
}

.hp-form-group input:disabled,
.hp-form-group input[readonly] {
    background-color: var(--hp-light);
    cursor: not-allowed;
}

/* Help Text */
.hp-help-text {
    font-size: 12px;
    color: var(--hp-text-light);
    margin-top: 6px;
    line-height: 1.4;
}

/* Info Box */
.hp-info-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 4px solid var(--hp-secondary);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--hp-text);
    line-height: 1.5;
}

/* Step Indicator */
.hp-step-indicator {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--hp-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Buttons */
.hp-button {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--hp-transition);
    font-family: inherit;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

.hp-button-primary {
    background: linear-gradient(135deg, var(--hp-color-1) 0%, #9b3366 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(194, 66, 134, 0.3);
}

.hp-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 66, 134, 0.4);
}

.hp-button-primary:active {
    transform: translateY(0);
}

.hp-button-secondary {
    background: transparent;
    color: var(--hp-text-light);
    border: 2px solid var(--hp-border);
    margin-top: 10px;
}

.hp-button-secondary:hover {
    background: var(--hp-light);
    border-color: var(--hp-text-light);
}

/* Login Options */
.hp-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.hp-option-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--hp-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--hp-text);
    cursor: pointer;
    transition: var(--hp-transition);
}

.hp-option-btn:hover {
    border-color: var(--hp-color-1);
    background: rgba(194, 66, 134, 0.05);
}

.hp-option-btn.active {
    background: linear-gradient(135deg, var(--hp-color-1) 0%, #9b3366 100%);
    color: #ffffff;
    border-color: var(--hp-color-1);
}

/* Error Messages */
.hp-error-message {
    display: none;
    background: #ffebee;
    color: var(--hp-error);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 10px;
    border-left: 4px solid var(--hp-error);
    line-height: 1.5;
    animation: shake 0.4s ease;
}

.hp-error-message.show {
    display: block;
}

/* Success Message */
.hp-success-message {
    display: none;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    color: var(--hp-secondary);
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    margin-top: 20px;
    border-left: 4px solid var(--hp-secondary);
    animation: slideIn 0.4s ease;
}

.hp-success-message.show {
    display: block;
}

/* Loading Section */
.hp-loading {
    text-align: center;
    padding: 40px 20px;
}

.hp-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--hp-border-light);
    border-top-color: var(--hp-color-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360px);
    }
}

.hp-loading p {
    color: var(--hp-text-light);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 480px) {
    .hp-login-wrapper {
        margin: 20px 10px;
        padding: 10px;
    }

    .hp-login-header {
        padding: 30px 20px;
    }

    .hp-login-header h1 {
        font-size: 24px;
    }

    .hp-login-content {
        padding: 20px;
    }

    .hp-button {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* ============================================
   PASSWORD STRENGTH INDICATOR
   ============================================ */
.hp-password-strength-container {
    margin-top: 10px;
    margin-bottom: 10px;
}

.hp-password-strength-bar {
    height: 8px;
    background: var(--hp-border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.hp-password-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.hp-password-strength-fill.weak {
    background: linear-gradient(90deg, #ef5350 0%, #e53935 100%);
}

.hp-password-strength-fill.medium {
    background: linear-gradient(90deg, #ffa726 0%, #ff9800 100%);
}

.hp-password-strength-fill.strong {
    background: linear-gradient(90deg, #66bb6a 0%, #4caf50 100%);
}

.hp-password-strength-text {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hp-password-strength-text.weak {
    color: #ef5350;
}

.hp-password-strength-text.medium {
    color: #ff9800;
}

.hp-password-strength-text.strong {
    color: #4caf50;
}

.hp-password-criteria {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: var(--hp-text-light);
}

.hp-password-criteria li {
    padding: 4px 0;
    transition: color 0.2s ease;
}

.hp-password-criteria li.valid {
    color: #4caf50;
    font-weight: 600;
}

/* ============================================
   INPUT WITH VALIDATION ICON
   ============================================ */
.hp-input-with-validation {
    position: relative;
}

.hp-validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hp-validation-icon.valid {
    color: #4caf50;
    opacity: 1;
}

.hp-validation-icon.invalid {
    color: #ef5350;
    opacity: 1;
}

.hp-validation-icon.warning {
    color: #ff9800;
    opacity: 1;
}

/* ============================================
   EMAIL SUGGESTION
   ============================================ */
.hp-email-suggestion {
    font-size: 12px;
    color: var(--hp-text-light);
    margin-top: 6px;
    padding: 8px 12px;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    border-radius: 4px;
    display: none;
    animation: slideDown 0.3s ease;
}

.hp-email-suggestion.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CAPS LOCK WARNING
   ============================================ */
.hp-input-with-icon {
    position: relative;
}

.hp-caps-lock-warning {
    position: absolute;
    right: 48px;
    top: 12px;
    font-size: 18px;
    color: #ff9800;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
    z-index: 2;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ============================================
   PASSWORD TOGGLE BUTTON (OJITO)
   ============================================ */
.hp-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 3;
    border-radius: 4px;
}

.hp-password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-50%) scale(1.1);
}

.hp-password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.hp-password-toggle:focus {
    outline: 2px solid var(--hp-color-1);
    outline-offset: 2px;
}

.eye-icon {
    display: block;
    user-select: none;
}

.hp-input-with-toggle {
    position: relative;
}

.hp-input-with-toggle input {
    padding-right: 80px !important;
}

.hp-input-with-icon input {
    padding-right: 80px !important;
}

.hp-input-with-toggle .hp-validation-icon {
    right: 45px;
}

/* ============================================
   FORM INPUT VISUAL FEEDBACK
   ============================================ */
.hp-form-group input.valid {
    border-color: #4caf50;
    background: linear-gradient(to right, rgba(76, 175, 80, 0.03) 0%, transparent 100%);
}

.hp-form-group input.invalid {
    border-color: #ef5350;
}

.hp-form-group input.valid:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   BUTTON LOADING STATE
   ============================================ */
.hp-button-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hp-button {
    position: relative;
}

.hp-button-text {
    transition: opacity 0.2s ease;
}

.hp-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   FORM INPUT FOCUS ENHANCEMENTS
   ============================================ */
.hp-form-group input:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(194, 66, 134, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hp-form-group input[aria-invalid="true"] {
    border-color: var(--hp-error);
    animation: shake 0.4s ease;
}

/* ============================================
   SUCCESS ANIMATIONS
   ============================================ */
.hp-success-message.show {
    animation: slideIn 0.4s ease, pulse 0.6s ease 0.4s;
}

/* ============================================
   IMPROVED ACCESSIBILITY
   ============================================ */
.hp-form-group label {
    cursor: pointer;
}

.hp-form-group input:focus + .hp-validation-icon,
.hp-form-group input:focus + .hp-input-with-icon .hp-caps-lock-warning {
    z-index: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hp-validation-icon.valid {
        color: #2e7d32;
    }
    
    .hp-validation-icon.invalid {
        color: #c62828;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ALREADY LOGGED IN STATE
   ============================================ */
.hp-already-logged-in {
    max-width: 600px;
}

.hp-header-success {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    text-align: center;
    padding: 50px 30px;
}

.hp-success-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    animation: successPulse 1.5s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.hp-logged-in-info {
    padding: 20px 0;
}

.hp-info-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 4px solid #4caf50;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hp-logged-in-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.hp-button-large {
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 700;
}

.hp-button-large span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hp-button-outline {
    background: transparent;
    border: 2px solid var(--hp-text-light);
    color: var(--hp-text);
}

.hp-button-outline:hover {
    background: rgba(239, 83, 80, 0.05);
    border-color: #ef5350;
    color: #ef5350;
}

.hp-button-logout {
    margin-top: 8px;
}

@media (max-width: 480px) {
    .hp-header-success {
        padding: 40px 20px;
    }
    
    .hp-success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
}
