/* ----------------------------------------------------
   Base Resets & Variables
---------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* --- Typography --- */
    --font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 16px;
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.5rem;
    --font-size-h4: 1.25rem;
    --font-size-h5: 1.1rem;
    --font-size-small: 0.875rem;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;

    /* --- Spacing --- */
    --space-xxs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;

    /* --- Colors --- */
    --primary: #1312AE;
    --primary-light: #2827c2;
    --primary-dark: #0f0e8a;
    --secondary: #FAD642;
    --secondary-light: #fbe16b;
    --secondary-dark: #f8cc19;
    --yellow-dark: #f8cc198a;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --white: #fff;
    --black: #000;

    /* --- Theme Variables (Dark Theme) --- */
    --bg-color: var(--gray-900);
    --bg-card: var(--gray-800);
    --border-color: var(--gray-700);
    --text-color: var(--gray-100);
    --text-secondary: var(--gray-400);
    --text-muted: var(--gray-500);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-color: var(--gray-100);
    --bg-card: var(--white);
    --border-color: var(--gray-300);
    --text-color: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
}

/* ----------------------------------------------------
   Theme Toggle (Slider Style)
---------------------------------------------------- */
.theme-toggle {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--bg-card);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--space-xl);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: var(--font-size-small);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-switch {
    width: 40px;
    height: 20px;
    background-color: var(--border-color);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

[data-theme="light"] .toggle-switch::after {
    transform: translateX(20px);
}

/* ----------------------------------------------------
   Global Body Styles
---------------------------------------------------- */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ----------------------------------------------------
   Layout Container
---------------------------------------------------- */
.container {
    display: grid;
    grid-template-columns: 220px 1fr 340px; /* narrower sidebar */
    min-height: 100vh;
    gap: var(--space-sm);
    padding: var(--space-sm);
    transition: grid-template-columns 0.3s ease;
}
.container.right-sidebar-collapsed {
    grid-template-columns: 240px 1fr 60px;
}
/* ----------------------------------------------------
   Sidebar
---------------------------------------------------- */
.sidebar {
    background-color: var(--bg-card);
    padding: var(--space-sm);  /* smaller padding if desired */
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: var(--space-sm);
    height: calc(100vh - 2 * var(--space-sm));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.logo-container {
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 50px; /* Increased logo size */
}

.nav-section {
    margin-bottom: var(--space-lg);
}

.nav-title {
    color: var(--text-secondary);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--space-sm);
    margin-bottom: var(--space-xs);
    transition: all 0.2s ease;
    gap: var(--space-sm);
}

.nav-item:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--white);
}

.nav-item i {
    font-size: var(--font-size-h5); /* Increased icon size */
}

/* Footer styling */
.footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    height: 40px; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    /* no special padding needed, but you can add if you like */
}
/* ----------------------------------------------------
   Main Content
---------------------------------------------------- */
.main-content {
    padding: var(--space-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: var(--space-md);
    background-color: var(--bg-color);
    padding: var(--space-md);
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.search {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-xl);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-color);
    width: 300px;
    transition: all 0.2s ease;
}

.search:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(19, 18, 174, 0.2);
}

.tabs {
    display: flex;
    gap: var(--space-md);
}

.tab {
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--space-xl);
    transition: all 0.2s ease;
    border: none;
    background: none;
    font-size: var(--font-size-base);
}

.tab:hover {
    color: var(--text-color);
    background-color: rgba(19, 18, 174, 0.1);
}

.tab.active {
    background-color: var(--secondary);
    color: var(--black);
    font-weight: var(--font-weight-medium);
}



/* ----------------------------------------------------
   Advanced Search Form
---------------------------------------------------- */
.advanced-search-container {
    background: var(--bg-card);
    border-radius: var(--space-md);
    border: 1px solid var(--border-color);
    padding: var(--space-lg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.search-header h1 {
    font-size: var(--font-size-h1);
    margin-bottom: var(--space-sm);
    color: var(--text-color);
}

.search-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.accordion {
    border-radius: var(--space-md);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.accordion-item:last-of-type {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: var(--space-md);
    transition: background 0.2s;
}

.accordion-header:hover {
    background: rgba(174, 161, 18, 0.165);
}

.accordion-icon.is-blue {
    color: var(--primary);
    margin-right: var(--space-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-base);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.accordion-icon.is-blue i {
    color: white;
}

.accordion-header h5 {
    flex: 1;
    color: var(--text-color);
    font-size: var(--font-size-h5);
    margin: 0;
    font-weight: var(--font-weight-medium);
}

.accordion-icon.is-chevron {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.accordion-icon.is-chevron img {
    width: 16px;
    height: 16px;
    display: none;
}

.accordion-item.active .accordion-icon.is-chevron img[alt="Collapse"] {
    display: inline-block;
}

.accordion-item:not(.active) .accordion-icon.is-chevron img[alt="Expand"] {
    display: inline-block;
}

.accordion-content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    padding: 0 var(--space-md);
}

.accordion-item.active .accordion-content {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

.form-group {
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-color);
    font-size: var(--font-size-small);
    margin-bottom: var(--space-xs);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea,
.form-group select,
.form-group input[type="file"] {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--space-xs);
    color: var(--text-color);
    padding: var(--space-sm);
    font-size: var(--font-size-base);
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-group input[type="file"]:focus {
    border-color: var(--primary);
    outline: none;
}

.form-group select[multiple] {
    height: auto;
    padding: var(--space-sm);
}

.form-group select[multiple] option {
    padding: var(--space-xs) var(--space-sm);
    margin-bottom: 2px;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.form-group select[multiple] option:checked {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.submit-button-container {
    text-align: center;
    margin-top: var(--space-lg);
}

#generate-button {
    padding: var(--space-sm) var(--space-lg);
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--space-sm);
    cursor: pointer;
    transition: background 0.2s;
    font-size: var(--font-size-base);
}

#generate-button:hover {
    background: var(--primary-light);
}

/* ----------------------------------------------------
   Responsive Breakpoints
---------------------------------------------------- */
@media (max-width: 1400px) {
    .container {
        grid-template-columns: 240px 1fr; /* Two columns on medium screens */
        gap: var(--space-sm);
        padding: var(--space-sm);
    }

    .sidebar {
        height: calc(100vh - 2 * var(--space-sm));
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Single column on small screens */
    }

    .sidebar {
        display: none; /* Hide sidebar */
    }

    .header {
        flex-direction: column; /* Stack header elements vertically */
        gap: var(--space-md);
        padding: var(--space-sm);
    }

    .search {
        width: 100%; /* Full width search bar */
    }
}

/* ----------------------------------------------------
   Helper Classes
---------------------------------------------------- */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Screen Reader Only - for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ----------------------------------------------------
   Itinerary Page Styles
---------------------------------------------------- */
.itinerary-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.itinerary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-md);
}

.itinerary-header h1 {
    font-size: var(--font-size-h1);
    color: var(--text-color);
}

.itinerary-header p {
    color: var(--text-muted);
}

.itinerary-actions .action-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    cursor: pointer;
    transition: background 0.2s;
    font-size: var(--font-size-base);
    margin-left: var(--space-md);
}

.itinerary-actions .action-btn:hover {
    background: var(--primary-dark);
}

.itinerary-introduction {
    font-size: var(--font-size-base);
    color: var(--text-color);
}

.itinerary-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.itinerary-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    transition: background 0.2s, transform 0.3s;
}

