/* Brand Color Variables */
:root {
    --brand-deep-plum: #303584;
    --brand-firey-sunset: #F15A22;
    --brand-frosted-grey: #DEDCE4;
    --brand-midnight-blurple: #1D1655;
    --brand-timeless-teal: #03878C;
    --brand-summer-goldenrod: #FFC20E;
}

/* Navbar Branding - Deep Plum Background with Firey Sunset Text */
.navbar {
    background-color: var(--brand-deep-plum) !important;
    min-height: 80px !important;
}

.navbar-brand {
    margin-right: 1.5rem !important;
    display: flex;
    align-items: center;
}

.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus {
    color: var(--brand-firey-sunset) !important;
    font-size: 1.4rem !important;
    font-weight: 600;
}

.navbar-brand img {
    height: 70px !important;
    margin-right: 10px !important;
}

.navbar .nav-link {
    color: var(--brand-timeless-teal) !important;
    font-size: 1.1rem !important;
    padding: 0.8rem 1rem !important;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.navbar .nav-link i {
    font-size: 1.2rem !important;
    margin-right: 0.4rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--brand-summer-goldenrod) !important;
}

/* Active tab highlighting */
.navbar .nav-link.active {
    color: var(--brand-firey-sunset) !important;
    background-color: rgba(241, 90, 34, 0.15);
    border-radius: 0.375rem;
    font-weight: 600;
}

.navbar .dropdown-toggle {
    font-size: 1.1rem !important;
    padding: 0.8rem 1rem !important;
}

.navbar .dropdown-menu {
    font-size: 1rem !important;
}

.navbar .dropdown-item {
    padding: 0.6rem 1.2rem !important;
    font-size: 1rem !important;
}

.navbar .dropdown-item i {
    margin-right: 0.5rem;
    font-size: 1.05rem !important;
}

.navbar-toggler {
    border-color: var(--brand-firey-sunset);
    padding: 0.5rem 0.75rem !important;
    font-size: 1.2rem !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23F15A22' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.8em !important;
    height: 1.8em !important;
}

/* Link Branding - Midnight Blurple */
a {
    color: var(--brand-midnight-blurple);
    text-decoration: none;
}

a:hover {
    color: var(--brand-timeless-teal);
    text-decoration: underline;
}

/* Button Branding */
.btn-primary {
    background-color: var(--brand-firey-sunset);
    border-color: var(--brand-firey-sunset);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-midnight-blurple);
    border-color: var(--brand-midnight-blurple);
}

.btn-secondary {
    background-color: var(--brand-timeless-teal);
    border-color: var(--brand-timeless-teal);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--brand-midnight-blurple);
    border-color: var(--brand-midnight-blurple);
}

.btn-close {
    margin: 0px;
    text-anchor: middle;
}

/* Pills and Badges - Frosted Grey Background */
.badge {
    background-color: var(--brand-frosted-grey);
    color: var(--brand-midnight-blurple);
}

.badge-primary {
    background-color: var(--brand-firey-sunset);
    color: white;
}

.badge-secondary {
    background-color: var(--brand-timeless-teal);
    color: white;
}

/* Alert Branding */
.alert-info {
    background-color: var(--brand-frosted-grey);
    border-color: var(--brand-timeless-teal);
    color: var(--brand-midnight-blurple);
}

.alert-warning {
    background-color: #FFF4E5;
    border-color: var(--brand-summer-goldenrod);
    color: var(--brand-midnight-blurple);
}

/* Card Branding */
.card {
    border-color: var(--brand-frosted-grey);
}

.card-header {
    background-color: var(--brand-frosted-grey);
    color: var(--brand-midnight-blurple);
}

/* Form Focus States */
.form-control:focus {
    border-color: var(--brand-firey-sunset);
    box-shadow: 0 0 0 0.2rem rgba(241, 90, 34, 0.25);
}

/* Accent Classes for Manual Use */
.bg-brand-plum { background-color: var(--brand-deep-plum); }
.bg-brand-sunset { background-color: var(--brand-firey-sunset); }
.bg-brand-grey { background-color: var(--brand-frosted-grey); }
.bg-brand-blurple { background-color: var(--brand-midnight-blurple); }
.bg-brand-teal { background-color: var(--brand-timeless-teal); }
.bg-brand-gold { background-color: var(--brand-summer-goldenrod); }

