:root {
    /* Color Variables - Simplified Palette */
    --font-family-primary: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
    --color-background: #002B36;
    --color-primary: #375767;
    --color-secondary: #1B5767;
    --color-yellow: #BB9D1C;
    --color-text: white;
    --color-light: #f5f5f5;
    --color-lighter: #e0e0e0;
    --color-white: #fff;
    --color-shadow: rgba(0, 0, 0, 0.1);

    /* Dimension Variables */
    --border-radius-large: 30px;
    --border-radius-small: 8px;
    --box-shadow-default: 0 4px 6px var(--color-shadow);
    --box-shadow-light: 0 2px 4px var(--color-shadow);
    --padding-default: 15px;
    --padding-large: 30px;
    --padding-small: 8px 16px;
    --margin-default: 15px;
    --transition-duration: 0.3s;
    --font-size-default: 14px;
    --font-size-large: 1rem;
    --font-size-icon: 24px;
    --iframe-height: 600px;
    --textarea-height-focus: 20vh;

    /* Animation */
    --animation-pulse: pulse 0.5s ease-in-out 2;
}

.navbar-brand {
    padding-left: 20px;
}

.logged-out {
    color: var(--color-text);
}
.danger-text{
    color: red !important;
}
#top-bar {
    max-width: 700px;
}

.btn-info {
    background-color: var(--color-yellow);
    color: var(--color-text);
    border-color: var(--color-yellow);

    &:hover {
        background-color: var(--color-primary);
        color: var(--color-text);
        border-color: var(--color-primary);
    }
}

body {
    border-top: 5px solid var(--color-yellow);
    font-family: var(--font-family-primary);
    background-color: var(--color-background) !important;
}

a {
    color: white;
}

.btn-outline-primary {
    --bs-btn-border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    --bs-btn-disabled-bg: var(--color-primary) !important;
    --bs-btn-disabled-border-color: var(--color-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--color-primary) !important;
    color: var(--color-text) !important;
}

.btn-link {
    --bs-btn-color: var(--color-primary);
}

.bg-light {
    background-color: transparent !important;
}

.navbar {
    margin-top: 15px;

    border-bottom: 1px solid var(--color-primary) !important;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow-light);
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.nav-tabs .nav-item {
    margin-bottom: 8px;
}

.nav-tabs .nav-link {
    margin-right: 0;
    border-radius: 12px 12px 0 0 !important;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    box-shadow: 0 0 10px var(--color-yellow);
}

.nav-tabs .nav-link:hover {
    box-shadow: 0 0 10px var(--color-yellow);
}

.nav-tabs .nav-link {}

button, .btn {
    transition: all 0.3s ease;
    border-radius: 8px !important;
}

button:hover, .btn:hover {
    box-shadow: 0 0 10px var(--color-yellow);
    transform: translateY(-1px);
}

#title-text {
    font-size: 38px;
    color: var(--color-text);
    position: relative;
    z-index: 1060;
    margin-bottom: -2px;
    color: #506766;
    font-style: italic;
    padding: 0;
    border-left: 1px solid var(--color-primary);
    padding-left: 10px;
    font-family: Arial, sans-serif;
}
.col-lg-6 {
    border: 1px dotted var(--color-primary);
    border-radius: var(--border-radius-large);
    padding: 20px;
    margin-right: 10px;
    width: 49%;
    position: relative; /* allow ::before labels to position on the border */
}
/* compact panel titles rendered on the border */
#edit-panel::before,
#iframe-column::before {
    position: absolute;
    top: -12px; /* sit on the rounded top border */
    left: 20px;
    font-size: 0.95rem;
    color: var(--color-secondary); /* dark green text */
    background-color: hsl(149, 12%, 85%); /* light green background */
    padding: 4px 10px; /* a little more padding */
    border-radius: 10px; /* soften label */
    line-height: 1;
}

#edit-panel::before { content: "Design your interview"; }
#iframe-column::before { content: "Test your interview"; }
.container,
.container-fluid {
    width: 100%;
    max-width: 1500px;
    padding: 0 15px;
    flex: 1;
}

.hidden {
    visibility: hidden;
    height: 0;
}