/* Update the hover state to be conditional based on theme */
.itinerary-item:hover {
    transform: translateY(-2px);
}

/* Dark theme hover */
[data-theme="dark"] .itinerary-item:hover {
    background: var(--yellow-dark);
}

[data-theme="dark"] .itinerary-item:hover .item-title,
[data-theme="dark"] .itinerary-item:hover .item-time,
[data-theme="dark"] .itinerary-item:hover .drag-handle {
    color: var(--white);
}

/* Light theme hover */
[data-theme="light"] .itinerary-item:hover {
    background: var(--secondary-light);
}

[data-theme="light"] .itinerary-item:hover .item-title {
    color: var(--gray-900);
}

[data-theme="light"] .itinerary-item:hover .item-time,
[data-theme="light"] .itinerary-item:hover .drag-handle {
    color: var(--gray-800);
}

.itinerary-item.expanded .item-details {
    display: block;
}

.itinerary-item .item-header {
    display: flex;
    align-items: center; /* Align items vertically */
    justify-content: flex-start; /* Align items horizontally to the left */
    gap: var(--space-sm); /* Add spacing between child elements */
    padding: var(--space-sm);
    cursor: pointer;
}

.itinerary-item .drag-handle {
    flex-shrink: 0; /* Prevent resizing */
    margin-right: var(--space-sm); /* Add space to the right of the drag handle */
    color: var(--text-muted);
}

.itinerary-item .item-time {
    flex-shrink: 0; /* Prevent resizing */
    margin-right: var(--space-sm); /* Add space to the right of the time */
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

.itinerary-item .item-title {
    flex: 1; /* Allow the title to take up remaining space */
    font-size: var(--font-size-base);
    color: var(--text-color);
    font-weight: var(--font-weight-medium);
    text-align: left; /* Ensure text is aligned to the left */
}

.itinerary-item .item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.itinerary-item .item-actions .expand-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.itinerary-item .item-details {
    display: none;
    padding: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.itinerary-item .detail {
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-small);
}

.itinerary-item .detail-key {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.itinerary-item .detail-value {
    color: var(--text-color);
}

.itinerary-ending {
    font-size: var(--font-size-base);
    color: var(--text-color);
    margin-top: var(--space-md);
}

.traveler-details {
    margin-top: var(--space-lg);
}

.traveler-details h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--space-md);
}

.traveler-details .details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.traveler-details .details-list li {
    display: flex;
    margin-bottom: var(--space-xs);
}

.traveler-details .detail-key {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    width: 150px;
}

.traveler-details .detail-value {
    color: var(--text-color);
}

.map-view {
    margin-top: var(--space-lg);
}

/* 
   UPDATED: Removed background-color to allow 
   Google Maps roads and tiles to appear properly 
*/
#googleMap {
    width: 100%;
    height: 400px;
    /* background-color: var(--bg-card); */
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
}

.route-summary {
    margin-bottom: var(--space-md);
}

.route-details {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-sm);
}

.directions {
    margin-top: var(--space-lg);
}

.directions-list {
    margin-top: var(--space-md);
    padding-left: var(--space-xl);
}

.directions-list li {
    margin-bottom: var(--space-sm);
    color: var(--text-color);
}

.general-info,
.weather-forecast,
.country-info {
    margin-bottom: var(--space-lg);
}

.general-info h3,
.weather-forecast h3,
.country-info h3 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-md);
}

.general-info p,
.weather-forecast p,
.country-info p {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
}

.country-flag {
    width: 100%;
    max-width: 150px;
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
}

/* ----------------------------------------------------
   Drag Handle Styling
---------------------------------------------------- */
.drag-handle {
    flex-shrink: 0; /* Prevent the drag handle from resizing */
    margin-right: var(--space-sm); /* Add spacing between the drag handle and the next element */
    color: var(--text-muted);
    display: flex;
    align-items: center; /* Center the icon vertically */
    justify-content: center; /* Center the icon horizontally */
}


.drag-handle i {
    font-size: var(--font-size-base);
}

/* ----------------------------------------------------
   Expanded Button Styling
---------------------------------------------------- */
.item-actions .expand-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.item-actions .expand-btn:hover {
    color: var(--primary);
}

.item-actions .expand-btn i {
    font-size: var(--font-size-base);
}

/* When item is expanded, change the icon */
.itinerary-item.expanded .expand-btn i {
    transform: rotate(180deg);
}





/* review section styles */
.directions-list li {
    margin-bottom: var(--space-sm);
    color: var(--text-color);
}

.review-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.reviewer-name {
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
}

.review-rating {
    color: var(--secondary);
}

.review-rating .fa-star.rated {
    color: var(--secondary);
}

.review-rating .fa-star:not(.rated) {
    color: var(--text-muted);
}

