#main-container {
  background-color: var(--lt-gray-100);
  flex: 1;
}

:root {
    --primary-color: #333333;
    --secondary-color: #0f88cd;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
}

h1, h2, h3, h4, h5, h6, p {
  color: var(--bs-dark);
}

.profile-picture {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f2f2f2; /* or any other color */
    color: var(--bs-dark);
    font-weight: bold;
}

.highlighted {
  border: var(--bs-primary) solid 2px !important;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#navbar {
  transition: background-color 0.5s ease-out;
  border-bottom: 1px solid #ddd;
}
.navbar {
  font-size: 18px; /* Adjust the size as needed */
}

.navbar-light .navbar-nav .nav-link,
.navbar-light .navbar-nav .nav-item {
  color: var(--primary-color);
  transition: color 0.2s ease-in-out;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: var(--secondary-color);
}

.navbar-toggler {
  border-color: #ddd;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
  background-color: #ddd;
}

/* Add animation for dropdown */
.dropdown-menu {
  display: none; /* Hide the menu initially */
  opacity: 0; /* Set initial opacity to 0 */
  transition: opacity 0.3s ease; /* Smooth transition for opacity */
}

.dropdown-menu.show {
  display: block; /* Show the menu when the dropdown is active */
  opacity: 1; /* Set opacity to 1 for fade-in effect */
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075)!important;
}

#footer {
  background-color: #f8f9fa; /* Slightly off-white for a soft look */
  color: #212529; /* Bootstrap's default dark shade for text */
}

#footer a {
  color: var(--secondary-color);
}

#footer a:hover {
  text-decoration: underline; /* Adds a bit of interaction on hover */
}

/* Hide spinners in WebKit browsers */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide spinners in Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.sidebar {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
}

.export-notes-pre {
    white-space: pre-wrap;
    font-family: inherit;
    max-height: 150px;
    overflow-y: auto;
}

.col-checkbox {
    width: 40px;
}

.progress-xs {
    height: 5px;
}

.icon-bullet {
    font-size: .6rem;
    vertical-align: middle;
}

.history-label {
    min-width: 110px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-value {
    max-width: 160px;
}

.sidebar .nav-link {
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.25rem 0;
    transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: var(--secondary-color);
    color: white;
    transform: translateX(4px);
}

.card {
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cost-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chat-container {
    height: 60vh;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
}

.message {
    padding: 1rem;
    margin: 0.5rem;
    border-radius: 0.75rem;
    max-width: 80%;
}

.message.user {
    background-color: var(--bs-primary);
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.user,
.message.user .message-content,
.message.user .markdown-content,
.message.user .markdown-content p,
.message.user .markdown-content li,
.message.user .markdown-content strong,
.message.user .markdown-content em,
.message.user .message-header small {
    color: white !important;
}

.message.user .markdown-content code {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.message.user .markdown-content pre {
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
}

.message.assistant {
    background-color: #f1f5f9;
    color: var(--dark-text);
    margin-right: auto;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--primary-color);
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: -100%;
        width: 280px;
        transition: left 0.3s;
        z-index: 1000;
    }
    .sidebar.show {
        left: 0;
    }
}

/* Mobile sidebar backdrop */
#sidebarBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    cursor: pointer;
}
#sidebarBackdrop.show { display: block; }

/* Mobile sidebar floating toggle button */
#sidebarToggleBtn {
    display: none;
    position: fixed;
    bottom: 3.5rem;
    left: 1.25rem;
    z-index: 1001;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 2rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    align-items: center;
    gap: 0.45rem;
}
#sidebarToggleBtn:hover { background: var(--primary-color); transform: scale(1.05); }

@media (max-width: 767.98px) {
    #sidebarToggleBtn { display: flex; }
}

.speech-input.listening {
    border-color: #ff4444;
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.mic-btn {
    margin-left: 5px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    padding: 5px 8px;
}

.mic-btn:hover {
    background-color: #f0f0f0;
}

.mic-btn:disabled {
    cursor: not-allowed;
}

/* Icon-only navbar links with hover label */
.nav-icon-link {
    display: flex !important;
    align-items: center;
    position: relative;
    white-space: nowrap;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Bigger icons */
.nav-icon-link .fas {
    font-size: 1.25rem;
}

/* Label: hidden inline by default, expands on hover (shifts siblings) */
.nav-icon-link .nav-label {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 0;
    transition: max-width 0.45s ease, opacity 0.35s ease, margin-left 0.45s ease;
}

.nav-icon-link:hover .nav-label,
.nav-icon-link.nav-current .nav-label {
    max-width: 300px;
    opacity: 1;
    margin-left: 0.4rem;
}

/* Used only during JS measurement — no flash, no transition */
.nav-icon-link.measuring .nav-label {
    max-width: none !important;
    opacity: 0 !important;
    margin-left: 0.4rem !important;
    transition: none !important;
}

/* On mobile (collapsed nav), always show labels */
@media (max-width: 991.98px) {
    .nav-icon-link .nav-label {
        max-width: 300px;
        opacity: 1;
        margin-left: 0.4rem;
    }
}