/**
 * Jetpack Security Clone - Frontend CSS
 * Styles for login security, CAPTCHA, 2FA, and blocked pages
 */

/* ==========================================================================
   Login Page Security Enhancements
   ========================================================================== */

/* CAPTCHA Field Styling */
.jsc-captcha-field {
    margin-bottom: 16px;
    padding: 12px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.jsc-captcha-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.jsc-captcha-field .jsc-captcha-question {
    display: inline-block;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 16px;
    font-weight: bold;
    color: #0073aa;
    margin-right: 10px;
}

.jsc-captcha-field input[type="text"] {
    width: 80px;
    padding: 8px;
    font-size: 16px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.jsc-captcha-field input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* ==========================================================================
   Two-Factor Authentication
   ========================================================================== */

/* 2FA Login Form */
.jsc-2fa-form {
    max-width: 320px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.jsc-2fa-form h2 {
    margin: 0 0 20px;
    font-size: 20px;
    text-align: center;
    color: #333;
}

.jsc-2fa-form .jsc-2fa-icon {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #0073aa;
    border-radius: 50%;
    text-align: center;
    line-height: 64px;
    font-size: 28px;
    color: #fff;
}

.jsc-2fa-code-input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.jsc-2fa-code-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
}

.jsc-2fa-code-input::placeholder {
    letter-spacing: normal;
    font-size: 14px;
    color: #999;
}

.jsc-2fa-submit {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #0073aa;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.jsc-2fa-submit:hover {
    background: #005a87;
}

.jsc-2fa-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Backup Code Option */
.jsc-2fa-backup-link {
    display: block;
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.jsc-2fa-backup-link a {
    color: #0073aa;
    text-decoration: none;
}

.jsc-2fa-backup-link a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Blocked/Firewall Page
   ========================================================================== */

.jsc-blocked-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.jsc-blocked-content {
    max-width: 500px;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.jsc-blocked-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jsc-blocked-icon svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

.jsc-blocked-content h1 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #333;
}

.jsc-blocked-content p {
    margin: 0 0 20px;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.jsc-blocked-code {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    color: #666;
}

.jsc-blocked-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.jsc-blocked-actions a {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.jsc-blocked-actions .btn-primary {
    background: #0073aa;
    color: #fff;
}

.jsc-blocked-actions .btn-primary:hover {
    background: #005a87;
}

.jsc-blocked-actions .btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.jsc-blocked-actions .btn-secondary:hover {
    background: #e0e0e0;
}

/* ==========================================================================
   Security Notifications
   ========================================================================== */

.jsc-security-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    animation: jsc-slide-in 0.3s ease;
}

@keyframes jsc-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.jsc-security-notice.jsc-notice-warning {
    border-left: 4px solid #f0ad4e;
}

.jsc-security-notice.jsc-notice-error {
    border-left: 4px solid #dc3545;
}

.jsc-security-notice.jsc-notice-success {
    border-left: 4px solid #28a745;
}

.jsc-security-notice .jsc-notice-title {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.jsc-security-notice .jsc-notice-message {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.jsc-security-notice .jsc-notice-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.jsc-security-notice .jsc-notice-close:hover {
    color: #333;
}

/* ==========================================================================
   Password Strength Indicator
   ========================================================================== */

.jsc-password-strength {
    margin-top: 10px;
}

.jsc-password-strength-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.jsc-password-strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.jsc-password-strength-fill.weak {
    width: 25%;
    background: #dc3545;
}

.jsc-password-strength-fill.fair {
    width: 50%;
    background: #f0ad4e;
}

.jsc-password-strength-fill.good {
    width: 75%;
    background: #5bc0de;
}

.jsc-password-strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.jsc-password-strength-text {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.jsc-password-strength-text.valid {
    color: #28a745;
    font-weight: 600;
}

.jsc-password-strength-text.invalid {
    color: #dc3545;
}

/* Password Requirements Checklist */
.jsc-password-requirements {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.jsc-requirements-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jsc-requirements-list li {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    transition: color 0.2s ease;
}

.jsc-requirements-list li.jsc-req-pending {
    color: #6c757d;
}

.jsc-requirements-list li.jsc-req-passed {
    color: #28a745;
}

.jsc-req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.jsc-req-pending .jsc-req-icon {
    background: #e9ecef;
    color: #6c757d;
}

.jsc-req-passed .jsc-req-icon {
    background: #28a745;
    color: #fff;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 480px) {
    .jsc-blocked-content {
        padding: 30px 20px;
    }

    .jsc-blocked-content h1 {
        font-size: 22px;
    }

    .jsc-2fa-form {
        padding: 15px;
    }

    .jsc-2fa-code-input {
        font-size: 20px;
        letter-spacing: 5px;
    }

    .jsc-security-notice {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}