.hidden-content {
    display: none;
}
.visually-disabled {
    background-color: #e9ecef !important;
    /* A common "disabled" background color */
    opacity: 0.7 !important;
    cursor: pointer !important;
    /* Indicates it's clickable to enable */
}
.owner-field {
    flex: 0 0 30%;
}

.editors-field {
    flex: 1;
}


.CodeMirror {
    height: 80px !important;
    min-height: 80px !important;
    transition: height 2s ease !important;
    border: 1px solid var(--color-primary) !important;
    border-radius: var(--border-radius-small) !important;
    overflow-y: auto !important;
}

.CodeMirror-focused {
    height: var(--textarea-height-focus) !important;
    resize: vertical !important;
}
.card-header{
    background-color: hsl(149, 12%, 85%) !important;
}
#formattedTranscript {
    background-color: hsl(149, 12%, 85%);
    margin-bottom: 10px;
    padding: var(--padding-default);
    border-radius: var(--border-radius-large);
    box-shadow: var(--box-shadow-default);
}

/* Table summary modal field/value styling */
.summary-field-pair {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #fafbfc;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.summary-field-pair:last-child {
    margin-bottom: 0;
}

.summary-field-name {
    font-weight: 700;
    color: #495057;
    font-size: 0.85rem;
    text-transform: capitalize;
    display: block;
    margin-bottom: 0.35rem;
}

.summary-field-value {
    color: #212529;
    font-size: 0.9rem;
    display: block;
    line-height: 1.5;
}

.save-icon {
    font-size: var(--font-size-icon);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.save-icon .icon-container {
    position: relative;
    display: inline-block;
}

.save-icon .save-disk {
    position: relative;
    z-index: 1;
}

.save-icon .green-tick {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    color: var(--color-yellow);
    background-color: transparent;
    border-radius: 50%;
    padding: 2px;
    z-index: 2;
}

.save-icon.saving .green-tick {
    display: none;
}

.save-icon.pulse {
    animation: var(--animation-pulse);
}

.save-icon.saving .save-disk {
    opacity: 0.5;
}

.field-container {
    padding: 10px 0 5px 0;
}

.form-check-input[type='radio'] {
    background: #ddd;
}

.form-check-input[type='checkbox'] {
    border: 2px solid #6c757d;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

#automation {
    background-color: var(--color-light);
    border-radius: var(--border-radius-large);
    padding: var(--padding-large);
}

#interviewIframe {
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-primary);
}

#interviewFieldsHolder {
    border-radius: var(--border-radius-large);
    background-color: var(--color-light);
}

/* UPDATED fileBar button styling to avoid wrapping and horizontal scrolling */

/* The container uses flex to ensure buttons share available space */
#fileBar {
    display: flex;
    flex-wrap: nowrap;
    width: 100%; /* Ensure it takes full width */
}

/* Make each button flexible to share the container width */
#fileBar>button {
    flex: 1 1 0;
    /* Grow and shrink equally */
    min-width: 0;
    /* Allow shrinking */
    border-width: 2px;
    /* Retain border width as before */
    padding: 0.375rem 0.75rem;
    /* Bootstrap default padding */
    border-radius: 0;
    margin-left: -1px; /* Negative margin to connect buttons */
}

/* Keep contiguous appearance */
#fileBar>button:not(:last-child) {
    border-right: none;
}

#fileBar>button:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    margin-left: 0;
}

#fileBar>button:not(:first-child):not(:last-child) {
    border-radius: 0;
}

#fileBar>button:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Remove negative margins to prevent overflow */
#fileBar>button:not(:first-child) {
    margin-left: 0;
}

.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 909060;
}

#iframeRefreshButton {
    padding: 5px;
    background-color: var(--color-primary);
    opacity: 1;
    color: var(--color-text);
    top: 15px;
    right: 15px;
    z-index: 1000;
    width: 40px;
    height: 40px;
}

#userSidebar {
    z-index: 99999;
}


#newInterviewForm input,
#newInterviewForm textarea {
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-primary);
}

#newInterviewModal {
    background-color: var(--color-white);
}

.modal-header,
.advisor-header {
    background-color: var(--color-primary);
    color: var(--color-text);
    padding: 15px;
    border-radius: 5px;
}

.btn-danger {
    color: red;
    background-color: var(--color-white);
}

.btn-danger i {
    color: red;
    background-color: var(--color-white);
}

