/* Multi-Query and Publication Manuscript User Input Tables - Theme Aware */

.multi-query-user-input,
.publication-manuscript-user-input {
    margin-bottom: 1rem;
}

.multi-query-user-input h5,
.publication-manuscript-user-input h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.multi-query-user-input h5:hover,
.publication-manuscript-user-input h5:hover {
    opacity: 0.8;
}

.multi-query-user-input h5 .toggle-icon,
.publication-manuscript-user-input h5 .toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.multi-query-user-input h5 .toggle-icon.collapsed,
.publication-manuscript-user-input h5 .toggle-icon.collapsed {
    transform: rotate(-90deg);
}

/* Table wrapper for collapse functionality */
.table-collapse-wrapper {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.table-collapse-wrapper.collapsed {
    max-height: 0;
}

/* Theme-aware table styling */
.theme-aware-table {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.theme-aware-table thead th {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
}

.theme-aware-table tbody td {
    border-color: var(--border-color);
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.theme-aware-table tbody tr:hover td {
    background-color: var(--bg-secondary);
}

/* Dark theme specific adjustments */
[data-theme="dark"] .theme-aware-table {
    background-color: #1a1a1a;
}

[data-theme="dark"] .theme-aware-table thead th {
    background-color: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .theme-aware-table tbody td {
    border-color: #404040;
    background-color: #1a1a1a;
}

[data-theme="dark"] .theme-aware-table tbody tr:hover td {
    background-color: #2d2d2d;
}

/* Warm theme specific adjustments */
[data-theme="warm"] .theme-aware-table {
    background-color: #fffaed;
}

[data-theme="warm"] .theme-aware-table thead th {
    background-color: #fff5d6;
    border-color: #e8d5b5;
}

[data-theme="warm"] .theme-aware-table tbody td {
    border-color: #e8d5b5;
    background-color: #fffaed;
}

[data-theme="warm"] .theme-aware-table tbody tr:hover td {
    background-color: #fff5d6;
}
