/* ===== IMPORT OUTFIT FONT ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

/* ===== GLOBAL STYLES ===== */
body {
  background: linear-gradient(to right, #f8f9fa, #e9ecef); /* Light Gray Gradient */
  color: #333; /* Dark Gray for better readability */
  font-family: 'Outfit', sans-serif;
  padding-top: 80px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* ===== NAVBAR & HEADER ===== */
header {
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 70px;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  width: 100px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding-right: 2rem;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

nav li {
  display: flex;
  align-items: center;
}

nav a {
  color: #333;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

nav a:hover {
  color: #6B73FF;
  background-color: rgba(107, 115, 255, 0.1);
}

nav a.active {
  color: #6B73FF;
  background-color: rgba(107, 115, 255, 0.1);
}

/* For the Workflows dropdown specifically */
.workflow-menu {
  position: relative;
  display: inline-block;
}

.workflow-menu .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 0.5rem 0;
  display: none;
  z-index: 1000;
}

.workflow-menu:hover .dropdown-menu {
  display: block;
}

.workflow-menu .dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.workflow-menu .dropdown-item:hover {
  background-color: rgba(107, 115, 255, 0.1);
  color: #6B73FF;
}

/* ===== CONTENT SPACER ===== */
.spacer {
  height: 30px;
}

/* ===== CARDS & PANELS ===== */
.card, .mantine-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.card:hover, .mantine-card:hover {
  transform: translateY(-3px);
}

/* ===== BUTTONS ===== */
.btn-cta {
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
}

.btn-cta-primary {
  background: #6B73FF; /* Updated main color */
  color: white;
  border: none;
}

.btn-cta-primary:hover {
  background: #575FEB; /* Darker variant */
  transform: scale(1.05);
}

.btn-cta-outline {
  border: 2px solid #6B73FF; /* Updated */
  color: #6B73FF;
  background: transparent;
}

.btn-cta-outline:hover {
  background: #6B73FF;
  color: white;
}

/* ===== FORM INPUTS ===== */
input, select, textarea {
  background: white;
  color: #333;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  width: 75%;
}

input:focus, select:focus, textarea:focus {
  border-color: #6B73FF; /* Updated */
  box-shadow: 0 0 10px rgba(107,115,255, 0.5); /* Using rgb for #6B73FF */
}

/* ===== GRID SYSTEM ===== */
.mantine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  justify-content: center;
}

@media (max-width: 768px) {
  .mantine-grid {
    grid-template-columns: 1fr;
  }
  .button-group {
    flex-direction: column;
    align-items: stretch;
}

.btn {
    width: 100%;
}
}

/* ===== CHEVRON BUTTON ===== */
.chevron-button {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6B73FF; /* Updated */
  transition: transform 0.3s ease-in-out;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  margin-left: auto;
}

.chevron-button:hover {
  color: #575FEB; /* Darker variant */
  transform: scale(1.1);
}

/* ===== SEARCH BOX ===== */
.search-box {
  position: relative;
  width: 250px;
  margin-left: auto;
  margin-right: 20px;
}

.search-box input {
  width: 100%;
  padding: 8px 35px 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: #6B73FF;
  box-shadow: 0 0 0 2px rgba(107, 115, 255, 0.1);
  outline: none;
}

.search-box::after {
  content: "\f002"; /* Font Awesome magnifying glass icon */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B73FF;
  pointer-events: none;
}

/* Make search box responsive */
@media (max-width: 768px) {
  .search-box {
    width: 100%;
    margin: 10px 0;
  }
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  padding: 100px 0;
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  color: #222;
  text-align: center;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 100px;
  background: url('/images/wave.svg') no-repeat bottom center;
  background-size: cover;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 15px;
  animation: fadeInUp 1s ease-in-out;
}

.hero-section p {
  font-size: 1.2rem;
  font-weight: 400;
  color: #555;
  max-width: 700px;
  margin: 0 auto 20px;
  animation: fadeInUp 1.2s ease-in-out;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.hero-buttons .mantine-button {
  display: inline-block;
  padding: 16px 32px;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease-in-out;
  letter-spacing: 0.5px;
}

.hero-buttons .mantine-button-primary {
  background: #6B73FF; /* Updated */
  color: white;
  border: 2px solid transparent;
}

.hero-buttons .mantine-button-primary:hover {
  background: #575FEB; /* Darker variant */
  transform: scale(1.1);
  box-shadow: 0px 6px 18px rgba(107,115,255, 0.3);
}

.hero-buttons .mantine-button-outline {
  border: 2px solid #6B73FF; /* Updated */
  color: #6B73FF;
  background: white;
}

.hero-buttons .mantine-button-outline:hover {
  background: #6B73FF;
  color: white;
  transform: scale(1.05);
  box-shadow: 0px 6px 14px rgba(107,115,255, 0.25);
}

/* ===== FEATURES & HOW IT WORKS SECTION ===== */
.features-section,
.how-it-works-section {
  padding: 80px 0;
  background: #ffffff;
  text-align: center;
}

.features-section .mantine-card,
.how-it-works-section .mantine-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.features-section .mantine-card:hover,
.how-it-works-section .mantine-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.mantine-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #6B73FF; /* Updated */
  transition: transform 0.3s ease-in-out;
}

.mantine-card:hover .mantine-icon {
  transform: scale(1.1);
}

.mantine-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 80px 0;
  background: #6B73FF; /* Updated */
  color: white;
  text-align: center;
  position: relative;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
}

.cta-section p {
  font-size: 1.2rem;
  font-weight: 400;
}

.cta-section .mantine-button {
  margin-top: 20px;
  padding: 16px 32px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(107,115,255, 0.2);
  transition: all 0.3s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.cta-section .mantine-button-primary {
  background: #6B73FF; /* Updated */
  color: white;
  border: 2px solid transparent;
  transition: all 0.3s ease-in-out;
}

.cta-section .mantine-button-primary:hover {
  background: #575FEB; /* Darker variant */
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(107,115,255, 0.3);
}

.cta-section .mantine-button-outline {
  border: 2px solid #6B73FF; /* Updated */
  color: #6B73FF;
  background: white;
  transition: all 0.3s ease-in-out;
}

.cta-section .mantine-button-outline:hover {
  background: #6B73FF;
  color: white;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(107,115,255, 0.25);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== DROPDOWN STYLES ===== */
.mantine-dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown Button Style */
.mantine-button-secondary {
  background: #6B73FF; /* Updated */
  color: white;
  border: 2px solid transparent;
  transition: all 0.3s ease-in-out;
  padding: 10px 16px;
  font-weight: 600;
  border-radius: 8px;
}

.mantine-button-secondary:hover {
  background: #575FEB; /* Darker variant */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(107,115,255, 0.2);
}

/* Dropdown Menu */
.mantine-dropdown .dropdown-menu {
  z-index: 1055 !important;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
}

.mantine-dropdown .dropdown-menu.show {
  display: block;
}

/* Dropdown Items */
.dropdown-menu .dropdown-item {
  color: #333;
  padding: 10px 16px;
  transition: all 0.3s ease-in-out;
}

.dropdown-menu .dropdown-item:hover {
  background: #f8f9fa;
  color: #6B73FF; /* Updated */
}

/* For dropdowns inside card bodies */
.mantine-card-body .dropdown-menu {
  position: absolute;
  z-index: 1055 !important;
}

/* ===== PAGINATION ===== */
.pagination-container {
  text-align: center;
  margin-top: 20px;
}

.mantine-pagination {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mantine-pagination .mantine-button {
  background: #6B73FF; /* Updated */
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.mantine-pagination .mantine-button:hover:not(:disabled) {
  background: #575FEB; /* Darker variant */
}

.mantine-pagination .mantine-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.mantine-pagination #pageInfo {
  font-size: 1rem;
  color: #333;
}

.hidden {
  display: none;
}

.button-group {
  display: flex;
  gap: 10px; /* Adds spacing between buttons */
  margin-bottom: 15px; /* Adds some spacing below */
}

.btn {
  padding: 10px 15px;
  font-size: 16px;
  white-space: nowrap;
}
#saveMappingsButton {
  position: relative;
  z-index: 10;
  background-color: #6B73FF; /* Example blue - adjust as needed */
  border-color: #6B73FF;     /* Match border colour */
  color: #fff;              /* White text for contrast */
}
/* Ensure hover and active states reflect the change */
#saveMappingsButton:hover,
#saveMappingsButton:focus {
  background-color: #5c64e0; /* Slightly darker blue than #6B73FF*/
  border-color: #5c64e0;
}

#saveInstructionButton {
  position: relative;
  z-index: 10;
  background-color: #6B73FF; /* Example blue - adjust as needed */
  border-color: #6B73FF;     /* Match border colour */
  color: #fff;              /* White text for contrast */
}
/* Ensure hover and active states reflect the change */
#saveInstructionButton:hover,
#saveInstructionButton:focus {
  background-color: #5c64e0; /* Slightly darker blue than #6B73FF*/
  border-color: #5c64e0;
}
.scrollable-long-text {
  max-width: 400px;      /* Fixed column width */
  overflow-x: auto;      /* Enable horizontal scrolling */
  white-space: nowrap;   /* Prevent text wrapping */
  padding: 0.25rem;      /* Optional padding */
  border: 1px solid #ddd;/* Optional visual separation */
}
.workflow-details .d-flex {
  flex-wrap: wrap;
  gap: 10px; /* Optional: adds spacing between buttons */
}

