/* bootstrap overrides */
body {
    background: white;
}
/* bootstrap overrides / elements */
.modal-header {
    display: flex;
    gap: 8px;
}
.modal-header h5 {
    flex: 1;
}
.modal-content {
    background: white;
}
.badge {
    font-size: 10px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    letter-spacing: .8px;
    text-transform: uppercase;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 6px;
    text-align: center;
}
.card {
    background-color: var(--background-secondary-color);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
}
.card-body {
    background-color: var(--background-secondary-color);
    border: none;
}

/* Fixed floating icon buttons */
.filter-toggle-btn,
.add-location-toggle-btn,
.floating-auth-btn,
.nav-toggle-btn,
.current-location-button,
.save-list-button {
    position: fixed;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.filter-toggle-btn:hover,
.add-location-toggle-btn:hover,
.nav-toggle-btn:hover,
.current-location-button:hover,
.save-list-button:hover,
.floating-auth-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.filter-toggle-btn i,
.add-location-toggle-btn i,
.floating-auth-btn i,
.nav-toggle-btn i,
.save-list-button i {
    font-size: 28px;
    color: white;
}

/* Spinning animation for loading states */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fixed floating icon buttons positioning */
.nav-toggle-btn,
.floating-auth-btn {
    top: 2vh;
    right: 12px;
}
.filter-toggle-btn {
    bottom: 26vh;
    right: 12px;
}
.add-location-toggle-btn {
    bottom: 26vh;
    left: 12px;
}
.current-location-button {
    top: 2vh;
    left: 12px;    
}
.save-list-button {
    top: 82px;
    left: 82px;
}

@media (min-width: 1024px) {
    .nav-toggle-btn,
    .floating-auth-btn {
        top: 2vh;
        right: 12px;
    }
    .filter-toggle-btn {
        top: 2vh;
        bottom: auto;
        left: calc(30% + 100px);
    }
    .add-location-toggle-btn {
        top: 2vh;
        bottom: auto;
        left: calc(30% + 24px);
    }
    .current-location-button {
        top: auto;
        bottom: 5vh;
        left: calc(30% + 24px);    
    }
    .save-list-button {
        top: 82px;
        left: 82px;
    }
}

/* Map Container Styles */
.map-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}
@media (min-width: 1024px) {
    .map-container {
        left: 30%;
        width: 70%;
    }
    
    /* Full width map for unauthenticated users */
    body:has(.unauthenticated-overlay) .map-container {
        left: 0;
        width: 100%;
    }
}

.map-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Global alerts container fixed at top */
.alerts-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    pointer-events: none; /* Allow clicks to pass through container */
}

.alerts-container .alert {
    position: relative;
    margin: 0;
    padding: 12px 45px 12px 15px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto; /* Re-enable pointer events for alerts */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease-in-out;
    font-size: 14px;
    line-height: 1.4;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Alert types styling */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Close button styling */
.alert .btn-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* Dismiss animation */
.alert.dismissing {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}

/* Map container alert (for existing map-specific alerts) */
.map-container .alert {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    min-width: 300px;
    text-align: center;
}
:root {
    --primary-color: #001D2D;
    --secondary-color: #064C72;
    --tertiary-color: #FA144A;
    --white: #FFFFFF;
    --gray: #777777;
    --primary-font-color: #001D2D;
    --secondary-font-color: #064C72;
    --tertiary-font-color: #FA144A;
    --background-primary-color: #FFF;
    --background-secondary-color: #F2F2F7;
    --border-gray: #E5E5EA;
}

body, p, h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
    color: var( --primary-font-color );
    font-family: "Source Sans 3", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-style: normal;
    line-height: 120%;
}
h1 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: .2rem;
}
h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .2rem;
}
h5 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 400;
}
small {
    font-size: 14px;
    line-height: 120%;
}
.med {
    font-weight: 500;
}
.strong {
    font-weight: 600;
}
.color-primary, .text-primary {
    color: var( --primary-color ) !important;
}
.color-secondary, .text-secondary {
    color: var( --secondary-color ) !important;
}
.color-tertiary, .text-tertiary {
    color: var( --tertiary-color ) !important;
}
.color-gray, .text-gray {
    color: var( --gray ) !important;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 6;
    padding: 24px;
    background-color: transparent;
}

