/* agent-studio-settings.css - ITERATION 301 */
/* Clean, modern settings interface */

.settings-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(20, 20, 20, 0.95);
}

.settings-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.settings-actions {
    display: flex;
    gap: 12px;
}

/* Two-column layout */
.settings-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar Navigation */
.settings-sidebar {
    width: 240px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 15, 15, 0.5);
    overflow-y: auto;
}

.settings-nav {
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.settings-nav-item.active {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-label {
    flex: 1;
}

/* Content Area */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* Section Styling */
.settings-section {
    max-width: 900px;
    margin: 0 auto;
}

.settings-section h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.section-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

/* Credentials Section */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.credential-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.credential-card:hover {
    background: rgba(35, 35, 35, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
}

.credential-card.configured {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.credential-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.credential-header h4 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.credential-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.credential-status.configured {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.credential-status.not-configured {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.credential-input-group {
    margin-bottom: 16px;
}

.credential-input-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.credential-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.credential-input:focus {
    outline: none;
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.credential-actions {
    display: flex;
    gap: 8px;
}

.test-result {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.test-result.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.test-result.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.test-result.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Preferences Section */
.preferences-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.preference-row {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 24px;
    align-items: center;
}

.preference-row.studio-generation-row {
    border-color: rgba(14, 165, 233, 0.3);
    background: rgba(14, 165, 233, 0.05);
}

.intent-info {
    flex: 1;
    min-width: 0;
}

.intent-info h4 {
    margin: 0 0 4px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.intent-info code {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.studio-hint {
    display: block;
    margin-top: 6px;
    color: rgba(14, 165, 233, 0.8);
    font-size: 12px;
}

.preference-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.agent-select,
.model-select {
    min-width: 180px;
    padding: 10px 12px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.agent-select:focus,
.model-select:focus {
    outline: none;
    border-color: rgba(14, 165, 233, 0.5);
}

.btn-save-preference {
    padding: 10px 20px;
    background: rgba(14, 165, 233, 0.9);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-preference:hover {
    background: rgba(14, 165, 233, 1);
    transform: translateY(-1px);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: rgba(14, 165, 233, 0.9);
    color: #fff;
}

.btn-primary:hover {
    background: rgba(14, 165, 233, 1);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(60, 60, 60, 0.8);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(70, 70, 70, 0.9);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 1);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No data states */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.no-data-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
    }
    
    .preference-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preference-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .agent-select,
    .model-select {
        width: 100%;
    }
}