/* --- 1. General Setup & Variables --- */
:root {
    --primary-color: #0052D4;
    --secondary-color: #4364F7;
    --accent-color: #6FB1FC;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --white-color: #ffffff;
    --body-bg: #f4f7fc;
    /* Dynamic viewport and spacing variables */
    --vh: 1vh;
    --dynamic-bottom-space: 5vh;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Prevent body scroll when chat is maximized */
body.chat-maximized {
    overflow: hidden;
    height: 100vh;
}

/* --- 2. Spinner (minor tweak) --- */
.spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1060;
    display: none;
    /* Initially hidden */
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
}

/* The rest of the spinner styles are fine */
.spinner-content .logo {
    display: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid var(--primary-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* --- 3. Header & Navigation --- */
.app-header {
    background: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.locale-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.locale-selector-wrapper .form-control-sm {
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--text-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 5px;
    /* Adjust if needed */
}

/* --- 4. Hero Section --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 15px 40px 15px;
    /* Reduced bottom padding */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-color);
    flex-shrink: 0;
    /* Don't allow hero to shrink */
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 600px;
    margin: 1rem auto 0;
    opacity: 0.9;
}

/* --- 5. Call-to-Action Button --- */
.btn-cta {
    background-color: var(--white-color);
    color: var(--primary-color);
    border: 2px solid var(--white-color);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    background-color: transparent;
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}


@media (min-width: 1200px) {
    .modal-dialog.modal-xl {
        max-width: 1400px;
        /* Custom max-width for very large screens */
    }
}

.modal-header {
    background-color: var(--light-gray);
    border-bottom: 2px solid #e9ecef;
}

.modal-title {
    font-weight: 600;
    color: var(--primary-color);
}

.modal-control-group {
    display: flex;
    flex-direction: column;
}

#cityDropdown {
    max-height: 300px;
    /* Adjust this value as needed */
    overflow-y: auto;
    /* Show scrollbar only when needed */
}

.modal-control-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 4px;
}

.modal-control-group .form-control,
.modal-control-group .btn {
    min-width: 200px;
    /* Ensure controls have a decent width */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#countryFilter {
    width: 180px;
    /* Adjust this value as needed */
}

.price-label-tooltip {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    padding: 6px 10px;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}


/* --- 7. Footer --- */
.app-footer {
    background-color: var(--white-color);
    font-size: 0.9rem;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

/* --- 8. Echo Chat Widget Styles --- */

/* --- 1. to 7. ... Your existing styles remain the same ... --- */

/* ======================================================= */
/* --- 8. In-Page Chat Section Styles --- */
/* ======================================================= */

.chat-section {
    padding: 0 0 0 0;
    background-color: var(--white-color);
    border-top: 1px solid #e9ecef;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Allow flex child to shrink */
}

.chat-section .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Allow flex child to shrink */
}

.section-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 1.8rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

.chat-interface-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    background-color: var(--white-color);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    /* Allow flex child to shrink */
}

.chat-messages {
    flex-grow: 1;
    padding: 5px;
    background-color: var(--body-bg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 400px;
    /* Minimum height for better UX */
    max-height: calc(100vh - 400px);
    /* Prevent exceeding viewport */
}

.message {
    padding: 5px 7px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
    word-wrap: break-word;
}

/* ADDED this style for better formatting of the welcome message */
.message.bot #initial-chat-message {
    text-align: left;
    display: inline-block;
}

.message.bot {
    max-width: 100%;
    background-color: #e9ecef;
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    font-size: 15px;
    text-align: justify;
}

.message.user {
    max-width: 80%;
    background-color: var(--primary-color);
    color: var(--white-color);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-size: 15px;
}

.chat-input-area {
    display: flex;
    align-items: flex-end;
    padding: 10px;
    border-top: 1px solid #dee2e6;
    background-color: var(--white-color);
}

.input-with-voice {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
}

#chat-input {
    flex-grow: 1;
    border: none;
    padding: 10px 45px 10px 10px;
    /* Add right padding for send button */
    background-color: transparent;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    resize: none;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s ease;
}

#chat-input:focus {
    border-color: var(--primary-color);
}

.voice-input-btn {
    background-color: #f1f1f1;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    flex-shrink: 0;
}

.voice-input-btn:hover {
    background-color: #e0e0e0;
    color: var(--primary-color);
    transform: scale(1.05);
}

.voice-input-btn.recording {
    color: #dc3545;
    animation: pulse 1.5s infinite;
}

.voice-input-btn.processing {
    color: var(--primary-color);
}

.voice-input-btn.processing i {
    animation: spin 1s linear infinite;
}

.date-picker-btn {
    background-color: #f1f1f1;
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    flex-shrink: 0;
}