/* Header styling */
.nav-header {
    position: fixed;
    top: 1vh;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items:center;
    gap: 12px;
    width: calc(100% - 16px);
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
@media (min-width: 1024px) {
    .nav-header {
        top: 0;
        left: 0;
        width: 30%;
        padding: 10px 20px;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid var(--border-gray);
    }
}
.nav-header h1 {
    font-size: 18px;
    line-height: 120%;
}
.nav-header p {
    font-size: 16px;
}
.nav-header .header-img {
    width: 50px;
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
    background-size: cover;
    background-position: center;
}
.nav-header .header-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.nav-footer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
}


/* Navigation Menu */

.navbar-collapse {
    position: fixed;
    z-index: -1;
    top: 20vh;
    left: 0;
    width: 100%;
    height: 80vh;
    padding: 8px 12px;
    background-color: var(--background-primary-color);
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.2s ease;
    opacity: 0;
}

/* Show the navbar when open */
.navbar-collapse.show {
    z-index: 4;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.2s ease-out;
}

@media (min-width: 1024px) {
    .navbar-collapse {
        width: 30%;
        height: 100vh;
        top: 0;
        right: 0;
        left: auto;
        box-shadow: none;
        transform: translateX(100%);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    .navbar-collapse.show {
        transform: translateX(0);
        transition: transform 0.2s ease-out;
    }
}

.navbar-collapse .nav-link {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-font-color);
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid var(--border-gray);
    background-color: white;
    transition: .2s ease;
}

.nav-link:hover {
    color: var(--secondary-color);
    background-color: var(--background-secondary-color);
}
/* Navbar */

/* utilities */
.flex-1 {
    flex: 1;
}
.flex-apart {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.min-100vh {
    min-height: 100vh;
}

.p-relative {
    position: relative;
}

/* utilities */
.list-group-item {
    color: var( --primary-font-color );
    background-color: var(--background-secondary-color);
}
a {
    color: var( --tertiary-color );
    text-decoration: underline;
}
.btn {
    display: flex;
    flex-direction: row;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .6px;
    box-shadow: none;
}
.btn:hover {
    background-color: var(--secondary-color);
    box-shadow: none;
}

.btn.material-icons-round {
    padding: 0;
}

.btn .material-symbols-rounded {
    font-size: 16px;
}

.btn-primary {
    border: 0;
    background: var( --primary-color );
}

.btn-primary.active {
    background: var(--tertiary-color);
}

.btn-secondary {
    color: var(--primary-color);
    background: transparent;
}

.btn-borderless.btn-primary {
    border: 0;
    padding: 0;
    color: var(--primary-color);
    background: transparent;
}
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent !important;
    border: none !important;
    color: var(--secondary-font-color);
    padding: 0;
}

.btn-icon .material-symbols-rounded, .btn-icon.btn-sm .material-symbols-rounded {
    font-size: 24px;
}

.btn-group {
    display: flex;
    gap: 16px;
}

.dropdown-menu {
    border-radius: 8px;
}
.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 400;
    font-size: 14px;
    color: var( --secondary-font-color );
}
.form-group {
    margin-bottom: 8px;
}
.form-control, .form-select {
    padding: 0.375rem 0.5rem;
}

.form-control {
    color: var( --primary-font-color );
    border: 1px solid var(--background-secondary-color);
    border-radius: 8px;
    background-color: var( --background-primary-color );
    trasition: .2s ease;
}
.form-control:hover {
    background-color: var( --background-secondary-color );
}
.form-control:focus {
    color: var( --primary-font-color );
    border: 1px solid var(--primary-font-color);
    box-shadow: 0 0 0 .25rem var( --background-secondary-color );
    background-color: var( --background-primary-color );
}

