/* Rat Two-Factor Authentication Login Styles */

#rat-2fa-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#rat-2fa-container h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    text-align: center;
}

#rat-2fa-container p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

#rat_2fa_code {
    width: 100%;
    padding: 12px;
    font-size: 24px;
    letter-spacing: 4px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
    transition: border-color 0.3s;
}

#rat_2fa_code:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

#rat_2fa_code:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

#rat-2fa-resend {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.3s ease;
}

#rat-2fa-resend:hover:not(:disabled) {
    background-color: #f0f0f0;
    border-color: #999;
    color: #23282d;
}

#rat-2fa-resend:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#rat-2fa-message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    display: none;
}

#rat-2fa-message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

#rat-2fa-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Loading state */
.rat-2fa-loading {
    position: relative;
    pointer-events: none;
}

.rat-2fa-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #007cba;
    border-radius: 50%;
    animation: rat-2fa-spin 0.8s infinite linear;
}

@keyframes rat-2fa-spin {
    to {
        transform: rotate(360deg);
    }
}

.rat-2fa-timer {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 10px 0;
}

.rat-2fa-timer.warning {
    color: #d63638;
    font-weight: 500;
}

.rat-2fa-instructions {
    background: #f0f0f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

.rat-2fa-instructions strong {
    color: #333;
}

.rat-2fa-help {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Override WordPress login form styles for better integration */
.login #rat-2fa-container .input {
    background: #f9f9f9;
    border: 2px solid #ddd;
    color: #333;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    text-align: center;
    padding: 12px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.login #rat-2fa-container .input:focus {
    background: #fff;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.login #rat-2fa-container .button {
    width: 100%;
    margin-top: 10px;
}

/* Responsive adjustments for mobile login */
@media screen and (max-width: 480px) {
    #rat-2fa-container {
        margin: 0 0 16px 0;
        padding: 15px;
    }
    
    #rat_2fa_code {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    #rat-2fa-resend {
        width: 100%;
        text-align: center;
    }
    
    .rat-2fa-instructions {
        padding: 12px;
        font-size: 12px;
    }
}

/* Animation for showing/hiding elements */
.rat-2fa-fade-in {
    animation: rat-2fa-fadeIn 0.3s ease-in;
}

.rat-2fa-fade-out {
    animation: rat-2fa-fadeOut 0.3s ease-out;
}

@keyframes rat-2fa-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rat-2fa-fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #rat-2fa-container {
        border: 2px solid #000;
    }
    
    #rat_2fa_code {
        border: 2px solid #000;
        background: #fff;
    }
    
    #rat_2fa_code:focus {
        border-color: #0073aa;
        box-shadow: 0 0 0 2px #0073aa;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .rat-2fa-loading {
        animation: none;
    }
    
    .rat-2fa-fade-in,
    .rat-2fa-fade-out {
        animation: none;
    }
    
    * {
        transition: none !important;
    }
} 