.date-picker-btn:hover {
    background-color: #e0e0e0;
    color: var(--primary-color);
    transform: scale(1.05);
}

.date-picker-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 82, 212, 0.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

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

    100% {
        transform: rotate(360deg);
    }
}

.send-chat-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: var(--white-color);
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 82, 212, 0.3);
}

.send-chat-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-50%);
    box-shadow: 0 4px 8px rgba(0, 82, 212, 0.4);
}

.send-chat-btn:active {
    transform: translateY(-50%);
    box-shadow: 0 2px 4px rgba(0, 82, 212, 0.3);
}

.price-label-popup .leaflet-popup-content-wrapper {
    /* Semi-transparent white background */
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.price-label-popup .leaflet-popup-content {
    /* Reduce padding and font size to make it smaller */
    font-size: 9px;
    line-height: 1.4;
    padding: 5px 8px;
    margin: 0;
}

.price-label-popup .leaflet-popup-tip {
    /* Make the little pointer transparent too */
    background: rgba(255, 255, 255, 0.85);
}

.price-label-popup a.leaflet-popup-close-button {
    /* Slightly adjust close button for the smaller size */
    top: 5px;
    right: 5px;
}

.flight-summary-table {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    padding: 1rem;
    text-align: left;
    /* Override parent's justify-align */
    font-size: 0.9rem;
}

.flight-summary-table h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.flight-summary-table p {
    text-align: left;
    /* Ensure paragraphs inside the table are left-aligned */
}

.flight-summary-table .table {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.flight-summary-table .table th,
.flight-summary-table .table td {
    vertical-align: middle;
}

.flight-summary-table .summary-footer {
    font-size: 0.8rem;
    font-style: italic;
    color: #6c757d;
    margin-bottom: 0;
    text-align: center;
}

/* This is the key for making the table responsive */
.flight-summary-table .table-container {
    overflow-x: auto;
    /* Enables horizontal scrolling */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

#origin-search-results {
    position: absolute;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: .25rem;
    z-index: 1050;
    width: 250px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}

#origin-search-results .list-group-item {
    cursor: pointer;
    font-size: 0.9em;
    word-wrap: break-word;
    white-space: normal;
}

#origin-search-results .list-group-item:hover {
    background-color: #f0f0f0;
}

/* Destination search results styling */
#destination-search-results {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}

#destination-search-results .list-group-item {
    cursor: pointer;
    font-size: 0.9em;
    border: none;
    border-bottom: 1px solid #eee;
    word-wrap: break-word;
    white-space: normal;
}

#destination-search-results .list-group-item:hover {
    background-color: #f0f0f0;
}

#destination-search-results .list-group-item:last-child {
    border-bottom: none;
}

#destination-search-results .list-group-item.disabled {
    cursor: default;
    background-color: #f8f9fa;
}

/* --- NEW STYLES FOR CLICKABLE CONTROLS --- */

/* Style for the locale/currency dropdown */
#locale-select {
    cursor: pointer;
    transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

#locale-select:hover {
    border-color: #007bff;
    /* Highlight border on hover */
}

/* Style for the detected origin city "chip" */
#location-indicator {
    border: 1px solid #ced4da;
    /* Default border like a form input */
    padding: 0.25rem 0.5rem;
    /* Add some padding */
    border-radius: 0.2rem;
    /* Slightly rounded corners */
    background-color: #e9ecef;
    /* A light grey background */
    transition: all 0.2s ease-in-out;
}

#location-indicator:hover {
    border-color: #007bff;
    background-color: #dee2e6;
    /* Darken background on hover */
}

/* Hide the pencil icon by default */
#location-indicator .fa-pencil {
    display: none;
    font-size: 0.8em;
    color: #6c757d;
    /* Muted color for the icon */
}

/* Show the pencil icon when hovering over the location indicator */
#location-indicator:hover .fa-pencil {
    display: inline-block;
}

/* Hide the city code when hovering to make space for the pencil */
#location-indicator:hover #detected-city-name {
    display: none;
}

/* --- Responsive Design for Chat Section --- */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 15px 20px 15px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .chat-section .container {
        padding-left: 5px;
        padding-right: 5px;
        max-width: none;
    }

    .chat-interface-container {
        margin: 0;
        border-radius: 0;
        max-width: none;
        width: 100%;
    }

    .chat-messages {
        min-height: 300px;
        max-height: calc(100vh - 350px);
    }

    .section-title {
        font-size: 1.5rem;
        margin: 0 15px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin: 0 15px 1.5rem 15px;
    }
}

