/**
 * BotFend Anti-Bot Firewall - Block & Unblock Page Styles
 * File: assets/css/botfend-block.css
 */

/* Global Resets & Body */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background: #f7f7f7; 
    color: #333; 
    line-height: 1.6; 
    margin: 0; 
    padding: 20px; 
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Main Container */
.container { 
    max-width: 600px; 
    margin: 100px auto; 
    background: white; 
    padding: 40px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

/* Headings */
h1 { 
    color: #dc3545; /* Red for block pages */
    margin-top: 0; 
    margin-bottom: 20px;
}

/* Form Page Specific Heading */
.whitelist-option + form + h1, 
form h1 {
    color: #007cba; /* WP Blue for unblock form */
}

/* Buttons & Links */
.btn, button { 
    display: inline-block; 
    background: #007cba; 
    color: white; 
    padding: 12px 24px; 
    text-decoration: none; 
    border-radius: 4px; 
    margin-top: 20px; 
    border: none; 
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.btn:hover, button:hover { 
    background: #006ba1; 
}

/* Form Elements */
form {
    margin-top: 20px;
}

input[type="email"], 
textarea { 
    width: 100%; 
    padding: 12px; 
    margin: 10px 0; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-family: inherit;
}

input[type="checkbox"] {
    margin-right: 8px;
}

form button {
    width: 100%;
    margin-top: 15px;
}

/* Notices & Alerts */
.notice { 
    background: #fff3cd; /* Warning Yellow for active blocks */
    border: 1px solid #ffecb5; 
    color: #856404; 
    padding: 15px; 
    border-radius: 4px; 
    margin: 20px 0; 
}

.permanent-notice, .error { 
    background: #f8d7da; /* Error Red for permanent blocks & errors */
    border: 1px solid #f5c6cb; 
    color: #721c24; 
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.whitelist-info, .whitelist-option, .success { 
    background: #d4edda; /* Success Green */
    border: 1px solid #c3e6cb; 
    color: #155724; 
    padding: 15px; 
    border-radius: 4px; 
    margin: 15px 0; 
    font-size: 14px; 
}

/* Lists */
ul {
    margin-bottom: 0;
    padding-left: 20px;
}

li {
    margin-bottom: 5px;
}

/* Footer Text */
small {
    color: #666;
    display: block;
    margin-top: 30px;
    text-align: center;
}


/* =========================================================
   JS Challenge & Verification Page Specific Styles 
   (Appended from Challenges.php)
========================================================= */

/* Flexbox Centering for the full-screen challenge */
.challenge-body {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh;
}

/* Animations */
@keyframes slideUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* Spinner Elements */
.spinner-container { 
    margin: 0 auto 20px; 
    position: relative; 
    width: 80px; 
    height: 80px; 
}

.spinner { 
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #007cba; 
    border-radius: 50%; 
    width: 80px; 
    height: 80px; 
    animation: spin 1s linear infinite; 
}

/* Progress Bar */
.progress-bar { 
    width: 100%; 
    height: 6px; 
    background: #f0f0f0; 
    border-radius: 3px; 
    margin: 20px 0; 
    overflow: hidden; 
}

.progress-fill { 
    height: 100%; 
    background: #007cba; 
    width: 0%; 
    transition: width 0.3s ease; 
    border-radius: 3px; 
}

/* UI Badges & Links */
.security-badge { 
    display: inline-block; 
    padding: 6px 12px; 
    background: #e8f5e9; 
    color: #2e7d32; 
    border-radius: 20px; 
    font-size: 12px; 
    margin-top: 20px; 
}

.learn-more-link { 
    color: #007cba; 
    text-decoration: none; 
    cursor: pointer; 
    border-bottom: 1px dotted #007cba; 
}

.learn-more-link:hover { 
    color: #005a87; 
}

/* Explanation Box Dropdown */
.explanation-box { 
    display: none; 
    background: #f8f9fa; 
    border-left: 4px solid #007cba; 
    padding: 15px; 
    margin: 20px 0; 
    text-align: left; 
    border-radius: 4px; 
}

.explanation-box.show { 
    display: block; 
    animation: fadeIn 0.3s ease; 
}

/* Utility Classes */
.hidden { 
    display: none; 
}

/* Mobile Responsiveness for Challenge box */
@media (max-width: 600px) {
    .container { padding: 30px 20px; }
    h2 { font-size: 20px; }
}


/* =========================================================
   TOR Challenge Overlay Styles 
   (Appended from TorSystem.php)
========================================================= */
.botfend-challenge-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.9); 
    z-index: 999999; 
    display: none;
}

.botfend-challenge-modal {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background: white; 
    padding: 40px; 
    border-radius: 10px; 
    text-align: center; 
    max-width: 500px; 
    width: 90%;
}

.botfend-modal-title {
    color: #333; 
    margin-bottom: 15px;
    font-size: 24px;
}

.botfend-modal-text {
    color: #666; 
    line-height: 1.6; 
    margin-bottom: 20px;
}

.botfend-btn-primary {
    background: #007cba;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.botfend-btn-primary:hover {
    background: #005a87;
}

.botfend-spinner {
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #007cba; 
    border-radius: 50%; 
    width: 50px; 
    height: 50px; 
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.botfend-success-text {
    color: #28a745;
    font-weight: bold;
}

.botfend-error-text {
    color: #dc3545;
}

.botfend-hidden {
    display: none;
}