.tab-content {
    background-color: hsl(149, 12%, 90%) !important;
    border-top: 1px solid var(--color-primary);
    padding: var(--padding-large);
    border-radius: var(--border-radius-small);
}
.card-body {
    background-color: hsl(149, 12%, 90%) !important;
}

.custom-modal-xl .modal-dialog {
    max-width: 95vw;
    width: 95vw;
    margin: 1.75rem auto;
}

.custom-modal-xl .modal-content {
    width: 100%;
}

.modal-content {
    color: black !important;
}



.form-text {
    font-size: 15px;
    color: black;
}

.dropdown {
    z-index: 9999;
}


.nav-tabs {
    position: relative;
    z-index: 1051;
    background-color: transparent;
    padding-bottom: 5px;
    border: none
}

.modal-backdrop {
    z-index: 1050;
}

.modal {
    z-index: 1055;
}

.modal-dialog {
    z-index: 1060;
}

.modal-content {
    background-color: var(--color-white);
    opacity: 1 !important;
}

/* end of tabulator styles */
#overviewOutput {
    background-color: #eee;
    border-radius: 12px;
    padding: var(--padding-default);

    h3 {
        margin-top: 15px;
    }

    table {
        width: 100%;
        margin-bottom: 1rem;
        color: #212529;
        vertical-align: top;
        border-color: #dee2e6;
    }

    table th,
    table td {
        padding: 0.5rem;
        border-bottom: 1px solid #dee2e6;
    }

    table thead th {
        vertical-align: bottom;
        border-bottom: 2px solid #dee2e6;
        font-weight: bold;
    }

    table tbody tr:hover {
        background-color: rgba(0, 0, 0, 0.075);
    }
}


.error-icon {
    display: none;
}

.error-text {
    font-size: 0;
}

.error-text::after {
    font-size: 12px;
    content: "Not enough information for a causal map.";
}

.highlighted-row {
    background-color: #d1ecf1;
    /* Choose a highlight color you prefer */
}

#newInterviewName {
    font-size: x-large;
}

#newInterviewModal .form-text {
    font-size: 12px;
    color: #aaa;
}

.logged-out {
    color: var(--color-text);
    min-height: 300px;
    /* Add min-height to prevent layout shift */
}

/* Add these classes to your existing styles */
[x-cloak] {
    display: none !important;
}

.h-0 {
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(124, 163, 149, 0.9);
    }
    20% {
        /* Increased from 20px and 10px to 30px and 15px for 50% more intensity */
        box-shadow: 0 0 30px 15px rgba(124, 163, 149, 0.8);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(124, 163, 149, 0);
    }
}

.pulse-animation {
    animation: pulse-glow 7s cubic-bezier(0.4, 0, 0.2, 1);
}

.invalid-glow {
    color: red !important;
    animation: glow 1.5s ease-in-out infinite alternate;
    transform-origin: left center;
}

@keyframes glow {
    from {
        transform: scale(1.4);
    }

    to {
        transform: scale(1.45);

    }
}



.tabulator-header .tabulator-col,
.tabulator-footer {
    padding-left: 10px;
    padding-right: 5px;
    background-color: hsl(149, 12%, 85%) !important;
}

.tabulator {
    background-color: hsl(149, 12%, 85%) !important;
    border: none !important;
}


.tabulator-header .tabulator-col {
    background-color: hsl(149, 12%, 65%) !important;
    color: hsl(149, 12%, 20%) !important;
}


.tabulator-header-filter>input {
    border: 1px solid var(--color-primary);
}


[role="columnheader"]::before {
    content: "" !important;
}



.editor-toolbar.disabled-for-preview a {
    opacity: 0.3;
}

.editor-toolbar.disabled-for-preview a:first-child {
    opacity: 1;
}


.apply-suggestions-container {
    text-align: center;
    margin-top: 10px;
}

.advisor-suggestions {
    padding: 10px;
    background-color: var(--color-white);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-primary);
}

.advisor-suggestion-label {

    color: gray;
}

.advisor-field-word {
    display: none;
}

.advisor-field-name {
    color: var(--color-primary);
}

.advisor-to-word {
    font-size: 0;

}

.advisor-to-word::after {
    content: ": ";
    font-size: 12px;
}

