/* KynGuard AI Frontend Styles */

/* Status Widget */
.kynguard-status-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kynguard-status-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    font-size: 18px;
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.status-dot.active {
    background: #46b450;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-text {
    font-weight: 600;
    color: #333;
}

.status-stats {
    display: grid;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #555;
}

.stat-value {
    color: #333;
    font-weight: 600;
}

/* Stats Widget */
.kynguard-stats-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kynguard-stats-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    font-size: 18px;
}

.kynguard-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.kynguard-stats-table th,
.kynguard-stats-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.kynguard-stats-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
}

.kynguard-stats-table tr:hover {
    background: #f9f9f9;
}

.kynguard-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #f9f9f9 0%, #e9e9e9 100%);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
    margin: 0;
}

/* Form Widget */
.kynguard-form-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kynguard-form-widget h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    font-size: 18px;
}

.kynguard-security-form {
    max-width: 500px;
}

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.kynguard-submit-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.kynguard-submit-btn:hover {
    background: #005a87;
}

.kynguard-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Success/Error Messages */
.kynguard-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 500;
}

.kynguard-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.kynguard-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.kynguard-message.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Loading Spinner */
.kynguard-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* URL Scanner */
.kynguard-url-scanner {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scanner-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.scanner-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.scanner-btn {
    background: #d63638;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.scanner-btn:hover {
    background: #a02b2b;
}

.scan-result {
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.scan-result.safe {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.scan-result.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.scan-result.danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.risk-level {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kynguard-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .scanner-input-group {
        flex-direction: column;
    }
    
    .scanner-btn {
        width: 100%;
    }
    
    .kynguard-status-widget,
    .kynguard-stats-widget,
    .kynguard-form-widget {
        padding: 15px;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .kynguard-status-widget h3,
    .kynguard-stats-widget h3,
    .kynguard-form-widget h3 {
        font-size: 16px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .kynguard-stats-table th,
    .kynguard-stats-table td {
        padding: 8px;
        font-size: 13px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .kynguard-status-widget,
    .kynguard-stats-widget,
    .kynguard-form-widget,
    .kynguard-url-scanner {
        background: #2c2c2c;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .kynguard-status-widget h3,
    .kynguard-stats-widget h3,
    .kynguard-form-widget h3 {
        color: #fff;
        border-bottom-color: #0073aa;
    }
    
    .status-indicator {
        background: #3a3a3a;
    }
    
    .stat-card {
        background: linear-gradient(135deg, #3a3a3a 0%, #2c2c2c 100%);
        border-color: #444;
    }
    
    .kynguard-stats-table th {
        background: #3a3a3a;
        color: #e0e0e0;
    }
    
    .form-field input,
    .form-field textarea,
    .scanner-input {
        background: #3a3a3a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .form-field label {
        color: #e0e0e0;
    }
} 