input, .form-select, .form-control {
    background-color: white;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    color: var(--primary-font-color);
}
input:hover, .form-select:hover, .form-control:hover {
    border: 1px solid var(--primary-color);
    background-color: white;
}
input:focus, .form-select:focus, .form-control:focus {
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 0 .25rem #f7f7f7;
}
.form-check-input {
    background-color: #f7f7f7;
    border: 1px solid var(--secondary-color);
}
.form-check-input:checked {
    background-color: var(--secondary-color);
    border: 1px solid var(--primary-color);
}

.button-footer {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: right;
    gap: 16px;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 12px 24px 16px;
}


input::placeholder,
textarea::placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: var(--gray) !important; /* or any color you want */
}

.filter-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    background-color: var( --background-primary-color );
    padding: 16px 24px 32px;
}

.form-container {
    position: fixed;
    z-index: 1;
    top: 76px;
    right: 0;
    margin: 16px;
    padding: 24px;
    width: 300px;
}

/* Add Location Drawer Styles */
.location-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
@media (min-width: 1024px) {
    .location-drawer-overlay {
        width: 30%;
        background-color: rgba(0, 0, 0, 0.5);
    }
}

.location-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.location-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    height: 30vh;
    transform: translateY(100%);
    transition: all 0.3s ease;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.15);
    touch-action: none;
}

.location-drawer-overlay.active .location-drawer {
    transform: translateY(0);
}

/* Mobile drawer states */
@media (max-width: 768px) {
    .location-drawer.partial {
        height: 30vh;
        transform: translateY(0);
    }
    
    .location-drawer.full {
        height: 80vh;
        transform: translateY(0);
    }

    .location-drawer.add-location-drawer.full {
        height: 50vh;
        transform: translateY(0);
    }
    
    .location-drawer.closed {
        transform: translateY(100%);
    }
}

/* Desktop - maintain original behavior */
@media (min-width: 769px) {
    .location-drawer {
        height: auto;
        max-height: 85vh;
    }
}

.drawer-handle {
    padding: 12px 0;
    text-align: center;
    cursor: pointer;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background-color: #ddd;
    border-radius: 2px;
    margin: 0 auto;
}

.drawer-content {
    padding: 0 20px 20px;
    max-height: calc(85vh - 40px);
    overflow-y: auto;
}

.detail-section {
    padding-bottom: 16px;
}

.detail-section:last-child {
    padding-bottom: 0;
}

.detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.detail-text {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

.detail-text strong {
    color: #333;
}

.detail-text .material-symbols-rounded {
    color: var(--primary-color);
}

/* Mobile drawer content adjustments */
@media (max-width: 768px) {
    .location-drawer.partial .drawer-content {
        max-height: calc(30vh - 40px);
        overflow: hidden;
    }
    
    .location-drawer.full .drawer-content {
        max-height: calc(80vh - 40px);
        overflow-y: auto;
    }
}

.drawer-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-body {
    padding-bottom: 20px;
}

.drawer-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    z-index: 10;
    margin: 0 -20px -20px -20px;
}

.filter-controls h5 {
    margin-bottom: 1rem;
}

.marker-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--tertiary-color);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.marker-content .material-symbols-rounded {
    font-size: 16px !important;
}

.marker-title {
    font-weight: 400;
    margin-bottom: 4px;
}

.marker-public-badge {
    font-size: 0.8em;
    color: var(--bs-info);
}

.highlight-marker {
    background: var(--tertiary-color) !important;
    border: 2px solid var(--tertiary-color) !important;
    transform: scale(1.05);
    z-index: 10 !important;
}