/* Tour styles */
.tour-overlay {
    position: fixed;
    z-index: 9998;
    transition: all 0.3s ease;
    box-sizing: border-box;
    pointer-events: none;
}

.tour-tooltip {
    position: fixed;
    z-index: 9999;
    width: 320px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.tour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

.tour-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.tour-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.tour-body {
    padding: 16px;
}

.tour-text {
    margin: 0;
    line-height: 1.5;
}

.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

.tour-progress {
    color: #666;
    font-size: 14px;
}

.tour-nav-buttons {
    display: flex;
    gap: 8px;
}

.tour-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tour-btn-skip {
    color: #666;
}

.tour-btn-prev {
    color: #666;
}

.tour-btn-next {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.tour-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.tour-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== BOOTSTRAP TOOLTIP FIXES ===== */
.tooltip {
    pointer-events: none;
    z-index: 9999 !important;
    position: absolute !important;
}

.tooltip .tooltip-inner {
    max-width: 300px;
    text-align: left;
    background-color: #212529;
    color: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.tooltip .tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
}

/* Ensure tooltips appear above all content */
.tooltip.show {
    opacity: 1;
}

/* ===== REFRESH REMINDER ANIMATION ===== */
.pulse-reminder {
    animation: pulseReminder 2s infinite;
}

@keyframes pulseReminder {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* ===== CONSIGNMENT TABLE IMPROVEMENTS ===== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    position: relative;
}

#consignmentsTable {
    width: 100% !important;
    table-layout: auto; /* Auto layout for better column distribution */
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1200px; /* Ensure minimum width for horizontal scroll */
}

#consignmentsTable th,
#consignmentsTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 6px 8px;
    font-size: 0.75rem;
    line-height: 1.2;
    border: 1px solid #dee2e6;
    border-right: none;
    border-bottom: none;
}