@media (max-width: 480px) {
    .chat-section .container {
        padding-left: 5px;
        padding-right: 5px;
        max-width: none;
    }

    .chat-interface-container {
        margin: 0;
        border-radius: 0;
        max-width: none;
        width: 100%;
    }

    .chat-messages {
        min-height: 250px;
        max-height: calc(100vh - 300px);
    }

    .hero-section {
        padding: 30px 15px 15px 15px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        margin: 0 15px;
    }

    .section-subtitle {
        margin: 0 15px 1.5rem 15px;
    }
}

/* Extra adjustments for small mobile screens */
@media (max-width: 480px) {
    .chat-section.maximized .chat-content {
        /* Even more bottom padding on very small screens */
        padding-bottom: 100px;
        /* Adjust height further for small screens */
        height: calc(100vh - 160px);
    }
}

/* --- Bot Options Styling --- */
.bot-options {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bot-options .btn {
    border-radius: 20px;
    font-size: 13px;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.round-trip-toggle-btn {
    position: relative;
    overflow: hidden;
}

.round-trip-toggle-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.round-trip-toggle-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments for bot options */
@media (max-width: 576px) {
    .bot-options {
        flex-direction: column;
        align-items: stretch;
    }

    .bot-options .btn {
        width: 100%;
        margin-bottom: 4px;
    }
}

/* Date Picker Modal Styles */
#datePickerModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#datePickerModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 20px;
}

#datePickerModal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#datePickerModal .close {
    color: white;
    opacity: 0.8;
    text-shadow: none;
    font-size: 1.5rem;
}

#datePickerModal .close:hover {
    opacity: 1;
}

#datePickerModal .modal-body {
    padding: 25px;
}

#datePickerModal .form-group {
    margin-bottom: 20px;
}

#datePickerModal .form-group label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
    display: block;
}

#datePickerModal .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.2s ease;
}

#datePickerModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 82, 212, 0.25);
}

#datePickerModal .form-check {
    padding-left: 0;
    margin-bottom: 15px;
}

#datePickerModal .form-check-input {
    position: relative;
    margin-right: 10px;
    margin-top: 2px;
}

#datePickerModal .form-check-label {
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    margin-bottom: 0;
}

#datePickerModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px 25px;
}

#datePickerModal .btn {
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#datePickerModal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

#datePickerModal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 82, 212, 0.3);
}

#datePickerModal .btn-secondary {
    background-color: #6c757d;
    border: none;
}

#datePickerModal .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Responsive adjustments for date picker modal */
@media (max-width: 576px) {
    #datePickerModal .modal-body {
        padding: 20px;
    }

    #datePickerModal .modal-footer {
        padding: 15px 20px;
    }
}

/* ======================================================= */
/* --- 9. Inline Styles from HTML (Chat Toggle & Forms) --- */
/* ======================================================= */

/* Align checkbox with text vertically - checkbox close to the right of text */
.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-top: 0;
    margin-left: 0.5rem;
    margin-right: 0;
    flex-shrink: 0;
    order: 2;
}

.form-check-label {
    margin-bottom: 0;
    line-height: 1.2;
    order: 1;
}

/* Chat Section Toggle Styles */
.chat-section {
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

.chat-section.minimized {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: 320px;
    max-width: 100%;
    margin: 20px auto 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.chat-section.maximized {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    background: white;
    z-index: 1050;
    border-radius: 0;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.chat-section.maximized .chat-header {
    border-radius: 0;
    padding: 20px;
    flex-shrink: 0;
}

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

.chat-header-logo {
    display: none;
    /* Hidden by default when minimized */
    margin-right: 15px;
}

.chat-section.maximized .chat-header-logo {
    display: block;
    /* Show logo when maximized */
}

.chat-header-text {
    flex: 1;
}

.chat-section.minimized .chat-header-text h2 {
    font-size: 1.1rem;
    margin: 0;
    color: white;
}

.chat-section.minimized .chat-header-text p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
    color: white;
}

.chat-section.maximized .chat-header-text h2 {
    font-size: 1.8rem;
    margin: 0;
    color: white;
}

.chat-section.maximized .chat-header-text p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    color: white;
}

.chat-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chat-content {
    transition: all 0.3s ease;
}

.chat-section.minimized .chat-content {
    max-height: 300px;
    overflow: hidden;
    display: block;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 0 10px 10px;
    padding: 20px;
    text-align: center;
}

.chat-section.maximized .chat-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    /* Subtract header height */
    min-height: 0;
    /* Dynamic padding bottom using CSS environment variables for safe areas */
    /* Also supports JavaScript-driven dynamic spacing */
    padding-bottom: max(env(safe-area-inset-bottom, 0px),
            var(--dynamic-bottom-space, 20px));
}