.text-brand-plum { color: var(--brand-deep-plum); }
.text-brand-sunset { color: var(--brand-firey-sunset); }
.text-brand-grey { color: var(--brand-frosted-grey); }
.text-brand-blurple { color: var(--brand-midnight-blurple); }
.text-brand-teal { color: var(--brand-timeless-teal); }
.text-brand-gold { color: var(--brand-summer-goldenrod); }

/* ==========================================
   Styles from _Layout.cshtml (consolidated)
   ========================================== */

/* Chat Message Styles */
.chat-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.375rem;
}

.user-message {
    background-color: var(--brand-frosted-grey);
    margin-left: 2rem;
}

.assistant-message {
    background-color: var(--brand-frosted-grey);
    margin-right: 2rem;
}

/* Search Result Styles */
.search-result {
    border: 1px solid var(--brand-frosted-grey);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.document-result {
    border-left: 4px solid var(--brand-timeless-teal);
    padding-left: 1rem;
}

.fragment-score {
    color: #6c757d;
    font-size: 0.9rem;
}

.tag-badge {
    margin: 0.25rem;
}

/* ==========================================
   Styles from ChatWeb/Index.cshtml (consolidated)
   ========================================== */

/* Font size adjustments - increased from 66% to approximately 90% of original */
body, .card-body, .form-control, .btn, p, div, span, li, label, input, select, textarea {
    font-size: 0.90rem !important;
}

h1 { font-size: 2.2rem !important; }
h2 { font-size: 1.8rem !important; }
h3 { font-size: 1.5rem !important; }
h4 { font-size: 1.35rem !important; }
h5 { font-size: 1.15rem !important; }
h6 { font-size: 1.0rem !important; }

.small, small { font-size: 0.81rem !important; }
.badge { font-size: 0.81rem !important; padding: 0.2rem 0.5rem !important; }

/* Button sizes */
.btn-sm { 
    font-size: 0.81rem !important;
    padding: 0.2rem 0.5rem !important;
}

/* Conversation sidebar styles */
.conversations-header-title { font-size: 1.0rem !important; }
.conversations-new-btn { font-size: 0.81rem !important; min-width: 28px !important; min-height: 28px !important; }
.conversations-toggle-btn { font-size: 0.81rem !important; }
.conversations-list-item { padding: 0.6rem !important; font-size: 0.90rem !important; }
.conversation-name { font-size: 0.90rem !important; margin-bottom: 0 !important; }
.conversations-delete-btn { font-size: 0.81rem !important; padding: 0.15rem 0.4rem !important; }
.conversations-team-badge { font-size: 0.81rem !important; }
.conversations-empty { font-size: 0.81rem !important; }
.conversations-expand-btn { font-size: 0.81rem !important; }
.conversations-expand-text { font-size: 0.81rem !important; }

/* Chat specific styles */
.chat-message {
    padding: 0.82rem;
    margin-bottom: 0.82rem;
    border-radius: 0.4rem;
    background-color: #f8f9fa;
}

.user-message {
    background-color: #e3f2fd;
    border-left: 3px solid #2196F3;
}

.assistant-message {
    background-color: #f1f8e9;
    border-left: 3px solid #8BC34A;
}

/* Card header/body adjustments */
.card-header {
    padding: 0.65rem !important;
}

.card-body {
    padding: 0.65rem !important;
}

/* Form control adjustments */
.form-control, .form-select {
    font-size: 0.90rem !important;
    padding: 0.35rem 0.65rem !important;
}

.form-control-sm {
    font-size: 0.81rem !important;
    padding: 0.2rem 0.5rem !important;
}

.form-label {
    font-size: 0.90rem !important;
    margin-bottom: 0.35rem !important;
}

.form-text {
    font-size: 0.81rem !important;
}

/* Alert adjustments */
.alert {
    padding: 0.65rem !important;
    font-size: 0.90rem !important;
}

/* List group adjustments */
.list-group-item {
    padding: 0.65rem !important;
    font-size: 0.90rem !important;
}

/* Markdown content */
.markdown-content {
    font-size: 1.00rem !important;
}

.markdown-content p {
    font-size: 1.00rem !important;
    margin-bottom: 0.65rem !important;
}

.markdown-content ul, .markdown-content ol {
    font-size: 1.00rem !important;
    margin-bottom: 0.65rem !important;
    padding-left: 1.8rem !important;
}

.markdown-content li {
    font-size: 1.00rem !important;
}

.markdown-content h1 { font-size: 2.7rem !important; }
.markdown-content h2 { font-size: 2.2rem !important; }
.markdown-content h3 { font-size: 1.8rem !important; }
.markdown-content h4 { font-size: 1.5rem !important; }
.markdown-content h5 { font-size: 1.35rem !important; }
.markdown-content h6 { font-size: 1.15rem !important; }

.markdown-content code {
    font-size: 0.81rem !important;
}

.markdown-content pre {
    font-size: 0.81rem !important;
    padding: 0.65rem !important;
}

/* Icon adjustments */
.fa-2x { font-size: 1.8rem !important; }
.fa-3x { font-size: 2.7rem !important; }
.fa-4x { font-size: 3.6rem !important; }

/* Spinner adjustments */
.spinner-border-sm {
    width: 1.0rem !important;
    height: 1.0rem !important;
    border-width: 0.18rem !important;
}

/* Modal adjustments */
.modal-title {
    font-size: 1.15rem !important;
}

.modal-body {
    font-size: 0.90rem !important;
    padding: 0.65rem !important;
}

.modal-header, .modal-footer {
    padding: 0.65rem !important;
}

/* ==========================================
   Styles from Workflow/Index.cshtml (consolidated)
   ========================================== */

/* Workflow-specific button styles */
.workflow-new-btn, .workflow-delete-btn, .workflow-nav-btn, 
.workflow-send-btn, .workflow-start-btn, .workflow-action-btn,
.workflow-confirm-btn, .workflow-deny-btn {
    font-size: 0.81rem !important;
    padding: 0.2rem 0.5rem !important;
}

/* Card adjustments for full height */
.card.h-100 {
    height: 100% !important;
}

.workflow-sessions-body {
    flex: 1;
    overflow-y: auto;
}

.workflow-empty {
    font-size: 0.74rem !important;
}

.workflow-template-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.workflow-template-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.agentic-actions-container {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.agentic-action-pill {
    padding: 0.65rem;
    margin-bottom: 0.4rem;
    border-radius: 0.4rem;
    font-size: 0.90rem !important;
}

.agentic-action-pill:last-child {
    margin-bottom: 0;
}

/* Document preview sidebar styles - Fixed height to prevent overflow */
#documentPreviewSidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#documentPreviewSidebar .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#documentPreviewContent {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.document-preview {
    padding: 0.82rem;
}

.document-preview h4 {
    margin-bottom: 0.82rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid #dee2e6;
    color: #333;
}

.field-group {
    margin-bottom: 0.82rem;
    padding: 0.65rem;
    background-color: #f8f9fa;
    border-radius: 0.4rem;
    border-left: 2px solid #007bff;
}

.field-group label {
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 0.4rem;
}

.field-value {
    color: #212529;
    word-wrap: break-word;
}

#approvalDialog {
    animation: slideIn 0.3s ease-out;
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation error styles */
.validation-errors {
    animation: slideIn 0.3s ease-out;
    flex-shrink: 0;
}

.validation-errors ul {
    list-style: none;
    padding-left: 0;
}

.validation-errors li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.validation-errors li:last-child {
    border-bottom: none;
}

.validation-errors .field-name {
    font-weight: 600;
    color: #856404;
}

/* Completed session styling */
.session-completed {
    opacity: 0.7;
    pointer-events: none;
}

.session-completed .card {
    background-color: #f8f9fa;
}

/* Tool message pill styles */
.tool-message-container {
    margin: 0.65rem 0;
}

.tool-call-pill {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0;
    transition: all 0.3s ease;
}

.tool-call-pill.expanded {
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.tool-pill-header {
    padding: 0.65rem 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s ease;
}

.tool-pill-header:hover {
    background-color: #e9ecef;
}

.tool-call-pill.expanded .tool-pill-header {
    border-bottom: 1px solid #dee2e6;
}

.tool-summary {
    flex-grow: 1;
    font-weight: 500;
    color: #495057;
    font-size: 0.90rem !important;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: #6c757d;
}

.tool-pill-details {
    padding: 0.82rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-call-detail {
    background-color: #f8f9fa;
    padding: 0.65rem;
    border-radius: 0.4rem;
    margin-bottom: 0.65rem;
}

.tool-call-detail:last-child {
    margin-bottom: 0;
}

.tool-detail-item {
    margin-bottom: 0.65rem;
}

.tool-detail-item:last-child {
    margin-bottom: 0;
}

.tool-detail-item strong {
    color: #495057;
    font-size: 0.90rem !important;
}

.tool-params-json {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 0.65rem;
    border-radius: 0.4rem;
    font-size: 0.81rem !important;
    margin-top: 0.65rem;
    margin-bottom: 0;
    max-height: 180px;
    overflow-y: auto;
}

.tool-result {
    padding: 0.65rem;
    border-radius: 0.4rem;
    margin-top: 0.65rem;
    font-size: 0.90rem !important;
}

/* Workflow session list item styles */
.workflow-session-item {
    padding: 0.65rem !important;
    font-size: 0.90rem !important;
}

/* Workflow-specific class overrides */
.workflow-header-title { font-size: 1.0rem !important; }
.workflow-session-name { font-size: 0.90rem !important; }
.workflow-session-date { font-size: 0.81rem !important; }
.workflow-type-badge { font-size: 0.81rem !important; }
.workflow-main-title { font-size: 1.15rem !important; }
.workflow-status-title { font-size: 1.0rem !important; }
.workflow-status-text { font-size: 0.90rem !important; }
.workflow-session-info { font-size: 0.90rem !important; }
.workflow-status-badge { font-size: 0.81rem !important; }
.workflow-message-time { font-size: 0.81rem !important; }
.workflow-powered-text { font-size: 0.81rem !important; }
.workflow-welcome-title { font-size: 1.35rem !important; }
.workflow-welcome-text { font-size: 0.90rem !important; }
.workflow-template-title { font-size: 1.0rem !important; }
.workflow-template-desc { font-size: 0.90rem !important; }
.workflow-template-note { font-size: 0.81rem !important; }
.workflow-help-title { font-size: 1.0rem !important; }
.workflow-help-text { font-size: 0.81rem !important; }
.workflow-help-list { font-size: 0.81rem !important; }
.workflow-preview-title { font-size: 1.0rem !important; }
.workflow-validation-title { font-size: 1.0rem !important; }
.workflow-validation-list { font-size: 0.81rem !important; }
.workflow-approval-title { font-size: 1.0rem !important; }
.workflow-approval-text { font-size: 0.90rem !important; }
.workflow-modal-title { font-size: 1.0rem !important; }
.workflow-modal-text { font-size: 0.90rem !important; }
.workflow-modal-item { padding: 0.65rem !important; }
.workflow-modal-item-title { font-size: 1.0rem !important; }
.workflow-modal-item-desc { font-size: 0.81rem !important; }

/* ==========================================
   Original site.css styles (preserved)
   ========================================== */

.navbar-brand i {
    margin-right: 0.5rem;
}

#thinkingIndicator {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Ensure the main row stays in a single row layout */
.row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
    display: flex;
    flex-wrap: nowrap !important;
    align-items: stretch;
}

/* Compact Conversation sidebar styles */
.conversations-sidebar {
    transition: all 0.3s ease-in-out;
    flex: 0 0 auto !important;
    width: 25% !important;
    max-width: 300px !important;
}

.conversations-collapsed {
    transition: all 0.3s ease-in-out;
    flex: 0 0 auto !important;
    width: auto !important;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.chat-main-area {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
}

.conversations-body {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    font-size: 0.95rem;
}

.conversations-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Conversation sidebar scrollbar */
.conversations-body::-webkit-scrollbar {
    width: 5px;
}

.conversations-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2.5px;
}

.conversations-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2.5px;
}

.conversations-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* List group item styles */
.list-group-item.active {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #151a3b;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item.active:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

/* Center the delete icon button and add contrast for active conversations */
.list-group-item .btn-group-vertical {
    margin-left: 0.5rem;
}

.list-group-item .btn-outline-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
}

/* High contrast background for delete button when conversation is active */
.list-group-item.active .btn-outline-danger {
    background-color: #ffffff;
    border-color: #dc3545;
}

.list-group-item.active .btn-outline-danger:hover {
    background-color: #dc3545;
    color: #ffffff;
}

/* Ensure alignment of conversation items */
.list-group-item .d-flex {
    align-items: center;
}

.list-group-item .flex-grow-1 {
    min-width: 0; /* Allow text to wrap properly */
}

.search-result:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.fragment-text {
    background-color: #f8f9fa;
    padding: 0.85rem;
    border-radius: 0.3rem;
    margin: 0.6rem 0;
    font-family: 'Courier New', monospace;
    font-size: 1.0rem;
    line-height: 1.5;
    border-left: 3px solid #6c757d;
}

.footer {
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Configuration page styles */
.provider-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.config-form .form-group {
    margin-bottom: 1.5rem;
}

.config-form label {
    font-weight: 600;
    color: #495057;
}

.config-form .form-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.config-description {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1.1rem;
    font-family: 'Courier New', monospace;
    font-size: 1.0rem;
    white-space: pre-line;
}

/* Collection input styles */
.collection-container {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.collection-items {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 0.5rem;
    background-color: #ffffff;
    min-height: 60px;
    position: relative;
}

.collection-items.empty::before {
    content: "No items added yet. Use the input above to add items.";
    color: #6c757d;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    padding: 1rem;
}

.collection-items.is-invalid {
    border-color: #dc3545;
}

.collection-items.is-invalid::after {
    content: "At least one item is required.";
    color: #dc3545;
    font-size: 0.875rem;
    position: absolute;
    bottom: -1.5rem;
    left: 0;
}

.collection-item {
    animation: fadeInDown 0.3s ease-out;
    transition: all 0.2s ease-in-out;
}

.collection-item:hover {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.collection-item .form-control {
    background-color: #ffffff;
    border: 1px solid #ced4da;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.collection-item .btn-danger {
    transition: all 0.2s ease-in-out;
}

.collection-item .btn-danger:hover {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.5rem rgba(220, 53, 69, 0.3);
}

.collection-container .input-group .btn-success {
    transition: all 0.2s ease-in-out;
}

.collection-container .input-group .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(40, 167, 69, 0.3);
}

/* Form validation styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar for collection items */
.collection-items::-webkit-scrollbar {
    width: 6px;
}

.collection-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.collection-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.collection-items::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Custom scrollbar for chat history */
.chat-history::-webkit-scrollbar {
    width: 8px;
}

.chat-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.btn i {
    margin-right: 0.5rem;
}

/* Loading state for buttons */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Row gutters */
.row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-message {
        margin-left: 0;
    }
    
    .assistant-message {
        margin-right: 0;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .collection-container {
        padding: 0.75rem;
    }
    
    .collection-items {
        max-height: 200px;
        min-height: 50px;
    }
    
    .collection-items.empty::before {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .chat-history {
        height: calc(100vh - 480px) !important;
    }
    
    .conversations-expand-btn {
        height: calc(100vh - 220px);
    }
    
    .conversations-sidebar {
        width: 100%;
        max-width: 100%;
    }
}

/* ==========================================
   Tool Message Group Styles
   ========================================== */

/* Tool message group styles */
.tool-message-group {
    margin-bottom: 0.65rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.tool-message-group.expanded {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-color: #adb5bd;
}

.tool-message-group-header {
    padding: 0.65rem 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s ease;
}

.tool-message-group-header:hover {
    background-color: #e9ecef;
}

.tool-message-group.expanded .tool-message-group-header {
    border-bottom: 1px solid #dee2e6;
}

.tool-group-summary {
    flex-grow: 1;
    font-weight: 600;
    color: #495057;
    font-size: 0.90rem !important;
}

.tool-message-group-content {
    padding: 0.65rem;
    animation: slideDown 0.3s ease;
}

/* Nested tool pill styles */
.tool-call-pill.nested {
    margin-bottom: 0.4rem;
}

.tool-call-pill.nested:last-child {
    margin-bottom: 0;
}

/* Tool result success/error styles */
.tool-result.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.tool-result.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Tool result full display */
.tool-result-full {
    margin-top: 0.65rem;
    animation: slideDown 0.3s ease;
}

/* System message style */
.system-message {
    background-color: #fff3e0;
    border-left: 3px solid #FF9800;
    font-style: italic;
}