#consignmentsTable th:last-child,
#consignmentsTable td:last-child {
    border-right: 1px solid #dee2e6;
    position: sticky;
    right: 0;
    background-color: white;
    z-index: 10;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
}

#consignmentsTable thead th:last-child {
    background-color: #f8f9fa;
}

/* Disabled sticky positioning for left columns to fix overlap issues */
/* Will re-enable once we get the basic layout working properly */
/*
#consignmentsTable th:first-child,
#consignmentsTable td:first-child {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 9;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

#consignmentsTable th:nth-child(2),
#consignmentsTable td:nth-child(2) {
    position: sticky;
    left: 120px;
    background-color: white;
    z-index: 9;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}
*/

#consignmentsTable tbody tr:last-child td {
    border-bottom: 1px solid #dee2e6;
}

#consignmentsTable th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

/* Column sizing classes */
.priority-col {
    width: 120px;
    min-width: 120px;
}

.flexible-col {
    min-width: 80px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 800px) {
    .priority-col {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }
    
    #consignmentsTable th:nth-child(2),
    #consignmentsTable td:nth-child(2) {
        left: 100px; /* Adjust for smaller first column */
    }
    
    #consignmentsTable th,
    #consignmentsTable td {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}

/* Hide DataTables buttons */
.dt-buttons {
    display: none !important;
}