.chat-section.maximized .container {
    height: 100%;
    max-width: none;
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}


.chat-section.maximized .chat-interface-container {
    height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chat-section.maximized .chat-messages {
    flex: 1;
    max-height: none !important;
    min-height: 0 !important;
    height: auto;
    width: 100%;
    margin: 0;
    overflow-y: auto;
    background-color: #f4f7fc;
    border-radius: 0;
    padding: 15px;
}

.chat-section.maximized .chat-input-area {
    flex-shrink: 0;
    margin: 0;
}

/* Origin Search Styles */
.origin-search-container {
    position: relative;
}

.origin-search-results {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
}

.origin-search-results .list-group-item {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.origin-search-results .list-group-item:hover {
    background-color: #f8f9fa;
}

.origin-search-results .list-group-item:last-child {
    border-bottom: none;
}

/* Location indicator pulse animation for when no origin is set */
@keyframes gentle-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.location-indicator-pulse {
    animation: gentle-pulse 2s infinite;
}

/* No origin hint */
.no-origin-hint {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: gentle-pulse 3s infinite;
}

.no-origin-hint:hover {
    transform: scale(1.05);
    animation: none;
    opacity: 1;
}

/* Responsive adjustments for chat toggle */
@media (max-width: 768px) {
    .chat-section.minimized {
        width: calc(100% - 20px);
        margin: 20px 10px 0 10px;
    }

    .chat-section.minimized .chat-header {
        padding: 12px 15px;
    }

    .chat-section.minimized .chat-header-text h2 {
        font-size: 1rem;
    }

    .chat-section.minimized .chat-header-text p {
        font-size: 0.8rem;
    }

    /* Maximized chat adjustments for mobile */
    .chat-section.maximized .chat-content {
        /* Dynamic padding that adapts to viewport height */
        padding-bottom: max(env(safe-area-inset-bottom, 0px),
                var(--dynamic-bottom-space, 8vh));
        /* Flex layout handles height automatically */
    }

    .chat-section.maximized .chat-input-area {
        /* Responsive margin at bottom for mobile navigation */
        margin-bottom: max(env(safe-area-inset-bottom, 10px), 3vh);
    }
}

/* Extra adjustments for small mobile screens */
@media (max-width: 480px) {
    .chat-section.maximized .chat-content {
        /* More conservative padding on very small screens */
        padding-bottom: max(env(safe-area-inset-bottom, 0px),
                var(--dynamic-bottom-space, 10vh));
        /* Flex layout handles height automatically */
    }
}

/* Support for devices without safe-area-inset support */
@supports not (padding: max(0px, env(safe-area-inset-bottom))) {
    .chat-section.maximized .chat-content {
        padding-bottom: 8vh;
        /* Flex layout handles height automatically */
    }

    @media (max-width: 768px) {
        .chat-section.maximized .chat-content {
            padding-bottom: 10vh;
        }
    }

    @media (max-width: 480px) {
        .chat-section.maximized .chat-content {
            padding-bottom: 12vh;
        }
    }
}

/* Bot suggestions styling */
.bot-suggestions {
    margin-top: 15px;
}

.bot-suggestions h6 {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.suggestion-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 82, 212, 0.15);
    transform: translateY(-2px);
}

.suggestion-card .card-body {
    padding: 12px 16px;
}

.suggestion-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-card .card-title i {
    font-size: 0.9rem;
}

.suggestion-card .card-text {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.suggestion-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.suggestion-btn:hover {
    transform: scale(1.05);
}

.suggestion-btn i {
    font-size: 0.75rem;
}

/* Score badge styling */
.suggestion-card .badge {
    font-size: 0.7rem;
    padding: 2px 6px;
}

/* Kiwi.com image styling for suggestion cards */
.suggestion-card .card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    transition: all 0.3s ease;
}

.suggestion-card:hover .card-img-top {
    transform: scale(1.02);
}

/* Adjust card body padding when image is present */
.suggestion-card:has(.card-img-top) .card-body {
    padding-top: 16px;
}

/* Animation for when suggestions appear */
.bot-suggestions {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle summary button styling */
.toggle-summary {
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.toggle-summary:hover {
    color: var(--secondary-color) !important;
    text-decoration: underline !important;
}

.toggle-summary:focus {
    outline: none;
    box-shadow: none;
}

/* Smooth transition for text changes */
.suggestion-summary .summary-preview,
.suggestion-summary .summary-full {
    transition: opacity 0.3s ease;
}

/* Only show toggle button if text is actually truncated */
.suggestion-card .card-text {
    position: relative;
}

/* Hide toggle button by default, show with JavaScript if needed */
.toggle-summary {
    margin-top: 4px;
    display: inline-block;
}