/* Dynamic Models Styles */

/* Model container */
#dynamic-models-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.model-list-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.add-model-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.add-model-btn:hover {
    background: var(--primary-hover);
}

/* Individual model card - matching personality-subsection style */
.dynamic-model {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.dynamic-model:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.model-type-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: capitalize;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-type-label::before {
    content: '🤖';
    font-size: 1rem;
}

.model-name-input {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem;
    border: 2px solid transparent;
    background: transparent;
    color: var(--text-primary);
    border-radius: 4px;
    transition: all 0.2s;
}

.model-name-input:focus {
    background: white;
    border-color: var(--primary-color);
    outline: none;
}

.remove-model-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.remove-model-btn:hover {
    background: #dc2626;
}

.model-description-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.model-description-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Model parameters section */
.model-parameters {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

.model-parameters .form-group {
    margin-bottom: 1rem;
}

.model-parameters .form-group:last-child {
    margin-bottom: 0;
}

.model-parameters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.model-temperature,
.model-top-p {
    width: 100%;
}

.temp-value,
.top-p-value {
    display: inline-block;
    min-width: 3rem;
    text-align: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary-color);
}

.model-max-tokens {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.model-max-tokens:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Save button section */
.save-models-section {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

#save-models-config {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

#save-models-config:hover {
    background: #059669;
}

/* Dark mode is handled by CSS variables, no need for specific overrides */