/* Remove stroke from Google Maps labels */
[data-value="label"] {
    text-stroke: none !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

/* Target Google Maps POI labels specifically */
.gm-style .gm-style-pbc,
.gm-style .gm-style-pbt {
    text-stroke: none !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

/* Remove stroke from all Google Maps text elements */
.gm-style div[style*="text-stroke"],
.gm-style div[style*="-webkit-text-stroke"],
.gm-style span[style*="text-stroke"],
.gm-style span[style*="-webkit-text-stroke"] {
    text-stroke: none !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

/* Remove stroke from map labels and POI text */
.gm-style-pbc,
.gm-style-pbt,
.gm-style-pbc > div,
.gm-style-pbt > div {
    text-stroke: none !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

/* Force remove any Google Maps label text styling on main map */
#map .gm-style * {
    text-stroke: none !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

/* Target all possible Google Maps label container classes */
.gm-style div,
.gm-style span,
.gm-style-cc,
.gm-style-mtc,
.gm-style-iw,
.gm-style-iw-c,
.gm-style-iw-d {
    text-stroke: none !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

/* Cluster marker styles */
.cluster-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.marker-cluster-count {
    font-size: 12px;
    line-height: 1;
}

.active-marker {
    background: var(--tertiary-color) !important;
    border: 3px solid var(--tertiary-color) !important;
    transform: scale(1.2);
    z-index: 15 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

/* Add pulse animation for marker highlighting */
@keyframes pulse {
    0% { transform: scale(1.05); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.05); }
}

/* Grid layout styles for locations and itineraries */
.location-thumbnail, .itinerary-thumbnail {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.location-thumbnail-placeholder, .itinerary-thumbnail-placeholder {
    height: 120px;
    width: 100%;
}

.tags-container {
    min-height: 24px;
}

.location-card, .itinerary-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.location-card:hover, .itinerary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 29, 45, 0.1);
}

.location-preview-badge .badge {
    font-size: 0.7rem;
}

/* Active location card highlighting */

.active-location-card .location-title {
    color: var(--tertiary-color) !important;
    font-weight: 500 !important;
}

/* Location sidebar */
.location-sidebar {
    position: fixed;
    background-color: transparent;
    bottom: 2vh;
    left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-y: auto;
    z-index: 3;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
}
@media (min-width: 1024px) {
    .location-sidebar {
        top: 0;
        bottom: 0;
        width: 30%;
        height: 100vh;
        background-color: white;
    }
}

.location-sidebar::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome/Safari/Webkit */
}

.navigation-buttons {
    position: absolute;
    top: auto;
    bottom: 32px;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
    z-index: 1010; /* Ensure buttons are above other elements */
}

/* Mobile optimization for location sidebar */
@media (max-width: 768px) {
    .navigation-buttons {
        bottom: 16px;
    }
}

/* Empty state styling for when users have no locations */
.empty-state-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 400px;
    padding: 40px 20px;
}

.empty-state-content {
    text-align: center;
    max-width: 300px;
}

.empty-state-icon {
    margin-bottom: 24px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.empty-state-description {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.empty-state-btn .material-icons {
    font-size: 20px;
}

.shared-by {
    position: absolute;
    bottom: 12px;
    left: 8px;
    padding: 6px 14px 7px;
    border-radius: 50px;
    background-color: var(--background-primary-color);
    color: var(--primary-font-color);
    font-weight: 500;
}

/* Timeline styling */
.timeline-marker {
    min-width: 80px;
}

.timeline-item {
    position: relative;
    padding-bottom: 0.75rem;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 40px;
    top: 35px;
    bottom: 0;
    width: 2px;
    background-color: var(--bs-border-color);
}

.video-container {
    position: relative;
    height: 67vh;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* Filter List Styles */
.itinerary-list {
    display: flex;
    flex-direction: row;
    list-style: none;
    padding-left: 12px;
    padding-block: 12px;
    margin-block: -12px;
    gap: 8px;
    overflow-x: scroll;
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
}
@media (min-width: 1024px) {
    .itinerary-list {
        flex-wrap: wrap;
        overflow-x: visible;
        background: white;
        margin: 0;
        padding: 12px;
        z-index: 3;
        border-bottom: 1px solid var(--border-gray);
    }
}

.itinerary-list::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome/Safari/Webkit */
}

.filter-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    padding-block: 12px;
    margin-block: -12px;
    gap: 8px;
    overflow-x: scroll;
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
}

.filter-list::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome/Safari/Webkit */
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    flex: none;
    padding: 6px 12px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--border-gray);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
    border-radius: 100px;
    white-space: nowrap;
    transition: .2s ease;
}

.filter-item:hover {
    background: var(--background-secondary-color);
}

.filter-item.active {
    background-color: var(--secondary-color);
    color: var(--white);
}

.filter-item span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-item .badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 100px;
    background-color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.filter-item .material-symbols-rounded {
    font-size: 18px;
}

.itinerary-list .filter-item {
    padding: 2px 12px 2px 2px;
}

/* Instance Container Styles */
.instances-container {
    padding: 1rem;
    background: var(--background-primary-color);
    border-radius: 10px;
}

.instance-card {
    margin-bottom: 1rem;
}

.instance-card .card {
    background: var(--background-secondary-color);
    border: none;
    border-radius: 8px;
}

.instance-card .category-badge {
    margin-bottom: 0.5rem;
}

.instance-card .instance-footer {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.instance-card .video-container {
    margin: 1rem 0;
    border-radius: 6px;
    overflow: hidden;
}

.text-muted {
    color: var(--secondary-font-color) !important;
}

/* Grouped marker styles */
.grouped-marker {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
}

.marker-stack-indicator {
    font-size: 0.8em;
    margin-top: 4px;
    color: var(--background-secondary-color);
}

/* Video stack styles */
.video-stack {
    position: relative;
    margin-bottom: 1.5rem;
}

.stacked-video {
    position: relative;
    margin-top: -30px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.stacked-video:hover {
    transform: scale(1);
    z-index: 2;
}

/* Location group styles */
.location-group-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--background-secondary-color);
}

.location-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Location sidebar styles */
.location-list {
    display: flex;
    width: 100%;
    gap: 8px;
    overflow: auto;
    padding: 12px 12px 8px; /* Add padding to avoid items being cut off */
    scrollbar-width: thin;      /* Firefox - thin scrollbar */
    scrollbar-color: white transparent; /* Firefox - white thumb, transparent track */
}
.location-list::-webkit-scrollbar {
    width: 8px;                /* Chrome, Safari, Opera */
    height: 8px;
}
.location-list::-webkit-scrollbar-track {
    background: transparent;    /* transparent track */
}
.location-list::-webkit-scrollbar-thumb {
    background: white;          /* white scrollbar thumb */
    border-radius: 4px;
}
.location-list::-webkit-scrollbar-thumb:hover {
    background: #f0f0f0;        /* slightly gray on hover */
}
@media (min-width: 1024px) {
    .location-list {
        flex-direction: column;
        padding-top: 12px;
        background-color: transparent;
        gap: 12px;
    }
}

/* location card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    background-color: var(--background-primary-color);
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Itinerary table styles */
.itinerary-table {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.itinerary-table thead th {
    background-color: #fafafa;
    color: #6b7280;
    font-weight: 500;
    border: none;
    padding: 1rem 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.itinerary-table tbody td {
    padding: 1rem 0.75rem;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
    background-color: white;
}

.itinerary-row:hover,
.itinerary-table tbody td:hover {
    background-color: #ffffff !important;
}

.itinerary-thumbnail-table {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.itinerary-thumbnail-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.location-preview-list {
    max-height: 80px;
    overflow-y: auto;
}

/* Light theme button styling for itinerary table */
.itinerary-table .btn-outline-primary {
    color: #4f46e5;
    border-color: #e0e7ff;
    background-color: #f8faff;
}

.itinerary-table .btn-outline-primary:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

.itinerary-table .btn-outline-secondary {
    color: #6b7280;
    border-color: #e5e7eb;
    background-color: #f9fafb;
}

.itinerary-table .btn-outline-secondary:hover {
    background-color: #6b7280;
    border-color: #6b7280;
    color: white;
}

/* Mobile responsiveness for itinerary table */
@media (max-width: 768px) {
    .itinerary-table thead th,
    .itinerary-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .itinerary-thumbnail-table {
        width: 50px;
        height: 50px;
    }
    
    .itinerary-thumbnail-placeholder {
        width: 50px;
        height: 50px;
    }
}

.location-card, .itinerary-card {
    position: relative; /* For positioning route-info-segment */
    display: flex;
    flex-direction: column;
    background-color: var(--background-secondary-color);
    border-radius: 8px;
}

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

.location-media img, .itinerary-card img {
    border-radius: 8px 8px 0 0;
}

.location-card .dropdown {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-primary-color);
    border-radius: 4px;
}

.dropdown-toggle:after {
    display: none;
}
/* */

.location-card button {
    height: fit-content;
    padding: 0;
    color: var(--secondary-font-color);
}

.location-header {
    display: flex;
    flex-direction: row;
    align-items: top;
    gap: 4px;
    margin-bottom: 0.75rem;
}

.location-header h5 {
    font-size: 1.1rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-body {
    color: var(--secondary-font-color);
}

/* Mobile optimizations for location cards */
@media (max-width: 768px) {
    .location-header {
        margin-bottom: 0.5rem;
    }
    
    .location-header h5 {
        font-size: 1rem;
    }
    
    .location-body {
        font-size: 0.9rem;
    }
}

/* Location items (shared itinerary style) */
.location-item {
    display: flex;
    flex: 0 0 auto;
    cursor: pointer;
    border-radius: 12px;
    background-color: #ffffff;
    border: 1px solid var(--border-gray);
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
    padding: 10px 8px 10px 16px;
    margin-bottom: 0;
    width: 90%;
    max-width: 350px;
    height: 106px;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    gap: 12px;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .location-item {
        width: 100%;
        max-width: initial;
    }
}

.location-item:hover {
    border: 1px solid var(--primary-color);
}

.location-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2px 4px 0 0;
}

.location-category {
    display: flex;
    align-items: center;
    gap: 2px;
}
.location-category i {
    font-size: 16px;
    color: var(--secondary-color);
}
.location-category span {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-color);
}

.location-time {
    font-size: 14px;
}

.location-item-thumbnail {
    position: relative;
    width: 80px;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f0f0f0;
}

.location-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.location-item-thumbnail .video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.location-item-thumbnail .video-play-overlay span {
    color: white;
    font-size: 18px;
}

.location-item.active, .location-item.active-location-card {
    border: 1px solid var(--tertiary-color);
}
.location-item.active .location-title {
    color: var(--tertiary-color);
}

/* Location title */
.location-title {
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    font-weight: 500;
    padding-bottom: 4px;
    font-size: 18px;
}
@media (min-width: 1024px) {
    .location-title {
        padding-bottom: 8px;
    }
}

.location-description {
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.location-actions {
    margin-top: auto;
}

.description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--secondary-font-color);
}

/* Video overlay styles */
.video-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    overflow: visible;
    /* Only transition specific properties, not transforms (for drag performance) */
    transition: opacity 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
    /* Improve performance with hardware acceleration */
    transform: translate(-50%, -50%); /* Position in top-left by default */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    /* Force hardware acceleration during animations/dragging */
    will-change: transform;
    /* Make entire overlay draggable */
    cursor: grab;
}