.review-content {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.attributions {
    margin-top: var(--space-lg);
    font-size: var(--font-size-small);
    color: var(--text-muted);
}

/* ----------------------------------------------------
   Destination Image Container
   UPDATED: to match the Google Map sizing and style
---------------------------------------------------- */
.destination-image-container {
    width: 100%;
    height: 400px; /* Match #googleMap height */
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    margin: var(--space-lg) 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.destination-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.destination-image-container img:hover {
    transform: scale(1.02);
}

/* --------------------------------------
   Tabs & Tab-Content
-------------------------------------- */

/* Tab container (already styled as .tabs in your code) */
.tabs {
    display: flex;
    gap: var(--space-md);
    /* Optional extra styling:
    margin-bottom: var(--space-md);
    */
}

/* Individual tab buttons */
.tab {
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--space-xl);
    transition: all 0.2s ease;
    border: none;
    background: none;
    font-size: var(--font-size-base);
}

.tab:hover {
    color: var(--text-color);
    background-color: rgba(19, 18, 174, 0.1);
}

.tab.active {
    background-color: var(--secondary);
    color: var(--black);
    font-weight: var(--font-weight-medium);
}

/* Tab content sections */
.tab-content {
    display: none;               /* Hide by default */
    padding: var(--space-md);    /* Optional spacing inside the section */
}

.tab-content.active {
    display: block;             /* Show when active */
}

.item-actions .regenerate-btn {
    background-color: var(--info);
    color: var(--white);
    font-size: var(--font-size-small);
    padding: var(--space-xxs) var(--space-sm);
    margin-left: var(--space-xs);
    border-radius: var(--space-xs);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.item-actions .regenerate-btn:hover {
    background-color: var(--info-dark); /* Define a darker shade in :root */
}

/* Define new color variable for info-dark */
:root {
    --info-dark: #117a8b; /* Adjust based on your color scheme */
}

/* ----------------------------------------------------
   Itinerary Item Photo Styling
---------------------------------------------------- */
.activity-photo {
    width: 100%;
    max-width: 200px; /* Adjust as needed */
    height: auto;
    border-radius: var(--space-sm);
    margin-top: var(--space-sm);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.activity-photo:hover {
    transform: scale(1.05);
}

.optimize-btn {
    background-color: var(--info);
    color: var(--white);
    font-size: var(--font-size-small);
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-md);
    border-radius: var(--space-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.optimize-btn:hover {
    background-color: var(--info-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.optimize-btn i {
    font-size: var(--font-size-base);
}

.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;                  /* to center the previewed image */
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8); /* dark backdrop */
    z-index: 9999;                  /* ensure it appears on top */
}

/* Ensure the previewed image is nicely scaled and doesn’t overflow */
#preview-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;  /* optional slight rounding */
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chat-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header .ai-status {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-sender {
    font-weight: 500;
    color: var(--text-primary);
}

.message-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.message-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

.message.ai .message-content {
    background: rgba(19, 18, 174, 0.1);
}

.action-taken {
    margin-top: 8px;
    padding: 8px;
    background: var(--bg-dark);
    border-radius: 6px;
    font-size: 13px;
    color: var(--success);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 6px;
    color: var(--text-primary);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success);
    font-size: 12px;
}

.typing-indicator .dot {
    width: 4px;
    height: 4px;
    background: var(--success);
    border-radius: 50%;
    animation: typing 1s infinite;
}

@keyframes typing {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.ai-response {
    background: rgba(19, 18, 174, 0.1);
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
}

/* Icons in Nav */
.nav-item i {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.htmx-request .htmx-indicator {
    display: block !important;
}
.htmx-request.htmx-indicator {
    display: block !important;
}
.global-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 5px;
}

.info-window {
    padding: 10px;
    max-width: 300px;
}

.info-window h3 {
    margin: 0 0 10px 0;
    color: #1312AE;
}

.info-window p {
    margin: 5px 0;
}

/* Message Styles */
.message {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    align-items: flex-start;
    max-width: 80%;
}

/* User message alignment */
.message.user {
    flex-direction: row-reverse;
    margin-left: auto;
}

/* AI message alignment */
.message.ai {
    margin-right: auto;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message.ai .message-avatar {
    background: var(--primary);
    color: var(--white);
}

.message.user .message-avatar {
    background: var(--secondary);
    color: var(--black);
}

.message-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    padding: var(--space-md);
    max-width: 100%;
}

.message.user .message-content {
    background: rgba(19, 18, 174, 0.1);
}

.message.user .message-header {
    justify-content: flex-end;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-small);
}

.message.user .message-time {
    color: rgba(84, 82, 82, 0.619);
}

/* Input Container Styles */
.chat-input-container {
    padding: var(--space-md);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.input-container {
    display: flex;
    gap: var(--space-md);
}

#enterprise-message-input {
    flex: 1;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-color);
    min-height: 45px;
    resize: none;
    transition: all 0.2s ease;
}

#enterprise-message-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(19, 18, 174, 0.2);
}

.send-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--space-md);
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: background-color 0.2s;
    font-size: var(--font-size-base);
}

.send-button:hover {
    background: var(--primary-light);
}

.send-button i {
    font-size: var(--font-size-base);
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 80vh; /* Full viewport height */
    max-height: 100vh;
    overflow: hidden; /* Prevent double scrollbars */
}

/* Messages Container - This makes it scrollable */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    /* Add smooth scrolling */
    scroll-behavior: smooth;
}

/* Chat Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.header-title h3 {
    margin: 0;
    font-size: 1.6em;
    color: var(--text-color);
}

.ai-status {
    display: flex;
    align-items: center;
    font-size: var(--font-size-base);
    color: var(--success-color);
}

.ai-status i {
    margin-right: var(--space-xs);
}

/* Header Controls */
.header-controls {
    display: flex;
    gap: var(--space-md);
}

.control-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: var(--icon-color);
    transition: color 0.2s, transform 0.2s;
    position: relative;
}

.control-btn::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-card);
    color: var(--text-color);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--space-xs);
    font-size: var(--font-size-small);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, bottom 0.2s;
}

.control-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.control-btn:hover::after {
    opacity: 1;
    bottom: -40px;
}

/* ----------------------------------------------------
   Atlas Platform Base Styles
---------------------------------------------------- */
.atlas-container {
    /* Just a regular container—no max-width or grid columns */
    width: 100%;
    padding: var(--space-lg);
    /* remove or override:
       display: grid;
       grid-template-columns: ...;
       max-width: 1600px;
       margin: 0 auto;
    */
}

.atlas-main {
    width: 100%;
    min-width: 0; /* Prevents content from pushing container wider */
}

/* Header Styles */
.atlas-header {
    background: var(--bg-card);
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-xl);
}

.header-content {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.header-content h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
}

/* Quick Stats Dashboard */
.quick-stats-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 2rem;
    color: var(--secondary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Enhanced Search Form */
.country-select-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.country-input-container {
    position: relative;
}

.country-input-container label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
}