/* Pin search box to the left */
.dataTables_wrapper .dataTables_filter {
    float: left !important;
    text-align: left !important;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_length {
    float: right !important;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5em;
    margin-right: 0;
    width: 250px;
}

/* Cases page toolbar - search and buttons on same line */
#casesToolbar .dataTables_filter {
    display: inline-block;
}

#casesToolbar .dataTables_filter label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    font-weight: normal;
}

#casesToolbar .dataTables_filter input {
    margin-left: 0.5em;
}

/* Ensure proper clearfix for the top controls */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-top: 0;
}

.dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* Filters row styling */
#consignmentsTable thead tr.filters {
    background-color: #f8f9fa;
}

#consignmentsTable thead tr.filters th {
    padding: 4px;
    border-bottom: 1px solid #dee2e6;
}

#consignmentsTable thead tr.filters input,
#consignmentsTable thead tr.filters select {
    width: 100%;
    font-size: 0.75rem;
    padding: 2px 4px;
}

/* Utility class to show filters when needed */
.show-filters #consignmentsTable thead tr.filters {
    display: table-row !important;
}

/* Specific column styling */
.consignment-number {
    color: #6B73FF;
    font-weight: 600;
    text-decoration: none;
}

.consignment-number:hover {
    color: #575FEB;
    text-decoration: underline;
}

.tracking-number {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
}

.location-text,
.zone-text {
    font-size: 0.7rem;
}

.status-badge {
    font-size: 0.65rem;
    padding: 3px 6px;
}

.currency-amount {
    font-weight: 600;
    text-align: right;
    display: block;
}

.cost-amount {
    color: #dc3545;
}

.sell-amount {
    color: #28a745;
}

/* Responsive table improvements */
@media (max-width: 1400px) {
    #consignmentsTable th,
    #consignmentsTable td {
        font-size: 0.7rem;
        padding: 5px 2px;
    }
    
    .tracking-number {
        font-size: 1.5rem;
    }
    
    .status-badge {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
}

@media (max-width: 1200px) {
    #consignmentsTable th,
    #consignmentsTable td {
        font-size: 0.65rem;
        padding: 4px 2px;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.6rem;
    }
    
    #consignmentsTable th,
    #consignmentsTable td {
        padding: 3px 1px;
        font-size: 0.6rem;
    }
}

/* ===== AI CHAT @-MENTION SYSTEM STYLES ===== */

/* Mention Tags - Styled display of @-mentions in chat */
.mention-tag {
    display: inline-flex;
    align-items: center;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 2px 8px;
    margin: 0 2px;
    font-size: 0.875rem;
    gap: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: #0c4a6e;
    vertical-align: middle;
}