/* Desktop positioning: Safe positioning in visible area */
@media (min-width: 1024px) {
    .video-overlay {
        top: auto !important;
        left: calc(30% + 24px) !important;
        bottom: 24px;
        transform: none;
    }
}

.video-player-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
    width: 280px;
    height: 320px;
}

.video-player-container video,img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Ensure video poster (thumbnail) covers the full container */
.video-player-container video::-webkit-media-controls-panel {
    display: none !important;
}

.video-player-container video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Media player specific styling for poster images */
.media-player {
    object-fit: cover;
    object-position: center;
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
}

/* Ensure video poster attribute displays correctly */
.video-player.media-player[poster] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Video Controls */
.video-controls {
    display: flex;
    justify-content: flex-end;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.5);
}

.video-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fullscreen mode */
.video-overlay.fullscreen {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    max-width: 100vw !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: rgba(0, 0, 0, 0.95) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    /* Disable grab cursor in fullscreen mode */
    cursor: default !important;
}

.video-overlay.fullscreen .video-player-container {
    flex: 1;
    height: 100vh !important;
    width: 100vw !important;
    max-height: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-overlay.fullscreen video,
.video-overlay.fullscreen .video-player {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    max-width: none !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    object-fit: contain !important;
}

/* iOS video tap message */
.video-tap-message {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.5s;
    z-index: 5;
    text-align: center;
}

/* Hide the message when video is playing (handled by JS) */
.video-tap-message.hide {
    opacity: 0;
}

.video-overlay.dragging {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); /* Enhanced shadow when dragging */
    opacity: 0.95; /* Slightly transparent when dragging */
    cursor: grabbing;
    transition: none !important; /* Disable transitions during drag for better performance */
    /* Ensure hardware acceleration is active during drag */
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.video-overlay-content {
    width: 100%;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.video-overlay.fullscreen .video-overlay-content {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

.video-title-bar {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
}

/* iOS-specific styles */
@supports (-webkit-touch-callout: none) {
    .video-overlay {
        border-radius: 16px; /* More rounded corners for iOS design */
    }
    
    .video-title-bar {
        padding: 8px 12px; /* More padding for iOS */
    }
    
    .video-player-container {
        border-radius: 0 0 16px 16px; /* Match the rounded corners */
    }
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.video-overlay-header {
    display: flex;
    gap: 8px;
}

.video-btns {
    position: absolute;
    z-index: 1000;
    display: flex;
    top: 10%;
    align-items: center;
    justify-content: left;
    left: 0;
    width: 100%;
}

/* Outside overlay close button styles */
.video-close-btn {
    position: absolute;
    z-index: 10000;
    top: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s;
    transform: tanslateY(8px);
}

.video-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}


.video-overlay.fullscreen .video-btns-hover {
    top: 10%;
    left: auto;
    right: 0;
    display: flex;
    flex-direction: column;
    width: auto;
    opacity: 1;
    transform: translateY(0%);
}

.video-btn {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    border: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s, transform 0.2s;
}

.video-btn:hover {
    background-color: rgba(0, 29, 45, 0.85);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.video-btn i {
    font-size: 20px;
    color: #ffffff;
    line-height: 36px;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-sidebar::-webkit-scrollbar {
    width: 6px;
}

.location-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.location-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Route Information Panel */
.route-info-panel {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-primary-color);
    border-radius: 10px;
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 600px;
    width: 90%;
    display: none;
}

.route-info-panel.show {
    display: block;
}

.route-segment {
    padding: 12px;
    border-bottom: 1px solid var(--background-secondary-color);
    margin-bottom: 8px;
}

.route-segment:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.travel-mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.travel-mode-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--background-secondary-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.travel-mode-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Route Option Styles */
.route-info-segment {
    background: var(--background-secondary-color);
    border-radius: 8px;
    margin: 0.5rem 0 1rem 0;
    padding: 0.75rem;
    width: 100%;
}

.route-info-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    color: var(--secondary-font-color);
    font-size: 0.9rem;
}

.route-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-around;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    .route-info-segment {
        padding: 0.5rem;
        margin: 0.25rem 0 0.75rem 0;
    }
    
    .route-info-loading {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

.route-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: var(--background-primary-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    width: calc(50% - 0.25rem);
    text-align: center;
    min-width: 80px;
}

.route-option:not(.disabled):hover {
    transform: translateY(-2px);
    background: var(--primary-color);
    color: var(--white);
}

.route-option.active {
    background: var(--primary-color);
    color: var(--white);
}

.route-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--background-secondary-color);
}

.route-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.route-mode i {
    width: 16px;
    text-align: center;
    font-size: 1rem;
}

.route-details {
    font-size: 0.75rem;
    color: var(--secondary-font-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.route-option:hover .route-details,
.route-option.active .route-details {
    color: var(--white);
}

.route-duration {
    font-weight: 500;
}

.route-distance {
    opacity: 0.8;
    font-size: 0.7rem;
}

/* Mobile optimization for route options */
@media (max-width: 768px) {
    .route-option {
        padding: 0.35rem;
        min-width: 70px;
    }
    
    .route-mode {
        font-size: 0.8rem;
    }
    
    .route-details {
        font-size: 0.7rem;
    }
    
    .route-distance {
        font-size: 0.65rem;
    }
}

/* Update route controls position */
.route-controls {
    position: fixed;
    top: 76px;
    right: 16px;
    z-index: 1000;
    border-radius: 50%;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.route-controls.show {
    display: flex;
}

/* Filter Bottom Sheet */
.filter-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    background-color: var(--background-primary-color);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 0;
}

.filter-bottom-sheet.open {
    transform: translateY(0);
}

@media (min-width: 1024px) {
    .filter-bottom-sheet {
        width: 30%;
    }
}

.filter-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--background-secondary-color);
    position: sticky;
    top: 0;
    background-color: var(--background-primary-color);
    z-index: 5;
}

.filter-sheet-content {
    padding: 16px 20px 32px;
}

/* Touch handle for bottom sheet */
.filter-sheet-header:before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background-color: var(--background-secondary-color);
    border-radius: 4px;
}

/* Transportation mode option styles */
.transport-options {
    display: flex;
    flex-direction: row;
    gap: 4px;
    justify-content: left;
    margin-bottom: 16px
}
.transport-mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    font-weight: 500;
}