.country-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--space-lg);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

.country-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(19, 18, 174, 0.1);
}

/* Route Map Container and Visual Elements */
.route-map-container {
    position: relative;
    height: 500px;
    border-radius: var(--space-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    margin-bottom: var(--space-xl);
}

.route-map {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.route-endpoints {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.endpoint {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--space-lg);
    backdrop-filter: blur(8px);
}

.endpoint-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.route-line {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.route-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--secondary);
    transform: translateY(-50%);
}

.distance {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--space-lg);
    font-size: var(--font-size-sm);
    backdrop-filter: blur(8px);
    z-index: 1;
}

/* Requirements Dashboard */
.requirements-dashboard {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.status-card {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.visa-badge {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--space-xl);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.visa-badge.visa-required {
    background: var(--visa-required-bg);
    color: var(--visa-required-color);
}

.visa-badge.visa-free {
    background: var(--visa-free-bg);
    color: var(--visa-free-color);
}

.visa-badge.visa-on-arrival {
    background: var(--visa-on-arrival-bg);
    color: var(--visa-on-arrival-color);
}

.visa-badge.e-visa {
    background: var(--e-visa-bg);
    color: var(--e-visa-color);
}

/* Requirements List */
.requirements-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.requirement-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-color);
    border-radius: var(--space-md);
    transition: transform 0.2s ease;
}

.requirement-item:hover {
    transform: translateX(4px);
}

.requirement-item i {
    color: var(--secondary);
    font-size: 1.2rem;
}

.requirement-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.requirement-name {
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
}

.requirement-note {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Enhanced Sidebar */
.atlas-sidebar {
    position: sticky;
    top: var(--space-md);
    height: calc(100vh - var(--atlas-header-height) - 2 * var(--space-md));
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.alerts-panel,
.insights-panel,
.ai-assistant {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
}

.ai-assistant {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.assistant-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.assistant-header i {
    color: var(--secondary);
    font-size: 1.2rem;
}

.assistant-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: var(--space-md);
}

.chat-input {
    display: flex;
    gap: var(--space-sm);
}

.chat-input input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--space-lg);
    background: var(--bg-color);
    color: var(--text-color);
}

.chat-input button {
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--space-lg);
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-input button:hover {
    background: var(--primary-light);
}

/* Interactive Elements */
.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--space-lg);
    border: none;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 18, 174, 0.2);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .atlas-container {
        grid-template-columns: 1fr;
    }
    
    .quick-stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .country-select-group {
        grid-template-columns: 1fr;
    }
    
    .requirements-dashboard {
        grid-template-columns: 1fr;
    }
    
    .quick-stats-dashboard {
        grid-template-columns: 1fr;
    }
    
    .atlas-header {
        padding: var(--space-md);
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
}

/* Animation States */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.visa-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    padding: var(--space-sm);
    font-size: var(--font-size-small);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .action-btn:hover {
    background: var(--secondary-light);
    color: var(--black);
}

[data-theme="dark"] .action-btn:hover {
    background: var(--yellow-dark);
    color: var(--white);
}

/* Profile Styles */
/* --- Profile Header Navigation --- */
.profile-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.welcome-message {
    font-size: var(--font-size-h4);
    color: var(--text-color);
}

.profile-actions-top {
    display: flex;
    gap: var(--space-sm);
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--space-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative; /* For notification badge */
}

.header-action-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: var(--white);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: var(--font-size-small);
}

/* --- Profile Container --- */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* --- Profile Header --- */
.profile-header {
    margin-bottom: var(--space-xl);
}

.profile-cover {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    border: 1px solid var(--border-color);
}

.profile-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-color);
    border: 3px solid var(--primary);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-secondary);
}

.change-photo-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.change-photo-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: var(--font-size-h1);
    margin-bottom: var(--space-xs);
    color: var(--text-color);
}

.profile-info .username {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

/* --- Profile Tabs --- */
.profile-tabs {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-md);
}

.profile-tabs .tab {
    background: none;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--font-size-base);
    position: relative;
    transition: all 0.2s ease;
}

.profile-tabs .tab:hover {
    color: var(--text-color);
}

.profile-tabs .tab.active {
    color: var(--primary);
    font-weight: var(--font-weight-medium);
}

.profile-tabs .tab.active::after {
    content: '';
    position: absolute;
    bottom: -13px; /* Adjusted for the border */
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* --- Tab Content --- */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease; /* Added animation */
}

.tab-content.active {
    display: block;
}

/* --- Forms --- */
.profile-form,
.settings-form {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-xl);
    border: 1px solid var(--border-color);
}

.form-section {
    margin-bottom: var(--space-xl);
}

.form-section h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--space-lg);
    color: var(--text-color);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: var(--font-size-base);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(19, 18, 174, 0.1);
}

.form-group input[readonly] {
    background: var(--bg-color);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-color);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    appearance: none; /* Remove default styling */
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.save-btn {
    background: var(--primary);
    color: var(--white);
    padding: var(--space-sm) var(--space-xl);
    border: none;
    border-radius: var(--space-sm);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* --- Travel Stats --- */
.travel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: var(--font-size-small);
}

/* --- Itinerary List --- */
.itinerary-list h2 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-h2);
    color: var(--text-color);
}

.itinerary-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    transition: all 0.2s ease;
}

.itinerary-item:hover {
    background: var(--bg-color); /* Subtle hover effect */
    transform: translateY(-2px);
}

.itinerary-item h3 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
    margin-bottom: var(--space-xs);
}

.itinerary-item p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.shared-indicator {
    background: var(--info);
    color: var(--white);
    padding: var(--space-xxs) var(--space-xs);
    border-radius: var(--space-xs);
    font-size: var(--font-size-small);
}

@media (max-width: 768px) {
    /* On small screens, the layout should be single-column */
    .container {
        display: block;
    }
    .itinerary-container {
        padding: var(--space-md);
    }
    .header {
        position: static;
    }
}

/* --- Profile Overview Panel (Right Sidebar) --- */
.profile-overview-panel {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
}

.profile-overview-panel h3 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.activity-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.stat-item i {
    color: var(--primary);
    font-size: 1.5rem;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
}

.stat-label {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

/* --- Upcoming Trips Panel (Right Sidebar) --- */
.upcoming-trips-panel {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
}

.upcoming-trips-panel h3 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.trips-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.trip-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--space-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    transition: all 0.2s ease;
}

