/*
 * embedding_settings.css
 * Styles for the Embedding Settings page
 * Extracted from embedding_settings.html
 */

.ldr-library-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-primary, #1a1a1a);
    min-height: 100vh;
}

.ldr-library-header {
    margin-bottom: 30px;
}

.ldr-library-header h1 {
    color: var(--text-primary, #e4e4e4);
    font-size: 2em;
    margin: 0 0 10px 0;
}

.ldr-library-header .ldr-subtitle {
    color: var(--text-secondary, #999);
    font-size: 1.1em;
    margin-top: 10px;
}

.ldr-rag-config-panel,
.ldr-rag-stats-panel,
.ldr-rag-operations-panel,
.ldr-rag-documents-panel {
    background: var(--card-bg, #2a2a2a);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(var(--shadow-color-rgb), 0.3);
    border: 1px solid var(--border-color, #333);
}

.ldr-rag-config-panel h2,
.ldr-rag-stats-panel h2,
.ldr-rag-operations-panel h2,
.ldr-rag-documents-panel h2 {
    margin-bottom: 20px;
    color: var(--text-primary, #e4e4e4);
    font-size: 1.5em;
}

.ldr-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .ldr-config-grid {
        grid-template-columns: 1fr;
    }
}

.ldr-config-section {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #444);
}

.ldr-config-section h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: var(--text-primary, #e4e4e4);
}

.ldr-info-box {
    background: var(--card-bg, #2a2a2a);
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.ldr-info-box .ldr-alert {
    margin: 0;
    padding: 12px;
}

.ldr-info-box:has(.ldr-alert) {
    background: transparent;
    padding: 0;
    border: none;
}

.ldr-info-box .ldr-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color, #444);
}

.ldr-info-box .ldr-info-item:last-child {
    border-bottom: none;
}

.ldr-info-box .ldr-info-label {
    font-weight: 600;
    color: var(--text-secondary, #999);
}

.ldr-info-box .ldr-info-value {
    color: var(--text-primary, #e4e4e4);
}

.ldr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.ldr-stat-card {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid var(--success-color);
    border: 1px solid var(--border-color, #444);
}

.ldr-stat-card.ldr-warning {
    border-left-color: var(--warning-color);
}

.ldr-stat-card .ldr-stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--text-primary, #e4e4e4);
    display: block;
}

.ldr-stat-card .ldr-stat-label {
    color: var(--text-secondary, #999);
    margin-top: 10px;
    font-size: 0.9em;
}

.ldr-operations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}


/* Modal Styles */
.ldr-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ldr-modal-content {
    background: var(--card-bg, #2a2a2a);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.ldr-modal-large {
    max-width: 800px;
}

.ldr-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #444);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ldr-modal-close {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary, #999);
    cursor: pointer;
}

.ldr-modal-close:hover {
    color: var(--text-primary, #e4e4e4);
}

.ldr-modal-body {
    padding: 20px;
}

.ldr-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color, #444);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


.ldr-mb-2 {
    margin-bottom: 10px;
}

.ldr-mt-2 {
    margin-top: 10px;
}

.ldr-mt-3 {
    margin-top: 15px;
}

.ldr-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.ldr-col-md-6 {
    flex: 1;
}

.ldr-mt-4 {
    margin-top: 20px;
}

.ldr-loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary, #999);
    font-size: 1.2em;
}

.ldr-log-container {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color, #444);
}

.ldr-log-entry {
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color, #444);
}

.ldr-log-entry:last-child {
    border-bottom: none;
}

.ldr-log-entry.ldr-success {
    color: var(--success-color);
}

.ldr-log-entry.ldr-error {
    color: var(--error-color);
}

.ldr-log-entry.ldr-info {
    color: var(--accent-tertiary);
}

.ldr-documents-list {
    margin-top: 20px;
}

.ldr-filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ldr-document-item {
    background: var(--bg-tertiary);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color, #444);
}

.ldr-document-info {
    flex: 1;
}

.ldr-document-title {
    font-weight: 600;
    color: var(--text-primary, #e4e4e4);
    margin-bottom: 5px;
}

.ldr-document-meta {
    font-size: 0.9em;
    color: var(--text-secondary, #999);
}

.ldr-document-actions {
    display: flex;
    gap: 10px;
}

.ldr-badge-indexed {
    background: var(--success-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.ldr-badge-unindexed {
    background: var(--btn-secondary-bg);
    color: var(--text-on-accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Alert styles now use global themed styles from styles.css */

.ldr-btn-sm {
    padding: 4px 10px;
    font-size: 0.85em;
}
