/**
 * Two-Factor Authentication CSS Styles
 * Styles for 2FA modals, forms, and components
 */

/* 2FA Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* 2FA Status Styles */
.twofa-status {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.twofa-status.enabled {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.twofa-status.disabled {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* 2FA Action Buttons */
.twofa-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.twofa-setup {
    margin-top: 20px;
}

/* Button Styles */
.btn-primary {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #005a8b;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-security {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-security:hover {
    background-color: #218838;
}

.btn-link {
    background: none;
    border: none;
    color: #007cba;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

.btn-link:hover {
    color: #005a8b;
}

/* Backup Codes Styles */
.backup-codes {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.backup-code {
    padding: 8px 12px;
    margin: 5px 0;
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
}

.backup-codes-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
}

/* 2FA Form Styles */
.auth-actions {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* 2FA Code Input Styling */
input[name="2fa_code"] {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    letter-spacing: 3px;
    text-align: center;
    padding: 15px;
    border: 2px solid #007cba;
    border-radius: 8px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

input[name="2fa_code"]:focus {
    outline: none;
    border-color: #005a8b;
    box-shadow: 0 0 10px rgba(0, 124, 186, 0.3);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .twofa-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
}