.trip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trip-destination {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-base);
    color: var(--text-color);
}

.trip-dates {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

.trip-actions {
    display: flex;
    justify-content: flex-end;
}

.view-trip-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: var(--font-size-small);
}

.view-trip-btn:hover {
    background: var(--primary-light);
}

.no-trips-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    text-align: center;
    color: var(--text-secondary);
}

.no-trips-message i {
    font-size: 2rem;
    color: var(--primary);
}

.plan-trip-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: var(--font-size-base);
    text-decoration: none; /* Remove underline */
    display: inline-block; /* Allow padding */
}

.plan-trip-btn:hover {
    background: var(--primary-light);
}

/* --- AI Assistant (Right Sidebar) --- */
.ai-assistant {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.assistant-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.assistant-header i {
    color: var(--secondary);
    font-size: 1.2rem;
}

.assistant-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: var(--space-md);
}

.chat-input {
    display: flex;
    gap: var(--space-sm);
}

.chat-input input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--space-lg);
    background: var(--bg-color);
    color: var(--text-color);
}

.chat-input button {
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--space-lg);
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-input button:hover {
    background: var(--primary-light);
}

/* Chat Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.header-title h3 {
    margin: 0;
    font-size: 1.6em;
    color: var(--text-color);
}

.ai-status {
    display: flex;
    align-items: center;
    font-size: var(--font-size-base);
    color: var(--success);
}

.ai-status i {
    margin-right: var(--space-xs);
}

/* Header Controls */
.header-controls {
    display: flex;
    gap: var(--space-md);
}

.control-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: var(--text-color);
    transition: color 0.2s, transform 0.2s;
    position: relative;
}

.control-btn::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-card);
    color: var(--text-color);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--space-xs);
    font-size: var(--font-size-small);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, bottom 0.2s;
}

.control-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.control-btn:hover::after {
    opacity: 1;
    bottom: -40px;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    /* Add smooth scrolling */
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    align-items: flex-start;
    max-width: 80%;
}

/* User message alignment */
.message.user {
    flex-direction: row-reverse;
    margin-left: auto;
}

/* AI message alignment */
.message.ai {
    margin-right: auto;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message.ai .message-avatar {
    background: var(--primary);
    color: var(--white);
}

.message.user .message-avatar {
    background: var(--secondary);
    color: var(--black);
}

.message-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    padding: var(--space-md);
    max-width: 100%;
}

.message.user .message-content {
    background: rgba(19, 18, 174, 0.1);
}

.message.user .message-header {
    justify-content: flex-end;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-small);
}

.message.user .message-time {
    color: rgba(84, 82, 82, 0.619);
}

/* Input Container Styles */
.chat-input-container {
    padding: var(--space-md);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.input-container {
    display: flex;
    gap: var(--space-md);
}

#profile-message-input {
    flex: 1;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-color);
    min-height: 45px;
    resize: none;
    transition: all 0.2s ease;
}

#profile-message-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(19, 18, 174, 0.2);
}

.send-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--space-md);
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: background-color 0.2s;
    font-size: var(--font-size-base);
}

.send-button:hover {
    background: var(--primary-light);
}

.send-button i {
    font-size: var(--font-size-base);
}

/* Quick Actions */
.profile-actions {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--space-md);
}

.action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    padding: var(--space-sm);
    font-size: var(--font-size-small);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .action-btn:hover {
    background: var(--secondary-light);
    color: var(--black);
}

[data-theme="dark"] .action-btn:hover {
    background: var(--yellow-dark);
    color: var(--white);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success);
    font-size: 12px;
    padding: 0 var(--space-md);
}

.typing-indicator .dot {
    width: 4px;
    height: 4px;
    background: var(--success);
    border-radius: 50%;
    animation: typing 1s infinite;
}

@keyframes typing {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-cover {
        flex-direction: column;
        text-align: center;
        padding: var(--space-lg);
    }

    .profile-tabs {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .profile-tabs .tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .travel-stats {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .save-btn {
        width: 100%;
    }

    .header-action-btn {
        padding: var(--space-xs) var(--space-sm);
    }

    .notification-badge {
        top: 0;
        right: 0;
    }
}

/* ----------------------------------------------------------------------------
   Additional Profile Page Enhancements
---------------------------------------------------------------------------- */

/* 1. Enhance the header navigation with a subtle shadow and bolder welcome text */
.profile-header-nav {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);  /* Adds depth */
}
.welcome-message {
    font-weight: var(--font-weight-medium);  /* Makes the greeting stand out */
}

/* 2. Add a soft shadow to the profile cover for a lifted card effect */
.profile-cover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* 3. Smooth transition on the profile avatar border with a hover effect */
.profile-avatar {
    transition: border-color 0.3s ease;
}
.profile-avatar:hover {
    border-color: var(--primary-light);
}

/* ----------------------------------------------------------------------------
   (Optional) You can include these comments in your code to keep track 
   of the custom changes made for the profile page.
---------------------------------------------------------------------------- */
/* static/css/itineraries.css */

/* ----------------------------------------------------
   Itineraries Page Styles
---------------------------------------------------- */

/* Grid container for itinerary cards */
.itineraries-page-container { /* Changed class name */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem; /* Using rem for consistency */
    padding: 1rem; /* Add some padding */
  }
  
  /* Individual itinerary card styling */
  .itinerary-page-card { /* Changed class name */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem; /* Using rem */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .itinerary-page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Photo for each itinerary */
  .itinerary-page-photo { /* Changed class name */
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--gray-300); /* Fallback color */
  }
  
  /* Information area inside the card */
  .itinerary-page-info { /* Changed class name */
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .itinerary-page-title { /* Changed class name */
    font-size: 1.5rem; /* Using rem */
    color: var(--text-color);
    margin-bottom: 0.25rem;
  }
  .itinerary-page-destination { /* Changed class name */
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
  }
  
  /* Button to view the itinerary details */
  .view-itinerary-page-btn { /* Changed class name */
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease;
    display: block; /* Make the button a block element */
    width: 100%; /* Make the button fill the container */
  }
  .view-itinerary-page-btn:hover {
    background: var(--primary-light);
  }
  
  .section-heading {
      margin-top: 2rem;
      margin-bottom: 1rem;
      font-size: 1.75rem;
      color: var(--text-color);
  }
  
  /* Style for the "No trips" message */
  .no-trips {
      padding: 1rem;
      text-align: center;
      color: var(--text-secondary);
  }

  /* Sustainability */
.emission-dashboard {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    margin-top: var(--space-lg);
}

.emissions-summary {
    text-align: center;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--space-lg);
    backdrop-filter: blur(8px);
}

.emission-value {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: var(--space-xs);
}

.emission-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.status-card {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-color);
}