.transport-mode-option:hover {
    transform: translateY(-2px);
    border: 1px solid var(--primary-color);
}

.transport-mode-option.selected-transport-mode {
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-weight: 600;
}

/* Mode-specific colors */


.mode-details {
    font-size: 12px;
    font-weight: normal;
    text-align: center;
}

.mode-label {
    font-size: 14px;
    font-weight: 600;
}

/* Transport info in location cards */
.transport-info {
    color: #6c757d;
    border-color: #dee2e6 !important;
    margin-left: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transport-info:hover {
    color: var(--primary-color);
}

.transport-info.active-transport-info {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-radius: 4px !important;
    padding: 2px 4px !important;
}

.transport-info i {
    color: #0d6efd;
}

.transport-info.active-transport-info i {
    color: white !important;
}

/* Active route marker styling */
.active-route-marker {
    background: var(--tertiary-color);
    border-radius: 50% !important;
    transform: scale(1.2) !important;
    z-index: 1000 !important;
}

.location-selection-card {
    background-color: #f5f5f5;
    padding: 8px;
}

/* Unauthenticated User Modal Overlay */
.unauthenticated-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.register-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.register-modal-content {
    padding: 32px 24px;
}

.register-modal-title {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-align: center;
}

.register-modal-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.4;
}

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