/* Type-specific mention tag colors */
.mention-tag.mention-carrier {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.mention-tag.mention-consignee {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.mention-tag.mention-shipper {
    background: #f3e8ff;
    border-color: #8b5cf6;
    color: #5b21b6;
}

.mention-tag.mention-client {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.mention-icon {
    font-size: 1rem;
    line-height: 1;
}

.mention-type {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.mention-name {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Autocomplete Dropdown */
.mention-dropdown {
    position: fixed;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
    min-width: 300px;
}

.mention-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.mention-item:last-child {
    border-bottom: none;
}

.mention-item:hover,
.mention-item.selected {
    background: #f3f4f6;
}

.mention-item.selected {
    background: #e0f2fe;
    border-left: 3px solid #0ea5e9;
}

.mention-item-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.mention-item-text {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

/* Placeholder and example items */
.mention-placeholder {
    cursor: default;
    background: #f9fafb !important;
    color: #6b7280;
    font-style: italic;
}

.mention-placeholder-text {
    font-size: 0.8rem;
    color: #6b7280;
}

.mention-example {
    cursor: default;
    background: #f9fafb !important;
    color: #6b7280;
    border-left: 3px solid #e5e7eb;
}

.mention-example-text {
    font-size: 0.8rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

/* Scrollbar styling for dropdown */
.mention-dropdown::-webkit-scrollbar {
    width: 6px;
}

.mention-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.mention-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.mention-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive adjustments for mention system */
@media (max-width: 768px) {
    .mention-dropdown {
        min-width: 250px;
        max-height: 150px;
    }
    
    .mention-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .mention-tag {
        font-size: 0.8rem;
        padding: 1px 6px;
        gap: 3px;
    }
    
    .mention-type {
        font-size: 0.7rem;
    }
    
    .mention-name {
        font-size: 0.8rem;
    }
}

/* Animation for dropdown appearance */
@keyframes mentionDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mention-dropdown {
    animation: mentionDropdownFadeIn 0.15s ease-out;
}

/* ===== AI CHAT MARKDOWN STYLING ===== */

/* Headers in chat messages */
.chat-header {
    color: #1f2937;
    font-weight: 600;
    margin: 16px 0 8px 0;
    font-family: 'Outfit', sans-serif;
}

.chat-header:first-child {
    margin-top: 0;
}

h1.chat-header {
    font-size: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 4px;
}

h2.chat-header {
    font-size: 1.25rem;
    color: #374151;
}

h3.chat-header {
    font-size: 1.1rem;
    color: #4b5563;
}

/* Text emphasis */
.chat-bold {
    font-weight: 600;
    color: #1f2937;
}

.chat-italic {
    font-style: italic;
    color: #4b5563;
}

/* Lists */
.chat-list {
    margin: 12px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.chat-numbered-list {
    margin: 12px 0;
    padding-left: 20px;
    list-style-type: decimal;
}

.chat-bullet,
.chat-numbered {
    margin: 4px 0;
    line-height: 1.5;
    color: #374151;
}

.chat-bullet::marker {
    color: #6b7280;
}

.chat-numbered::marker {
    color: #6b7280;
    font-weight: 600;
}

/* Blockquotes */
.chat-quote {
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
    margin: 12px 0;
    padding: 8px 16px;
    font-style: italic;
    color: #475569;
    border-radius: 0 4px 4px 0;
}

/* Code styling */
.chat-code-block {
    background: #1f2937;
    color: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

.chat-code-block code {
    background: none;
    padding: 0;
    color: inherit;
}

.chat-inline-code {
    background: #f1f5f9;
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
}

/* Tables */
.chat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-table-header {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.chat-table-cell {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    vertical-align: top;
}

.chat-table tbody tr:hover {
    background: #f8fafc;
}

.chat-table tbody tr:last-child .chat-table-cell {
    border-bottom: none;
}

/* Responsive adjustments for chat markdown */
@media (max-width: 768px) {
    .chat-header {
        font-size: 0.95rem;
        margin: 12px 0 6px 0;
    }
    
    h1.chat-header {
        font-size: 1.2rem;
    }
    
    h2.chat-header {
        font-size: 1.1rem;
    }
    
    h3.chat-header {
        font-size: 1rem;
    }
    
    .chat-list,
    .chat-numbered-list {
        padding-left: 16px;
        margin: 8px 0;
    }
    
    .chat-quote {
        margin: 8px 0;
        padding: 6px 12px;
    }
    
    .chat-code-block {
        padding: 8px;
        font-size: 0.8rem;
        margin: 8px 0;
    }
    
    .chat-table {
        font-size: 0.8rem;
        margin: 12px 0;
    }
    
    .chat-table-header,
    .chat-table-cell {
        padding: 8px;
    }
}