.emissions-map-container {
    border-radius: var(--space-lg);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    min-height: 300px;
}

.breakdown-section {
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--space-lg);
    border: 1px solid var(--border-color);
}

.breakdown-list li {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-list li:last-child {
    border-bottom: none;
}

/* Override flight-input-group to use country-select-group styling */
.flight-input-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
    .flight-input-group {
        grid-template-columns: 1fr;
    }
}

.metric-item {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.05);
}

.metric-item h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.progress-bar {
    margin-top: 0.5rem;
    height: 4px;
    background-color: #E5E7EB;
    border-radius: 2px;
}

.progress-bar .progress {
    height: 100%;
    background-color: #10B981;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.tech-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.tech-item:last-child {
    border-bottom: none;
}

.tech-label {
    color: #374151;
    font-weight: 500;
}

.tech-value {
    color: #059669;
    font-weight: 600;
}

.alert-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border-bottom: 1px solid #E5E7EB;
    transition: background-color 0.2s ease;
}

.alert-item:hover {
    background-color: #F3F4F6;
}

.alert-title {
    font-weight: 600;
    color: #111827;
}

.alert-desc {
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

/* Add to your existing styles */
.results-container {
    background: var(--bg-card);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    margin-top: var(--space-lg);
}

.emissions-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.status-header h3 {
    font-size: var(--font-size-h3);
    color: var(--text-color);
    margin: 0;
}

.total-emissions {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-color);
    border-radius: var(--space-lg);
    margin: var(--space-lg) 0;
}

.emission-value-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.emission-value {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
}

.emission-label {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.breakdown-section {
    background: var(--bg-color);
    border-radius: var(--space-lg);
    padding: var(--space-lg);
}

.breakdown-section h4 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-color);
}

.breakdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.breakdown-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
}

.breakdown-list li:last-child {
    border-bottom: none;
}

.emission-badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--space-sm);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
}

.emission-badge.low {
    background: #34D399;
    color: #064E3B;
}

.emission-badge.medium {
    background: #FBBF24;
    color: #92400E;
}

.emission-badge.high {
    background: #EF4444;
    color: #7F1D1D;
}

.new-search-btn-container {
    text-align: center;
    margin-top: var(--space-xl);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Add to your existing styles */
.breakdown-list li {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-list li:last-child {
    border-bottom: none;
}

.emission-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.emission-label {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

.status-header {
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Profile Card (VERY IMPORTANT) --- */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* Subtle shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  /* --- Pill-Style Tabs --- */
  .profile-tabs .tab {
    background: none;
    border: 1px solid var(--border-color); /* Add a subtle border */
    border-radius: var(--space-xl);        /* Make them pill-shaped */
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: all 0.2s ease;
    margin-bottom: -1px; /* Tabs "above" the card */
  }
  
  .profile-tabs .tab:hover {
    background-color: rgba(19, 18, 174, 0.1); /* or var(--secondary-light) */
    color: var(--text-color);
  }
  
  .profile-tabs .tab.active {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: var(--font-weight-medium);
  }
  
  /* --- Two-Column Form Layout --- */
  .form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
  
  @media (max-width: 768px) {
    .form-group-row {
      grid-template-columns: 1fr; /* Single column on small screens */
    }
  }
  
  /* --- Gradient Button Style (for Save buttons) --- */
  .save-btn {
    /* Gradient style - similar to "Compute Emissions" */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--space-md);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .save-btn:hover {
    background: var(--primary-light); /* Or a slightly lighter gradient */
    transform: translateY(-2px);
  }
  
  /* --- Profile Header (Dashboard Style) --- */
  .profile-header {
    /* Removed padding and border-radius if you want it flush */
    margin-bottom: var(--space-xl);
  }
  
  .profile-header h1 {
    font-size: var(--font-size-h1);
      background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
  }
  
  /* Quick Stats Dashboard */
  .profile-stats-dashboard {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-lg);
      margin-bottom: var(--space-xl);
  }

  /* --- Profile Avatar Section (Option 1) --- */
.profile-avatar-section {
    display: flex;
    align-items: center; /* Vertically center avatar and info */
    gap: var(--space-lg); /* Spacing between avatar and info */
    margin-bottom: var(--space-xl); /* Space below the section */
    /* Optional: Add a background/border if you want it to stand out */
    /* background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-lg);
    padding: var(--space-lg); */
  }
  
  /* (The existing .profile-avatar, .change-photo-btn, etc. styles still apply) */
  
  .profile-info {
      text-align: left; /* Align text to the left */
  }
  
  .profile-info h1 {
      font-size: var(--font-size-h1);
      margin-bottom: var(--space-xs);
      color: var(--text-color);
      /* Remove gradient if you don't want it here */
      background: none;
      -webkit-text-fill-color: initial;
  }
  
  .profile-info .username {
      color: var(--text-secondary);
      font-size: var(--font-size-base);
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
      .profile-avatar-section {
          flex-direction: column; /* Stack on small screens */
          text-align: center; /* Center align on small screens */
      }
      .profile-info{
          text-align: center;
      }
  }

  /* --- Initials Avatar Placeholder --- */
.avatar-placeholder.initials {
    font-size: 2rem; /* Adjust size as needed */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary); /* Or any color you like */
    color: var(--white);
    border-radius: 50%; /* Make it circular */
    font-size: var(--font-size-h2);
}

/* Transition for smooth collapse */
.sidebar {
  width: 240px;
  transition: width 0.3s ease;
}

/* Collapsed sidebar: reduce width and hide text if desired */
.sidebar.collapsed {
  width: 60px;
}

/* Optionally, adjust inner elements when collapsed */
.sidebar.collapsed .logo-container {
  text-align: center;
}
.sidebar.collapsed .logo {
  max-height: 30px; /* smaller logo */
}
.sidebar.collapsed .nav-title,
.sidebar.collapsed .nav-item span {
  display: none;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: var(--space-sm);
}

/* Update container grid when sidebar is collapsed */
.container {
  grid-template-columns: 240px 1fr 360px;
  transition: grid-template-columns 0.3s ease;
}
.container.sidebar-collapsed {
  grid-template-columns: 60px 1fr 360px;
}
  
  /* Theme Toggle Button */
  .theme-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    gap: 5px;
    transition: background 0.3s ease;
  }
  
  .theme-toggle:hover {
    background: var(--primary-dark);
  }
  
  .theme-toggle i {
    font-size: 18px;
  }
  
/* loading indicator for pro.html */
    #loading-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(19, 18, 174, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* Add transition for smooth appearance */
    transition: backdrop-filter 0.3s ease-in-out, background-color 0.3s ease-in-out;
    }

    #loading-indicator.htmx-request {
        display: flex !important;
    }

    .loading-message {
        color: #9a7f0b;
        font-size: 1.2rem;
        margin-top: 2rem;
        text-align: center;
    }

    /* Animation styles */
    .ip {
        width: 16em;
        height: 8em;
    }

    .ip__track {
        stroke: rgba(19, 18, 174, 0.2);
    }

    .ip__worm1 {
        animation: worm1 2s linear infinite;
    }

    .ip__worm2 {
        animation: worm2 2s linear infinite;
    }

    /* Define gradients for the worms using company colors */
    #grad1 stop:nth-child(1) { stop-color: #1312AE; }
    #grad1 stop:nth-child(2) { stop-color: #3534b7; }
    #grad1 stop:nth-child(3) { stop-color: #f8cc19; }
    #grad1 stop:nth-child(4) { stop-color: #1312AE; }

    #grad2 stop:nth-child(1) { stop-color: #1312AE; }
    #grad2 stop:nth-child(2) { stop-color: #f8cc19; }
    #grad2 stop:nth-child(3) { stop-color: #3534b7; }
    #grad2 stop:nth-child(4) { stop-color: #1312AE; }

    @keyframes worm1 {
        from {
            stroke-dashoffset: 0;
        }
        50% {
            stroke-dashoffset: -358;
        }
        50.01% {
            stroke-dashoffset: 358;
        }
        to {
            stroke-dashoffset: 0;
        }
    }

    @keyframes worm2 {
        from {
            stroke-dashoffset: 358;
        }
        50% {
            stroke-dashoffset: 0;
        }
        to {
            stroke-dashoffset: -358;
        }
    }