/* Fade/color-code the container when fields are disabled */
.disabled-fields {
    opacity: 0.6;
    /* Fade the fields */
    background-color: #50676633;
    /* Light red background */
    border: 1px dashed #dc3545;
    /* Dashed red border */
    transition: opacity 0.3s ease;
    padding: 10px;
}


/* Container that wraps the toggle and label */
.custom-switch-container {
    display: inline-flex;
    /* Align items horizontally */
    align-items: center;
    /* Vertically center items */
    border: 1px dashed #dc3545;
    /* Border around the toggle */
    background-color: #50676633;
    /* Background for the whole switch */
    border-radius: 10px;
    padding: 10px;
    font-size: 1.2rem;
}

/* Custom toggle input; remove native styling */
.custom-switch-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    /* Set width of toggle */
    height: 20px;
    /* Set height of toggle */
    background: #ccc;
    /* Default background color */
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.3s;
    margin: 0;
    /* Remove spacing */
}

/* Create the slider circle with a pseudo-element */
.custom-switch-input::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

/* Change background when checked */
.custom-switch-input:checked {
    background: #2196F3;
}

/* Slide the indicator when checked */
.custom-switch-input:checked::before {
    transform: translateX(20px);
}

/* Style the label */
.custom-switch-label {
    margin-left: 8px;
    user-select: none;
    /* Prevent text selection */
}


.advisor-suggestion-label {
    margin: 15px 0;
}

.chat-message-user {
    background-color: #7ca395;
    color: white;
}

#createNewInterviewBtn {
    background-color: var(--color-primary);
}

#createNewInterviewBtn,
#createNewInterviewBtn:hover,
#createNewInterviewBtn:active,
#createNewInterviewBtn:visited,
#createNewInterviewBtn:focus,
#createNewInterviewBtn:disabled {
    color: white !important;
}

.firebase-welcome-message {
    background-color: var(--color-white) !important;
    border-radius: var(--border-radius-small);
    padding: var(--padding-default);
    margin-bottom: var(--margin-default);

    a {
        color: black !important;
    }
}

.mermaid {
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 8px 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.mermaid svg {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
}

#recent-responsesTable a {
    color: black !important;
}

/* Smooth vertical expansion for textareas used in interview fields */
textarea.form-control {
    min-height: 60px;         /* initial minimum height */
    transition: min-height 0.3s ease; /* animate changes to height */
    overflow: auto;           /* allow scrolling when content exceeds height */
    resize: vertical;         /* allow manual resizing */
    
}

/* Expand the textarea when it is focused */
textarea.form-control:focus {
    min-height: 200px;        /* expanded minimum height on focus */
}

/* Overlay for dimming the UI */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 999998; /* Just below the notification */
    animation: fadeInOut 12s ease-in-out forwards;
}

/* NEW Center screen notification styling with different class name */
.center-notification {
    position: fixed;           /* Use fixed positioning */
    top: 50%;                  /* Center vertically */
    left: 50%;                 /* Center horizontally */
    transform: translate(-50%, -50%);
    background-color: rgba(124, 163, 149, 0.96);
    color: white;
    padding: 35px 60px;
    border-radius: 12px;
    font-size: 42px;
    text-align: center;
    z-index: 999999;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    animation: fadeInOut 12s ease-in-out forwards;
    max-width: 80%;
    width: auto;
}

/* Dismiss button styling */
.notification-dismiss {
    position: absolute;
    top: 5px;
    right: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-dismiss:hover {
    opacity: 1;
}

/* Animation for fading in and out */
@keyframes fadeInOut {
    0% { opacity: 0; }
    8% { opacity: 1; } /* Fade in over ~1s (8% of 12s) */
    92% { opacity: 1; } /* Stay visible for ~10s */
    100% { opacity: 0; visibility: hidden; } /* Fade out over ~1s */
}

/* Glow animation for elements: applies a bright glow effect for 4s */
.glow-animation {
    animation: pulse-glow 6s ease-in-out;
}

/* Allow disabled textareas in #interviewFieldsContainer to receive pointer events */
#interviewFieldsContainer textarea:disabled {
  pointer-events: auto !important;
}

.wide-tooltip {
  max-width: 500px !important; /* Adjust this value as needed */
  width: 500px !important;
}

