/* Collapsible insight section content */
.insight-section-content.collapsed {
    display: none !important;
    transition: display 0.2s ease;
}
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --text-color: #333;
    --text-light: #7f8c8d;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* University of Melbourne Font Stack with Fraunces for headers */
*, .visualization-overlay {
    font-family: "Source Sans Pro", "Gill Sans", "Trebuchet MS", Arial, sans-serif;
    font-size: 1em;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Fraunces", serif;
    font-weight: bold;
    font-size: 1.05em;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.step {
    padding: 1rem;
}

#step-visualization {
    display: none;
}

.sidebar {
    width: 320px;
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    margin-bottom: 30px;
    padding: 0 10px;
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
}

.sidebar-header p {
    font-size: 16px;
    color: white;
    opacity: 0.8;
}

.sidebar-content {
    padding: 0 10px;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.sidebar-footer {
    font-size: 12px;
    color: white;
    opacity: 0.6;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
}

.contact-info i {
    font-size: 12px;
    opacity: 0.8;
    flex-shrink: 0;
}

.contact-info a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-info a:hover {
    opacity: 1;
    text-decoration: underline;
}

.sidebar-footer p {
    margin: 0;
    line-height: 1.4;
}

.main-content {
    flex: 1;
    margin-left: 320px;
    min-height: 100vh;
    position: relative;
}

.view-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.hidden {
    display: none;
}

/* Chat Styles */
.chat-container {
    height: 95vh;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-left {
    flex: 1;
}

.chat-header h2 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.chat-header p {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

.chat-messages {
    flex: 1.2; /* Increased height for more messages */
    overflow-y: auto;
    padding: 24px 20px 16px 20px; /* More top, less bottom padding */
    background: white;
}

.message {
    margin-bottom: 20px;
    max-width: 80%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.message-user .message-avatar {
    background-color: var(--secondary-color);
    color: white;
}

.message-bot .message-avatar {
    background-color: var(--primary-color);
    color: white;
}

.message-content-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: fit-content;
    /* Remove flex-grow and width for responsive stretching */
}

.message-user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-user .message-content-wrapper {
    align-items: flex-end;
}

.message-bot {
    margin-right: auto;
}

message-content-cards {
    padding: 3px; /* Reduced padding for card display */
}

.message-user .message-content {
    padding: 12px 16px;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    border-radius: 18px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 18px 18px 0 18px;
    max-width: 85%;
    /* min-width: 60%; */
}

.message-bot .message-content {
    padding: 12px 16px;
    background-color: #f1f1f1;
    border-radius: 18px 18px 18px 0;
    max-width: 85%;
    /* min-width: 60%; */
}

.message-category {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 5px;
}

.message-user .message-category {
    text-align: right;
}

.thinking {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thinking-text {
    color: var(--text-color);
    font-size: 14px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Remove old typing animation styles */
.typing {
    display: none;
}

.chat-input-container {
    background: #fff;
    border-top: 1px solid #eee;
    width: 100%;
    padding: 8px 0; /* Less vertical padding */
}

.chat-input {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    width: 100%;
    position: relative;
}

.chat-input textarea {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    resize: none;
    font-family: inherit;
    font-size: 16px;
    min-height: 50px;
    max-height: 150px;
    outline: none;
    transition: var(--transition);
    background: white;
    width: calc(100% - 60px);
}

.chat-input textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.chat-input button {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-input button:hover {
    background-color: #2980b9;
    transform: translateY(-50%) scale(1.05);
}

.chat-input button:active {
    transform: translateY(-50%) scale(0.95);
}

.chat-disclaimer {
    padding: 6px 20px; /* Less vertical padding */
    background-color: #fff;
    color: #666;
    font-size: 0.8em;
    border-top: 1px solid #eee;
    text-align: right;
    margin-top: 0;
}

.chat-disclaimer i {
    font-size: 8px;
    color: var(--secondary-color);
    margin-right: 4px;
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    z-index: 1000;
}

[data-tooltip]:after {
    content: '';
    position: absolute;
    bottom: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
}

/* Analyst View Styles */
.analyst-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
}

.analyst-header {
    margin-bottom: 20px;
}

.analyst-header h2 {
    color: var(--primary-color);
}

.analyst-header p {
    color: var(--text-light);
    font-size: 14px;
}

.analyst-step {
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

.analyst-step h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.analyst-step textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    resize: none;
    font-family: inherit;
    font-size: 16px;
    min-height: 100px;
    margin-bottom: 15px;
    outline: none;
    transition: var(--transition);
}

.analyst-step textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.analyst-step button {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.analyst-step button:hover {
    background-color: #2980b9;
}

.variable-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.variable-card:hover {
    background-color: #f1f1f1;
}

.variable-card input[type="checkbox"] {
    margin-right: 10px;
}

.variable-card label {
    cursor: pointer;
    flex-grow: 1;
}

.visualization-options {
    margin-top: 20px;
}

.visualization-options h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.viz-buttons {
    display: flex;
    gap: 10px;
}

.viz-btn {
    padding: 8px 15px;
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.over-btn {
    padding: 8px 15px;
    background-color: var(--light-color);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.viz-btn:hover {
    background-color: #e0e0e0;
}

.viz-btn.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

#visualization-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    min-height: 400px;
    background-color: #f9f9f9;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--text-light);
    font-size: 18px;
}

/* Responsive Styles */
/* @media (max-width: 768px) {
    .app-container {
        display: flex;
    }

 .message-content-wrapper .message-bot .message-content .message-user {
    width: 100% !important;
    max-width: 100%;
        box-sizing: border-box;
    }

    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: 320px;
        color: white;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }
    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: flex;
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px;
        cursor: pointer;
        border-radius: 0 4px 4px 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .sidebar-header {
        padding: 1rem;
        border-bottom: 1px solid #eee;
    }

    .sidebar-header h1 {
        font-size: 1.2rem;
    }

    .sidebar-header p {
        font-size: 0.9rem;
    }

    .sidebar-menu {
        padding: 1rem;
    }

    .menu-btn {
        width: 100%;
    }

    .menu-btn span {
        display: none;
    }

    .sidebar-footer {
        padding: 1rem;
    }
} */

/* Style for the "New Chat" button */
.new-chat-btn {
    position: relative;
    margin: 20px;
    padding: 8px 16px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    width: fit-content;
}

.new-chat-btn:hover {
    background-color: #1565c0;
}

/* .new-chat-btn:focus {
    outline: none;
} */

/* .scroll-to-bottom-btn {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
} */

.scroll-to-bottom-btn {
    position: absolute;
    bottom: 25%;
    left: 50%;
    /* transform: translateX(-50%); */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease; */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.scroll-to-bottom-btn.show {
    opacity: 1;
    pointer-events: auto;
}

.scroll-to-bottom-btn:hover {
    transform: scale(1.05);
    background-color: #2980b9;
}

.scroll-to-bottom-btn i {
    font-size: 24px;
}

/* Notification Bar */
.notification-bar {
    position: static;
    margin-top: 0;
    background-color: white;
    color: var(--text-color);
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    border-left: 4px solid var(--secondary-color);
    pointer-events: auto;
}

.notification-bar.success {
    border-left-color: var(--success-color);
}

.notification-bar.error {
    border-left-color: var(--error-color);
}

.notification-bar.warning {
    border-left-color: var(--warning-color);
}

.notification-bar i {
    font-size: 18px;
    color: var(--secondary-color);
}

.notification-bar.success i {
    color: var(--success-color);
}

.notification-bar.error i {
    color: var(--error-color);
}

.notification-bar.warning i {
    color: var(--warning-color);
}

/* Visible state of the notification */
.notification-bar.show {
    right: 20px;
    opacity: 1;
    transform: translateY(0);
}

.notification-bar.hide {
    right: -400px;
    opacity: 0;
    transform: translateY(-20px);
}

/* Make ONLY the remove (×) icon smaller */
.choices__list--multiple .choices__item .choices__button {
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    /* Keep border but make it subtle */
    margin-left: 4px;
    padding: 0 0 0 4px;
    /* Reduce left padding */
    background-size: 8px;
    /* Make just the × icon smaller */
    width: 12px;
    /* Slightly reduce clickable area */
    opacity: 0.7;
    transition: opacity 0.2s;
}

/* Keep normal size for the tag text */
.choices__list--multiple .choices__item {
    padding: 5px 25px 5px 10px;
    /* Normal padding for text */
    margin-bottom: 5px;
    /* Normal spacing between tags */
}

/* Hover effect */
.choices__list--multiple .choices__item .choices__button:hover {
    opacity: 1;
    background-size: 8px;
    /* Keep small on hover */
}

.viz-btn.active {
    background-color: #3a5a8f;
    border: 1px solid #2c436b;
}

/* Remove old loader styles */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--secondary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 500;
    margin-top: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.active-tool-banner {
    font-weight: 500;
    font-size: 0.9em;
    margin-bottom: 0.1em;
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.feedback-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding: 4px;
    border-radius: 4px;
    /* background-color: rgba(0, 0, 0, 0.02); */
}

.feedback-controls div:first-child {
    display: flex;
    gap: 4px;
}

.thumbs-up,
.thumbs-down {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbs-up i,
.thumbs-down i {
    font-size: 18px;
    color: var(--text-light);
    transition: var(--transition);
}

.thumbs-up:hover:not(.disabled),
.thumbs-down:hover:not(.disabled) {
    background-color: rgba(52, 152, 219, 0.1);
}

.thumbs-up:hover:not(.disabled) i,
.thumbs-down:hover:not(.disabled) i {
    color: var(--secondary-color);
}

.thumbs-up.active,
.thumbs-down.active {
    background-color: rgba(52, 152, 219, 0.1);
}

.thumbs-up.active i,
.thumbs-down.active i {
    color: var(--secondary-color);
}

.thumbs-up.disabled,
.thumbs-down.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.thumbs-up.disabled i,
.thumbs-down.disabled i {
    color: var(--secondary-color);
}

.feedback-input {
    display: flex;
    gap: 4px;
    width: 100%;
    margin-top: 4px;
}

.dislike-reason {
    flex: 1;
    min-height: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

.dislike-reason:focus {
    outline: none;
    border-color: var(--secondary-color);
}

#submit-feedback {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#submit-feedback:hover {
    background-color: #2980b9;
}

.feedback-controls.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.dislike-reason.hidden,
#submit-feedback.hidden {
    display: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2196F3; /* Keep background color blue */
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3; /* Ensure it stays blue */
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.switch-text {
    font-size: 12px; /* Smaller font size */
}

.visualization-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.visualization-overlay.show {
    display: flex !important;
}

.visualization-container {
    background: white;
    width: 90%;
    height: 90%;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
}

.visualization-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.visualization-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.close-btn:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.visualization-steps {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    scroll-behavior: smooth;
}

.step {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.step h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.control-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-color);
    background-color: white;
    transition: border-color 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.nav-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background-color: #2980b9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn i {
    font-size: 14px;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

#download-chart,
#download-data {
    background-color: white;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

#download-chart:hover,
#download-data:hover {
    background-color: var(--secondary-color);
    color: white;
}

#download-chart i,
#download-data i {
    font-size: 14px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 14px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#chart-container {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    min-height: 400px;
    height: calc(100vh - 300px);
    max-height: calc(100vh - 300px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Add styles for the disabled background */
body.overlay-active {
    overflow: hidden;
}

.step-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.level-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}

.level-toggle .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 0.5rem;
}

.level-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.level-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--secondary-color);
    transition: .4s;
    border-radius: 24px;
}

.level-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.level-toggle input:checked + .slider {
    background-color: var(--secondary-color);
}

.level-toggle input:checked + .slider:before {
    transform: translateX(26px);
}

.level-toggle .switch-text {
    font-size: 14px;
    color: var(--text-color);
}

.level-toggle.hidden-toggle {
    visibility: hidden;
    pointer-events: none;
    height: 0;
    margin: 0;
    overflow: hidden; /* Hide any potential overflow */
}

.loading-indicator.hidden {
    display: none;
}

.multi-select-container {
            margin-bottom: 15px;
        }

        .select-wrapper {
            position: relative;
            border: 1px solid #ddd;
            border-radius: 4px;
            padding: 5px;
        }

        .select-search {
            width: 100%;
            padding: 8px;
            border: none;
            outline: none;
        }

        .selected-options {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-top: 5px;
        }

        .selected-option {
            background: #e0e0e0;
            padding: 3px 8px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            font-size: 14px;
        }

        .selected-option .remove {
            margin-left: 5px;
            cursor: pointer;
            color: #666;
        }

        .options-dropdown {
            position: absolute;
            width: 100%;
            max-height: 200px;
            overflow-y: auto;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
            border-radius: 0 0 4px 4px;
            z-index: 100;
            display: none;
        }

        .option-item {
            padding: 8px 12px;
            cursor: pointer;
            font-size: 14px;
        }

        .option-item:hover {
            background: #f0f0f0;
        }

        .filter-item {
            margin-bottom: 15px;
        }

        .filter-item label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }

/* Feedback Button and Form Styles */
.feedback-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-button i {
    font-size: 24px;
}

.feedback-button:hover {
    transform: scale(1.05);
    background-color: #2980b9;
}

.feedback-form {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.feedback-form.show {
    transform: translateY(0);
    opacity: 1;
}

.feedback-form.hidden {
    display: none;
}

.feedback-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.feedback-form-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
}

.close-feedback {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.close-feedback:hover {
    color: var(--primary-color);
}

#feedback-text {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

#feedback-text:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.submit-feedback {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.submit-feedback:hover {
    background-color: #2980b9;
}

.submit-feedback i {
    font-size: 16px;
}

.visual-analytics-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 40px;
    overflow: hidden;
    white-space: nowrap;
}

.visual-analytics-btn i {
    font-size: 16px;
    min-width: 16px;
}

.visual-analytics-btn span {
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 0;
}

.visual-analytics-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    width: auto;
    padding: 10px 20px;
}

.visual-analytics-btn:hover span {
    opacity: 1;
    width: auto;
    margin-left: 8px;
}

.visual-analytics-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sidebar Tools */
.sidebar-content h3 {
    color: white;
    font-size: 1.3em;
    margin: 25px 0 15px 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-content h3 i {
    font-size: 1.1em;
    opacity: 0.9;
}

.tool-btn {
    display: flex;
    align-items: center; /* Vertically center icon and content */
    width: 100%;
    padding: 12px 5px 12px 5px;
    border: none;
    background: none;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 1.25em;
    position: relative;
    overflow: hidden;
}

.tool-btn i {
    font-size: 1.3em;
    min-width: 28px;
    text-align: center;
    margin-right: 5;
    position: relative;
    z-index: 1;
    align-self: center; /* Center icon vertically with title */
}

.tool-content {
    flex: 1; /* Stretch content to the right */
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}
.tool-title {
    font-size: 1.2em;
    font-weight: 600;
}

.tool-description {
    font-size: 1em;
    opacity: 0.8;
    line-height: 1.3;
}

.tool-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tool-btn.active {
    background-color: var(--secondary-color);
}

.tool-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: white;
    z-index: 0;
}

.tool-btn.active .tool-description {
    opacity: 0.9;
}

/* Visual Analytics Container */
.visual-analytics-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px;
    padding: 20px;
}

.visualization-controls {
    display: block;
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.control-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

#chart-container {
    flex: 1;
    min-height: 400px;
    height: calc(100vh - 300px);
    max-height: calc(100vh - 300px);
    overflow: hidden;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.export-buttons button {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.export-buttons button:hover {
    background-color: #e0e0e0;
}

/* File Card Styles */
.file-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 2px 10px; /* Reduced top/bottom padding */
    margin-bottom: 10px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.file-header:hover {
    background-color: #f0f0f0;
}

.file-header h3 {
    margin-left: 2px;
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-header h3 i.fa-chevron-down {
    transition: transform 0.2s ease;
}

.file-header.collapsed h3 i.fa-chevron-down {
    transform: rotate(-90deg);
}

.variables-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 0;
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.file-card.collapsed .variables-list {
    display: none;
}

.variable-count {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    color: var(--text-light);
}

.variable-item {
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
}

.variable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.variable-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9em;
}

.variable-score {
    font-weight: 500;
    padding: 1px 4px;
    border-radius: 8px;
    font-size: 0.7em;
}

.variable-score.positive {
    color: var(--success-color);
    background: rgba(39, 174, 96, 0.1);
}

.variable-score.negative {
    color: var(--error-color);
    background: rgba(231, 76, 60, 0.1);
}

.variable-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-bottom: 0;
}

.variable-description {
    color: var(--text-color);
    font-size: 0.95em;
    line-height: 1.2;
    margin: 0;
}

.variable-justification {
    color: var(--text-light);
    font-size: 0.85em;
    font-style: italic;
    line-height: 1.2;
    margin: 0;
}

.merge-hint {
    background: #fff3cd;
    padding: 6px 8px;
    border-radius: 4px;
    margin-top: 6px; /* Reduced margin-top */
    color: #856404;
    font-size: 0.85em;
    border: 1px solid #ffeeba;
}

.merge-hint strong {
    color: #856404;
    font-weight: 600;
}

.insights-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.insights-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.insights-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.6;
}

.insight-header {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
    margin: 20px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.insight-header:first-child {
    margin-top: 0;
}

.insight-list {
    /* list-style: none; */
    padding: 0;
    margin: 0;
}

.insight-item {
    position: relative;
    /* padding: 10px 10px 10px 15px; */
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    /* border-left: 4px solid var(--secondary-color); */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.insight-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* .insight-item:before {
    content: "•";
    position: absolute;
    left: 10px;
    color: var(--secondary-color);
    font-size: 1.2em;
    font-weight: bold;
}

.insight-item:last-child {
    margin-bottom: 0;
} */

/* Add some spacing between different insight sections */
.insight-list + .insight-list {
    margin-top: 10px;
}

/* Highlight important numbers in insights */
.insight-item strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Add subtle animation for insights appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.insight-item {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.insight-item:nth-child(1) { animation-delay: 0.1s; }
.insight-item:nth-child(2) { animation-delay: 0.2s; }
.insight-item:nth-child(3) { animation-delay: 0.3s; }
.insight-item:nth-child(4) { animation-delay: 0.4s; }
.insight-item:nth-child(5) { animation-delay: 0.5s; }

/* Ensure proper spacing between sections in analyst tool */
.message-bot .message-content .variables-section,
.message-bot .message-content .insights-section,
.message-bot .message-content .visualization-section {
    margin-bottom: 20px;
}

.message-bot .message-content .variables-section:last-child,
.message-bot .message-content .insights-section:last-child,
.message-bot .message-content .visualization-section:last-child {
    margin-bottom: 0;
}

/* Improve chart container in analyst tool */
.message-bot .message-content .chart-container {
    background: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-top: 10px;
}

.message-bot .message-content .analysis-chart {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feedback-controls button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: 0 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.feedback-controls button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.feedback-controls button.active {
    background-color: rgba(0, 0, 0, 0.1);
}

.feedback-controls button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-controls button.copy-code {
    color: #666;
}

.feedback-controls button.copy-code:hover {
    color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
}

.feedback-controls button.copy-code:active {
    transform: scale(0.95);
}

.feedback-controls button.download-data {
    color: #666;
}

.feedback-controls button.download-data:hover {
    color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
}

.feedback-controls button.download-data:active {
    transform: scale(0.95);
}

/* Tour Overlay Styles */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tour-overlay.show {
    display: flex !important;
}

.tour-container {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 2001;
}

.tour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: white;
}

.tour-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-tour {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: 300;
    position: relative;
}

.close-tour:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-tour[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.close-tour[data-tooltip]:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.close-tour[data-tooltip]:hover:before,
.close-tour[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
}

.tour-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.tour-step {
    animation: fadeIn 0.3s ease;
}

.tour-step h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.tour-step p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.tour-step a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tour-step a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.tour-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tour-navigation button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.prev-step {
    background-color: #f0f0f0;
    color: var(--text-color);
}

.prev-step:hover {
    background-color: #e0e0e0;
}

.next-step, .finish-tour {
    background-color: var(--secondary-color);
    color: white;
}

.next-step:hover, .finish-tour:hover {
    background-color: #2980b9;
}

.skip-tour {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.skip-tour:hover {
    color: var(--primary-color);
}

/* Tour Highlight Styles */
.tour-highlight {
    position: relative;
    z-index: 2001 !important;
    animation: pulse 2s infinite;
}

.tour-highlight::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    pointer-events: none;
    z-index: 2001 !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tour Active State */
body.tour-active {
    overflow: hidden;
}

body.tour-active .tour-overlay {
    pointer-events: auto;
}

body.tour-active .tour-overlay * {
    pointer-events: auto;
}

body.tour-active .tour-highlight,
body.tour-active .feedback-button {
    pointer-events: auto;
}

/* Ensure feedback button stays in position during tour */
body.tour-active .feedback-button {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 2001 !important;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    position: fixed;
    left: 10px;
    top: 10px;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-toggle.open i {
    transform: rotate(180deg);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .app-container {
        display: flex;
    }
    .sidebar-toggle {
        display: flex;
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1000;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px;
        cursor: pointer;
        border-radius: 0 4px 4px 0;
    }
    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: 320px;
        color: white;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }
    .sidebar.show {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    .sidebar-header {
        padding: 1rem;
        border-bottom: 1px solid #eee;
    }
    .sidebar-header h1 {
        font-size: 1.2rem;
    }
    .sidebar-header p {
        font-size: 0.9rem;
    }
    .sidebar-menu {
        padding: 1rem;
    }
    .menu-btn {
        width: 100%;
    }
    .menu-btn span {
        display: none;
    }
    .sidebar-footer {
        padding: 1rem;
    }

    .message{
        max-width: 100%;
    }
}

/* Ensure mobile sidebar is visible during tour */
body.tour-active .sidebar {
    z-index: 100; /* Behind the overlay (z-index: 2000) */
    filter: blur(4px);
}
body.tour-active .sidebar.tour-sidebar-visible {
    z-index: 2001 !important; /* Above the overlay */
    filter: none;
}

/* Ensure no tool buttons appear active during tour */
body.tour-active .tool-btn {
    background-color: var(--primary-color) !important;
    color: white !important;
}

body.tour-active .tool-btn.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

body.tour-active .tool-btn.active::before {
    display: none !important;
}

.new-variable-tag {
  display: inline-block;
  background: #27ae60;
  color: #fff;
  font-size: 0.85em;
  font-weight: bold;
  border-radius: 12px;
  padding: 2px 10px;
  margin-right: 8px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

.new-variable-card {
  position: relative;
  padding-right: 60px; /* Prevent overlap with the upper right tag */
}
.new-variable-tag-right {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 1;
}

/* Suggested Variables Section Styles */
.suggested-variables-section {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #eee;
}

.suggested-variables-section h3 {
    color: #2a5d8f;
    margin-bottom: 1em;
    font-size: 1.2em;
    font-weight: 600;
}

.suggested-variable-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1em;
    margin-bottom: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.suggested-variable-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.suggested-variable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5em;
}

.suggested-variable-header h4 {
    color: #2a5d8f;
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.suggested-variable-info {
    font-size: 0.9em;
    line-height: 1.5;
}

.suggested-variable-info div {
    margin-bottom: 0.5em;
}

.suggested-variable-info strong {
    color: #495057;
    font-weight: 600;
}

.suggested-variable-info code {
    background: #595656;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
}

.sources-section {
    margin-top: 2em;
    margin-bottom: 2em;
    padding: 1.5em;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    /* border-left: 4px solid var(--secondary-color); */
}

.sources-section h3 {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-bottom: 1em;
    font-weight: 600;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.source-item {
    padding: 0.5em;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.source-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.1);
}

.source-item a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.source-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.source-item i {
    color: var(--secondary-color);
    font-size: 0.9em;
}

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none; /* allow clicks to pass through except on notifications */
}

.tool-status {
    background-color: #e6f7ff; /* A light blue background */
    color: #004085; /* Darker blue text */
    /* border-left: 4px solid #007bff;  */
    /* A prominent left border */
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 0.9em;
    font-style: italic;
    border-radius: 4px;
}


.testing {
background-color: var(--light-color);
color: var(--text-color);
padding: 16px 20px;
border-radius: 8px;
font-size: 14px;
box-shadow: var(--box-shadow);
display: flex;
align-items: center;
gap: 12px;
border-left: 4px solid var(--warning-color);
font-style: italic;
}

