/* LINUXENIC Challenge Plugin Styles */

.linuxenic-challenge-container {
    max-width: 700px;
    margin: 20px 0;
    padding: 25px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.linuxenic-challenge-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.linuxenic-challenge-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004366 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.4);
}

.linuxenic-challenge-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.linuxenic-challenge-btn:active {
    transform: translateY(0);
}

/* Challenge Status Styles */
.challenge-status {
    margin-top: 25px;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    background: #f8f9fa;
}

.challenge-status .loading {
    color: #495057;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 10px;
}

.challenge-status .loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.challenge-status .success {
    background: #d4f6d4;
    border-left-color: #28a745;
    border: 1px solid #c3e6cb;
    padding: 20px;
    border-radius: 6px;
}

.challenge-status .success h4 {
    color: #155724;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.challenge-status .error {
    background: #f8d7da;
    border-left-color: #dc3545;
    border: 1px solid #f5c6cb;
    padding: 20px;
    border-radius: 6px;
}

.challenge-status .error .error-message {
    color: #721c24;
    margin: 0 0 15px 0;
    font-weight: 500;
}

/* Challenge Info Styles */
.challenge-info {
    margin-bottom: 20px;
}

.challenge-info p {
    margin: 8px 0;
    line-height: 1.5;
}

.challenge-info strong {
    color: #343a40;
    font-weight: 600;
}

.challenge-url {
    color: #007cba;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

.challenge-url:hover {
    color: #005a87;
    text-decoration: underline;
}

.container-name, .expires-at {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

/* OpenVPN Section */
.openvpn-section {
    margin: 20px 0;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 6px;
    border: 1px solid #b8daff;
}

.download-openvpn-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.download-openvpn-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.download-openvpn-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.openvpn-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #dee2e6;
}

.openvpn-status .success {
    color: #155724;
    background: #d4f6d4;
    border-color: #c3e6cb;
}

.openvpn-status .error {
    color: #721c24;
    background: #f8d7da;
    border-color: #f5c6cb;
}

/* Instructions Section */
.instructions {
    margin-top: 20px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

.instructions h4 {
    color: #856404;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.instructions ol {
    color: #856404;
    margin: 15px 0;
    padding-left: 20px;
}

.instructions ol li {
    margin: 8px 0;
    line-height: 1.5;
}

.hosts-entry {
    display: block;
    background: #2d3748;
    color: #e2e8f0;
    padding: 12px 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 10px 0;
    border: 2px solid #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: all;
}

.hosts-entry:hover {
    background: #4a5568;
    border-color: #718096;
}

.hosts-entry:active {
    background: #2a69ac;
    border-color: #3182ce;
}

.hosts-help {
    background: #f7fafc;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    border-left: 4px solid #4299e1;
}

.hosts-help p {
    margin: 8px 0;
    color: #2d3748;
    font-size: 14px;
}

.hosts-help ul {
    margin: 10px 0;
    padding-left: 20px;
}

.hosts-help ul li {
    margin: 5px 0;
    color: #4a5568;
}

.hosts-help em {
    color: #718096;
    font-style: italic;
}

/* Retry Button */
.retry-btn {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e8590c 100%);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .linuxenic-challenge-container {
        margin: 15px 0;
        padding: 20px;
    }
    
    .linuxenic-challenge-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .download-openvpn-btn {
        width: 100%;
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .hosts-entry {
        font-size: 12px;
        padding: 10px 12px;
        word-break: break-all;
    }
    
    .instructions ol {
        padding-left: 15px;
    }
}

@media (max-width: 480px) {
    .linuxenic-challenge-container {
        margin: 10px 0;
        padding: 15px;
    }
    
    .challenge-info p {
        font-size: 14px;
    }
    
    .challenge-url, .container-name, .expires-at {
        word-break: break-all;
        font-size: 12px;
    }
}

/* Loading Animation Enhancement */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 2s linear infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Success/Error Message Enhancements */
.status-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    margin-right: 8px;
}

.success .status-icon {
    background: #28a745;
}

.error .status-icon {
    background: #dc3545;
}

.success .status-icon::before {
    content: '✓';
}

.error .status-icon::before {
    content: '✗';
}

/* Accessibility Improvements */
.linuxenic-challenge-btn:focus,
.download-openvpn-btn:focus,
.retry-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.hosts-entry:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .linuxenic-challenge-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .linuxenic-challenge-btn,
    .download-openvpn-btn,
    .retry-btn {
        background: #000 !important;
        color: #fff !important;
    }
}