/* Add this to your CSS file */
.advisor-icon-tooltip {
    position: fixed !important;
    right: 0 !important;
    bottom: 100px !important;
    left: auto !important;
    top: auto !important;
}

/* Make the parent column wider to accommodate more buttons */
#top-bar .col-12.col-lg-4 {
    flex: 0 0 auto;
    width: 50%; /* Increase from default 33.33% (col-lg-4) to 50% */
}

/* Adjust the first column to balance the layout */
#top-bar .col-12.col-lg-6 {
    flex: 0 0 auto;
    width: 45%; /* Decrease from 50% to 45% */
}

#distributionBtn {
    display: block !important;
    visibility: visible !important;
}
/* Styling for the sharing dropdown */
.sharing-dropdown {
    width: 300px; /* Wider dropdown to accommodate explanations */
    padding: 0.5rem 0;
    z-index: 999999;
    opacity: 1 !important; /* Ensure 100% opacity */
    background-color: var(--color-white); /* Solid background */
    border: 1px solid var(--color-primary); /* Match border style */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow for depth */
}

.sharing-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    white-space: normal; /* Allow text to wrap */
    border-bottom: 1px solid var(--color-lighter); /* Separator between items */
}

.sharing-dropdown .dropdown-item:last-child {
    border-bottom: none; /* Remove border from last item */
}

.sharing-dropdown .dropdown-item:hover {
    background-color: var(--color-lighter);
}

.sharing-dropdown .icon-container {
    width: 24px;
    text-align: center;
}

.sharing-dropdown small {
    display: block;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Adjust the fileBar to work with the dropdown */
#fileBar {
    display: flex;
    flex-wrap: nowrap;
    width: 100%; /* Ensure it takes full width */
}

/* Make buttons equal width */
#fileBar > button, 
#fileBar > .btn-group {
    flex: 1;
    max-width: 33.33%; /* Limit maximum width */
}

#fileBar > button, 
#fileBar > .btn-group > button {
    width: 100%; /* Make buttons fill their container */
    border-radius: 0;
    margin-left: -1px;
    border: 1px solid var(--color-primary);      /* Revert to primary-colored border */
    font-weight: 600;                            /* Make labels more legible */
    background-color: transparent;               /* Let header background show through */
    color: rgba(255, 255, 255, 0.8) !important;  /* Slightly dimmed white text */
}

#fileBar > button:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    margin-left: 0;
}

#fileBar > .btn-group:last-child > button {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Ensure dropdown button has the same styling */
.btn-group .dropdown-toggle {
    background-color: transparent;
    border-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.8) !important;  /* Match Create/Duplicate text brightness */
}

.btn-group .dropdown-toggle:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Active state for the Simple/Advanced overview toggle (reuses Qualia colors) */
.overview-mode-active {
    background-color: var(--color-primary) !important;
    color: var(--color-text) !important;
    border-color: var(--color-primary) !important;
}

/* Maintain desktop layout on mobile devices while allowing some responsive behavior */
@media (max-width: 767.98px) {
  /* Prevent mobile viewport scaling */
  html {
    min-width: 320px;
  }
  
  /* Ensure the body allows horizontal scrolling if needed */
  body {
    overflow-x: auto;
    min-width: 320px;
  }
  
  /* Prevent extreme compression of containers */
  .container, .container-fluid {
    min-width: 320px;
    padding: 0 10px;
  }
  
  /* Disable mobile-specific navigation changes */
  .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  
  /* Ensure buttons don't get too small */
  #fileBar > button, 
  #fileBar > .btn-group > button {
    padding: 0.375rem 0.5rem;
    font-size: 0.9rem;
  }
  
  /* Ensure tab navigation remains visible */
  .nav-tabs .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Make columns expand to full width when stacked */
  .col-lg-6 {
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 20px;
  }
}

/* Prevent mobile-specific touch behaviors */
@media (pointer: coarse) {
  /* Increase tap target sizes slightly without changing layout */
  button, 
  .btn,
  select,
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 38px;
  }
  
  /* Prevent zooming on form fields */
  input, select, textarea {
    font-size: 16px;
  }
}

/* Fix the medium-width range (between 700px and 1000px) */
@media (max-width: 1000px) and (min-width: 768px) {
  /* Make columns expand to full width in this range */
  .col-lg-6 {
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 20px;
  }
  
  /* Ensure proper spacing in this range */
  .container, .container-fluid {
    padding: 0 15px;
  }
}

