/* Main Container */
#diabetes-prediction-widget {
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#diabetes-prediction-widget h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.form-section legend {
    font-weight: 600;
    color: #495057;
    padding: 0 10px;
    font-size: 16px;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 160px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Status Messages */
.status-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Model Status */
#model-status {
    margin: 15px 0;
    border-radius: 6px;
    overflow: hidden;
}

/* Prediction Results */
#prediction-result {
    margin-top: 25px;
    display: none;
}

.prediction-result {
    padding: 25px;
    border-radius: 8px;
    border: 2px solid;
    background: white;
}

.risk-low {
    background: #d4edda;
    border-color: #28a745;
}

.risk-medium {
    background: #fff3cd;
    border-color: #ffc107;
}

.risk-high {
    background: #f8d7da;
    border-color: #dc3545;
}

.probability {
    font-size: 3em;
    font-weight: bold;
    text-align: center;
    margin: 15px 0;
    color: #2c3e50;
}

.risk-level {
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.method-details {
    margin: 15px 0;
    padding: 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 4px;
    font-size: 12px;
}

.recommendations {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.recommendations strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 10px;
}

.recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.recommendations li {
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    #diabetes-prediction-widget {
        padding: 15px;
        margin: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        min-width: 100%;
    }
    
    .probability {
        font-size: 2.2em;
    }
    
    .risk-level {
        font-size: 1.4em;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}