/* ========================================
   SETTINGS VIEW CUSTOMIZATIONS
   ======================================== */
.settings-view-container {
    /* DO NOT USE FIXED. Use absolute/flex to fit inside .chat-main */
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: var(--color-bg-primary);
    z-index: 10;
    /* Lower than sidebar (usually 50-100) */
}

/* Ensure settings view takes full height of parent and doesn't conflict */
#settings-view {
    flex: 1;
    overflow: hidden;
}

.settings-close-bar {
    padding: var(--spacing-md) var(--spacing-xl);
    border-bottom: 1px solid var(--color-border-primary);
    display: flex;
    justify-content: flex-end;
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

.btn-close-settings {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--color-text-primary);
    background: var(--color-bg-tertiary);
    transition: all var(--transition-base);
}

.btn-close-settings:hover {
    background: var(--color-bg-hover);
}


.settings-content-wrapper {
    flex: 1;
    overflow-y: auto;
    /* Removed padding to allow full width sections */
    padding: 0;
    position: relative;
    scrollbar-gutter: stable;
    margin: 0 auto;
    width: 100%;
}

/* Adjust general settings sections to have padding since wrapper has none */

/* Adjust general settings sections to have padding since wrapper has none */

/* Adjust general settings sections to have padding since wrapper has none */
.settings-section {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: var(--spacing-xl);
}

.settings-section.feedback-section-full-width,
.settings-section.chat-admin-section-full-width {
    max-width: none !important;
    width: 95% !important;
    margin: 0 auto;
}

.feedback-ai-response-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.feedback-ai-response-expanded {
    display: block;
    cursor: pointer;
}

.feedback-action-bar {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border-primary);
    align-items: center;
}

.feedback-action-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.feedback-action-btn:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

.feedback-meta-info {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    /* Push to right */
}


/* Specific full width section for feedback */
.feedback-section-full-width {
    width: 100%;
    padding: var(--spacing-xl);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Let table container handle scroll */
}

/* Override table container styles specifically for this view */
.feedback-section-full-width .table-container {
    width: 100%;
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    /* Important for sticky */
}

.feedback-section-full-width .data-table {
    width: 100%;
    border-collapse: collapse;
}

/* Force horizontal scroll on table container if content is too wide */
/* But we want it to fit if possible, or scroll if not */
.feedback-section-full-width .table-container {
    overflow: auto;
}

/* Expandable AI response */
.unanswered-ai-response {
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--color-bg-tertiary);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--color-border-subtle);
    max-width: 100%;
    margin: 5px 0;
}

.unanswered-ai-response.expanded {
    white-space: normal;
    overflow: visible;
    background: var(--color-bg-secondary);
}