/* Chat-head style for advisor icon */
body #advisorIcon.advisor-icon {
  position: fixed !important;
  bottom: 30px !important; 
  right: 30px !important;
  z-index: 9999 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background-color: var(--color-primary) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  cursor: pointer !important;
  transition: transform 0.2s ease !important;
}

/* Hover effect for chat-head */
body #advisorIcon.advisor-icon:hover {
  transform: scale(1.1) !important;
}

/* Style the icon inside the chat-head */
body #advisorIcon.advisor-icon i.fas {
  font-size: 28px !important;
  color: white !important;
}

/* Modal-style advisor window */
body #advisorWindow.advisor-window {
  position: fixed !important;
  top: 50% !important;
  left: 35vw !important; /* Start 35vw from left */
  right: 5vw !important; /* End 5vw from right */
  bottom: auto !important;
  transform: translateY(-50%) !important;
  z-index: 9999 !important;
  width: auto !important; /* Width is auto since we set left and right */
  height: 70vh !important;
  max-width: none !important; /* Remove max-width constraint */
  max-height: 80vh !important;
  border-radius: 15px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
  overflow: hidden !important;
  background-color: white !important;
  margin-right: 0 !important; /* Remove margin-right as we're using right property */
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  
  /* Add flex display to create a column layout */
  flex-direction: column !important;
}

/* Hide before Alpine initializes (has x-cloak) or when Alpine hides it */
body #advisorWindow.advisor-window[x-cloak],
body #advisorWindow.advisor-window[style*="display: none"] {
  display: none !important;
  opacity: 0 !important;
  transform: translateY(-50%) scale(0.95) !important;
  pointer-events: none !important;
}

/* Show with flex layout when Alpine shows it (x-cloak removed and no display:none) */
body #advisorWindow.advisor-window:not([x-cloak]):not([style*="display: none"]) {
  display: flex !important;
}

/* Advisor backdrop - fade background when advisor is open */
.advisor-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.75); /* Changed from 0.9 to 0.5 */
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show backdrop when advisor is open */
body.advisor-open .advisor-backdrop {
  pointer-events: auto;
  opacity: 1;
}

/* Modal backdrop for advisor - this provides the box shadow effect */
body #advisorWindow.advisor-window::before {
  content: '' !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: rgba(255, 255, 255, 0.5) !important; 
  z-index: -1 !important;
  opacity: 1 !important;
  transition: opacity 0.3s ease !important;
}

/* Make sure backdrop is hidden when advisor is closed */
[x-cloak] #advisorWindow.advisor-window::before,
#advisorWindow.advisor-window[style*="display: none"]::before {
  opacity: 0 !important;
}

/* Advisor header styling */
.advisor-header {
  padding: 15px 20px !important;
  background-color: var(--color-primary) !important;
  color: white !important;
  font-size: 1.2rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important; /* Prevent header from shrinking */
}

/* Messages container */
.advisor-messages {
  padding: 20px !important;
  overflow-y: auto !important;
  background-color: white !important;
  flex: 1 !important; /* Fill available space */
}

/* Update button container */
#advisorWindow .p-3.text-center {
  flex-shrink: 0 !important; /* Prevent shrinking */
  background-color: white !important;
}

/* Input form styling */
.advisor-form {
  padding: 15px !important;
  background-color: #f8f9fa !important;
  border-top: 1px solid #dee2e6 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important; /* Prevent form from shrinking */
}

/* Input field */
.advisor-form input {
  flex: 1 !important;
  border-radius: 20px !important;
  padding: 10px 15px !important;
}

/* Button styling */
.advisor-form button {
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* Chat message bubbles */
.chat-message {
  margin-bottom: 15px !important;
  padding: 12px 15px !important;
  border-radius: 18px !important;
  max-width: 85% !important;
  position: relative !important;
}

.chat-message-user {
  background-color: var(--color-primary) !important;
  color: white !important;
  margin-left: auto !important;
  border-bottom-right-radius: 5px !important;
}

.chat-message-advisor {
  background-color: #f0f0f0 !important;
  color: #333 !important;
  margin-right: auto !important;
  border-bottom-left-radius: 5px !important;
}

/* Loading animation for advisor chat */
.loading-animation {
  display: flex;
  align-items: center;
  margin-right: 10px;
  height: 38px;
}

.loading-animation .dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  margin: 0 3px;
  animation: bounce 1.5s infinite ease-in-out;
}