/* --- Profile Page Specific Styles --- */

/* Input groups for add/remove functionality */
.security-question-group,
.benefit-input-group,
.reminder-input-group {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
    align-items: center; /* Vertically align items */
}

.security-question-group input,
.benefit-input-group input,
.reminder-input-group input {
    flex: 1; /* Allow inputs to grow */
    min-width: 0; /* Prevent overflow issues */
}

.security-question-group button,
.benefit-input-group button,
.reminder-input-group button {
    background-color: var(--danger);
    color: var(--white);
    border: none;
    border-radius: var(--space-xs);
    padding: var(--space-xxs) var(--space-xs);
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap; /* Prevent text wrapping */
}

.security-question-group button:hover,
.benefit-input-group button:hover,
.reminder-input-group button:hover {
    background-color: var(--danger-dark); /* You might need to define this */
}

/* Transport options (checkboxes with icons) */
.transport-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.transport-option {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.transport-option input[type="checkbox"] {
    margin: 0; /* Remove default margin */
    appearance: none;
    width: 1.2em;
    height: 1.2em;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.transport-option input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.transport-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8em;
}

.transport-option label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

/* Checkbox items (for route and accommodation preferences) */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.checkbox-item input[type="checkbox"] {
    margin: 0; /* Remove default margin */
    appearance: none;
    width: 1.2em;
    height: 1.2em;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
     transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked {
      background: var(--primary);
    border-color: var(--primary);
}
.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8em;
}

.checkbox-item label {
    cursor: pointer;
}

/* Emergency Contact - arrange in a row */
.emergency-contact-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.action-btn.favorited {
    background-color: #ff4081;
    color: white;
    cursor: default;
  }

/* ----------------------------------------------------
   Right Sidebar - Base & Collapsible
---------------------------------------------------- */
.right-sidebar {
    /* Adjust the width as desired (e.g., 300px, 320px) */
    width: 360px;
    background-color: var(--bg-card);
    padding: var(--space-sm);
    border-left: 1px solid var(--border-color);
    position: sticky;
    top: var(--space-sm);
    height: calc(100vh - 2 * var(--space-sm));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition: width 0.3s ease, opacity 0.3s ease;
}

/* Collapsed state */
.right-sidebar.collapsed {
    width: 60px;
    opacity: 0.9; /* Slight transparency */
}

/* Hide text when collapsed */
.right-sidebar.collapsed h3,
.right-sidebar.collapsed p,
.right-sidebar.collapsed ul {
    display: none;
}

/* Right Sidebar Toggle Button */
.right-sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}

/* ----------------------------------------------------
   Right Sidebar - Sections & Typography
---------------------------------------------------- */
.right-sidebar section {
    margin-bottom: var(--space-lg);
}

.right-sidebar h3 {
    font-size: var(--font-size-h3);
    margin-bottom: var(--space-md);
}

.right-sidebar p {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
}

.right-sidebar a {
    color: var(--primary);
    text-decoration: none;
}

.right-sidebar a:hover {
    text-decoration: underline;
}

.right-sidebar img {
    border-radius: var(--space-sm);
}

/* ----------------------------------------------------
   Sidebar Profile Block (Top of Right Sidebar)
   (Renamed from .profile-container to avoid conflicts)
---------------------------------------------------- */
.sidebar-profile-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--space-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);

    /* Display avatar + info in a row */
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Avatar (round image) */
.sidebar-profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden; /* Crop image in a circle */
}
.sidebar-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile text info */
.sidebar-profile-info h4 {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-color);
}
.sidebar-profile-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-small);
    margin-bottom: var(--space-xs);
}
.sidebar-profile-info a {
    color: var(--primary);
    font-size: var(--font-size-small);
    text-decoration: none;
    transition: color 0.2s ease;
}
.sidebar-profile-info a:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

/* ----------------------------------------------------
   Itinerary Suggestions / Recent Searches
---------------------------------------------------- */
.itinerary-suggestions,
.recent-searches {
    margin-bottom: var(--space-lg);
}