.register-form .form-label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.register-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
    color: #333;
}

.register-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.register-form .form-control::placeholder {
    color: #999;
}

.register-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-bottom: 20px;
}

.register-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.register-btn:active {
    transform: translateY(0);
}

.login-link {
    text-align: center;
    font-size: 16px;
    color: #666;
}

.login-link-text {
    text-decoration: none;
    font-weight: 500;
}

.login-link-text:hover {
    text-decoration: underline;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .register-modal {
        margin: 16px;
        width: calc(100% - 32px);
    }
    
    .register-modal-content {
        padding: 24px 20px;
    }
    
    .register-modal-title {
        font-size: 20px;
    }
    
    .register-modal-subtitle {
        font-size: 14px;
    }
}

/* Shared Location Map Styles */
.shared-location-marker {
    background: white;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shared-location-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Info window styling for shared locations */
.info-window {
    max-width: 300px;
    font-family: 'Inter', sans-serif;
}

.info-window h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-window p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.info-window .btn {
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
}

/* Media thumbnails for shared locations */
.media-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.media-thumbnail {
    position: relative;
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.media-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay,
.image-view-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.media-thumbnail:hover .video-play-overlay,
.media-thumbnail:hover .image-view-overlay {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay .material-symbols-rounded,
.image-view-overlay .material-symbols-rounded {
    font-size: 24px;
}