.loading-animation .dot:nth-child(1) {
  animation-delay: 0s;
}

.loading-animation .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-animation .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Adjust the advisor form to accommodate the loading animation */
.advisor-form {
  padding: 15px !important;
  background-color: #f8f9fa !important;
  border-top: 1px solid #dee2e6 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
}

/* 3D Button Effect for advisor update button */
.advisor-update-btn {
  background-color: #bb9d1c !important;
  color: white !important;
  padding: 10px 24px !important;
  border-radius: 6px !important;
  position: relative !important;
  box-shadow: 0 6px 0 #9a8118, 0 8px 10px rgba(0,0,0,0.2) !important;
  transform: translateY(-2px) !important;
  transition: all 0.2s ease !important;
  border: 1px solid #a78f1a !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3) !important;
}

.advisor-update-btn:hover {
  background-color: #c9a920 !important;
  box-shadow: 0 4px 0 #9a8118, 0 6px 8px rgba(0,0,0,0.2) !important;
  transform: translateY(0) !important;
}

.advisor-update-btn:active {
  background-color: #aa9019 !important;
  box-shadow: 0 2px 0 #9a8118, 0 2px 4px rgba(0,0,0,0.1) !important;
  transform: translateY(2px) !important;
}

.advisor-update-btn i {
  margin-right: 8px !important;
}

/* Flash animation for updated fields */
@keyframes flash-update {
  0% {
    background-color: transparent;
  }
  5% { /* Quick ramp up */
    background-color: rgba(187, 157, 28, 0.9);
  }
  40% { /* Hold strong color for 2s */
    background-color: rgba(187, 157, 28, 1);
  }
  60% { /* Start gentle fade at 3s */
    background-color: rgba(187, 157, 28, 0.6);
  }
  80% { /* Continue fading at 4s */
    background-color: rgba(187, 157, 28, 0.25);
  }
  100% { /* Complete fade by 5s */
    background-color: transparent;
  }
}

.flash-update {
  animation: flash-update 5s ease-out;
}


#overviewOutput h1,
#overviewOutput h2,
#overviewOutput h3,
#overviewOutput h4,
#overviewOutput h5,
#overviewOutput h6,
#overviewOutput .h1,
#overviewOutput .h2,
#overviewOutput .h3,
#overviewOutput .h4,
#overviewOutput .h5,
#overviewOutput .h6 {
    margin-top: 1.5rem !important;
}

.introjs-skipbutton {
  font-size: 25px !important;
}

/* Custom cancel button for introjs */
.introjs-cancelbutton {
  position: absolute !important;
  right: 70px !important; /* Position to the left of the skip button */
  top: 8px !important;
  padding: 4px 10px !important;
  font-size: 18px !important;
  color: #d33 !important;
  background-color: transparent !important;
  border: 1px solid #d33 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.introjs-cancelbutton:hover {
  background-color: #d33 !important;
  color: white !important;
}

/* Make sure the tooltip has enough room for the buttons */
.introjs-tooltipbuttons {
  padding-top: 30px !important; /* Add extra space for the cancel button */
}

/* Adjust the skip button position to account for the cancel button */
.introjs-skipbutton {
  margin-right: 10px !important;
}

/* Discrete helper under Instructions for data sections */
#dataSectionsInfo {
    background-color: hsl(149, 12%, 95%);
    border: 1px dotted var(--color-primary);
    border-radius: var(--border-radius-small);
    padding: 6px 8px;
    margin-top: 6px;
    color: #364141; /* subtle dark */
}

#dataSectionsInfo > div {
    margin: 2px 0;
}
/* Interview citation links */
.interview-citation {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.interview-citation:hover {
    color: #004499;
    text-decoration: underline;
}


.accordion-item{
    border-radius: 15px !important;
    border: 1px solid var(--color-primary) !important;
}
.accordion-header{
    border-bottom: 1px solid var(--color-primary) !important;
}
.accordion-collapse{
background-color: #eee !important;
}