.itinerary-list,
.search-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.itinerary-item,
.search-item {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    border-radius: var(--space-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.itinerary-item:hover,
.search-item:hover {
    background-color: rgba(174, 153, 18, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.itinerary-image {
    width: 80px;
    height: 80px;
    border-radius: var(--space-md);
    overflow: hidden;
    margin-right: var(--space-md);
}
.itinerary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.itinerary-info,
.search-details {
    flex: 1;
}

.itinerary-title,
.search-query {
    font-size: var(--font-size-h5);
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.itinerary-details,
.search-date {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.itinerary-actions,
.search-again-btn {
    display: flex;
    gap: var(--space-sm);
}

.view-itinerary-btn,
.customize-itinerary-btn,
.search-again-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-small);
}

.view-itinerary-btn:hover,
.customize-itinerary-btn:hover,
.search-again-btn:hover {
    background: var(--primary-light);
}

/* ----------------------------------------------------
   Responsive Adjustments
---------------------------------------------------- */
@media (max-width: 1400px) {
    /* If you want to hide or alter the right sidebar on medium screens,
       or adjust your main container layout, do so here. */
}

@media (max-width: 768px) {
    /* On small screens, the layout might become single-column.
       Adjust .container or other elements if needed. */
    .container {
        display: block;
    }
    .header {
        position: static;
    }
}

.fa-duotone {
    --fa-primary-color: #1312AE;
    --fa-secondary-color: #FAD642;
    --fa-secondary-opacity: 1;
  }

/* ----------------------------------------------------
Atlas Platform Base Styles
---------------------------------------------------- */
.atlas-container {
    width: 100%;
    padding: var(--space-lg);
  }
  
  .atlas-main {
    width: 100%;
    min-width: 0; /* Prevents content from pushing container wider */
  }
  
  /* Header Styles */
  .header-content {
    text-align: center;
    margin-bottom: var(--space-lg);
  }
  
  .header-content h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
  }
  
  .header-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
  }
  
  /* ---  Create New Route Card --- */
  
  .travel-query-card {
      background: var(--bg-card);
      border-radius: var(--space-lg);
      padding: var(--space-lg);
      border: 1px solid var(--border-color);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
      margin-bottom: var(--space-xl); /* Space between cards */
  }
  
  
  .travel-query-card h2 {
      font-size: var(--font-size-h2);
      color: var(--text-color);
      margin-bottom: var(--space-lg);
      display: flex;  /* Use flexbox for icon alignment */
      align-items: center; /* Center the icon vertically */
      gap: var(--space-sm); /* Space between icon and text */
  }
  
  .query-form {
      display: flex;
      flex-direction: column;
      gap: var(--space-md);
  }
  
  .input-group {
      display: flex;
      flex-direction: column;
  }
  
  .input-group label {
      display: flex;
      align-items: center;
      gap: var(--space-xs);
      color: var(--text-secondary);
      margin-bottom: var(--space-xs);
      font-weight: var(--font-weight-medium); /* Make labels a bit bolder */
  }
  
  .input-group input[type="text"],
  .input-group textarea {
      width: 100%;
      padding: var(--space-sm) var(--space-md);
      border: 1px solid var(--border-color);
      border-radius: var(--space-md); /* Slightly rounder corners */
      background: var(--bg-color);
      color: var(--text-color);
      font-size: var(--font-size-base);
      transition: all 0.3s ease;
  }
  
  .input-group input[type="text"]:focus,
  .input-group textarea:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 4px rgba(19, 18, 174, 0.1);
      outline: none; /* Remove default focus outline */
  }
  
  .requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: var(--space-md);
  }
  
  
  .form-actions {
      display: flex;
      justify-content: flex-start; /* Align buttons to the left */
      gap: var(--space-md);
      margin-top: var(--space-md);
  }
  
  .primary-btn,
  .secondary-btn {
      padding: var(--space-sm) var(--space-md);
      border-radius: var(--space-md);
      border: none;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: var(--space-xs);
      font-weight: var(--font-weight-medium); /* Make buttons a bit bolder */
  }
  .primary-btn {
      background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      color: white;
  }
  .primary-btn:hover{
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(19, 18, 174, 0.2);
  }
  
  .secondary-btn {
      background: var(--bg-color);
      color: var(--text-color);
      border: 1px solid var(--border-color); /* Add a border */
  }
  
  .secondary-btn:hover {
      background: var(--primary-light);
       color: var(--white);
  }
  /* --- Current Routes List --- */
  .requirements-dashboard {
      background: var(--bg-card);
      border-radius: var(--space-lg);
      padding: var(--space-lg);
      border: 1px solid var(--border-color);
       box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  .requirements-dashboard h2{
      font-size: var(--font-size-h2);
      color: var(--text-color);
      margin-bottom: var(--space-lg);
      display: flex;  /* Use flexbox for icon alignment */
      align-items: center; /* Center the icon vertically */
      gap: var(--space-sm); /* Space between icon and text */
  }
  
  #routes-list{
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: var(--space-md);
  }
  
  /* Loading Indicator */
  #loading-indicator {
  display: none; /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000; /* Ensure it's on top */
  color: var(--text-color);
  }
  
  .dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  margin: 0 5px;
  animation: bounce 1.4s infinite both;
  }
  
  .dot:nth-child(2) {
  animation-delay: 0.2s;
  }
  
  .dot:nth-child(3) {
  animation-delay: 0.4s;
  }
  
  @keyframes bounce {
    0%, 80%, 100% {
      transform: scale(0);
    } 40% {
      transform: scale(1);
    }
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
      .atlas-container {
          padding: var(--space-md);
      }
      .header-content h1{
          font-size: 2rem;
      }
      .requirements-grid, #routes-list{
          grid-template-columns: 1fr;
      }
  
  }

  .requirement-section.route-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.route-meta {
    display: flex;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.route-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.detail-item i {
    color: var(--primary);
}

.ai-context {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem;
}

.ai-context summary {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ai-context .context-content {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.ai-context pre {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.5;
}

.route-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--background);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--accent);
}

.action-btn i {
    font-size: 1rem;
}
/* Styles for the right sidebar */
.atlas-sidebar {
    width: 340px; /* Adjust as needed */
    padding: 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.atlas-sidebar h3 {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.atlas-sidebar p {
    font-size: 0.9rem;
    color: var(--muted);
}

.sidebar-section {
    margin-bottom: 1.5rem;
}