/* ========================================
   TRAVEL MAPS - MAIN STYLESHEET
   ======================================== */

/* --- Country sidebar mode buttons: summary wrapper parity --------------
   Webflow's musemaps.webflow.css defines wrapper rules for the other four
   mode-button divs (.visa_button_div / .demographic_button_div /
   .tax_button_div / .favorite_button_div) but NOT for .summary_button_div.
   Without an explicit width on that wrapper, the flex item expands to its
   content's intrinsic size — and summary_icon_black.svg's intrinsic width
   (~230px) blows the wrapper out, so the IMG renders at ~207×207 vs the
   other buttons' ~34×34. Adding the missing rule here (matching the shape
   of the others) makes summary render at the same size, regardless of
   whether #countries/infosidebar-country-ui has been deployed/loaded.   */
.summary_button_div {
    background-color: var(--general--shadow-02);
    flex: 0 auto;
    order: 1;
    min-width: 10%;
    max-width: 10%;
    min-height: 100%;
}

.flatpickr-calendar,
.flatpickr-calendar *,
.trip-flatpickr-calendar,
.trip-flatpickr-calendar * {
    font-family: Arial, sans-serif !important;
}

.trip-flatpickr-helper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 16px;
    color: #2a2a2a;
}

.trip-flatpickr-instruction {
    font-weight: 600;
    font-size: 16px;
}

.trip-flatpickr-apply-button {
    border: none;
    background: #1f6feb;
    color: #fff;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}

.trip-flatpickr-apply-button:hover {
    background: #1a5dc6;
}

.trip-date-active {
    border: 2px solid #1dbf73 !important;
    box-shadow: none !important;
}

/* Import Typekit Fonts */
@import url("https://use.typekit.net/pnv1ccp.css");

/* ========================================
   DRAG & DROP STYLES FOR COMPARISON PANELS
   ======================================== */

/* Drag handle cursor states - preserve Webflow styling */
.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Subcategory drag handle (Cost of Living) */
.subcategory_drag-handle {
    cursor: grab;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcategory_drag-handle:active {
    cursor: grabbing;
}

/* Comparison panels container */
#comparison-panels-container {
    display: none; /* Hidden by default on startup */
    transition: all 0.3s ease;
}

/* Show comparison panels container when active */
#comparison-panels-container.active {
    display: flex;
}

/* SortableJS animation classes */
.sortable-ghost {
    opacity: 0.4;
    background: rgba(0, 123, 255, 0.1);
    border: 2px dashed rgba(0, 123, 255, 0.3);
    transform: rotate(2deg);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sortable-chosen {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.2s ease;
}

.sortable-drag {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
    transition: none;
}

/* Dragging state for individual containers */
.dragging {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 123, 255, 0.5);
    animation: dragPulse 1.5s infinite;
}

@keyframes dragPulse {
    0%, 100% {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 8px 16px rgba(0, 123, 255, 0.3);
    }
}

/* Smooth transitions for all comparison containers */
.infosidebar-city {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Live preview animation classes */
.preview-mode {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.preview-animating {
    transform: translateX(0);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.preview-dragging {
    opacity: 0.7;
    z-index: 1000;
}

/* Empty slot preview indicator */
.empty-slot-preview {
    flex-shrink: 0;
    background: rgba(0, 123, 255, 0.1);
    border: 2px dashed rgba(0, 123, 255, 0.5) !important;
    border-radius: 4px;
    opacity: 0.3;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: emptySlotPulse 2s infinite;
}

@keyframes emptySlotPulse {
    0%, 100% {
        background: rgba(0, 123, 255, 0.1);
        border-color: rgba(0, 123, 255, 0.5);
    }
    50% {
        background: rgba(0, 123, 255, 0.2);
        border-color: rgba(0, 123, 255, 0.7);
    }
}

/* COMMENTED OUT: Prevent dragging of main city container */
/* Uncomment these lines if you want to hide drag handle for main city */
/*
#infosidebar_city1 .drag-handle {
    display: none;
}
*/

/* ========================================
   COST OF LIVING: SUBCATEGORY HEADER + CARD
   ======================================== */
/* Align subcategory headers: left (horizontal) and center (vertical) */
.subcategory1_header_div {
    display: flex;
    align-items: center;        /* vertical center */
    justify-content: flex-start;/* left align */
}

/* Subcategory card visual style */
.col_subcategory1_div {
    box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
}

/* Ensure subcategory list uses flex so preview ordering works */
.col_subcategories1_div {
    display: flex;
    flex-direction: column; /* vertical layout */
}

/* COMMENTED OUT: Alternative disabled drag handle for main city */
/* Uncomment these lines if you want to show a disabled drag handle for main city */
/*
#infosidebar_city1 .drag-handle.disabled {
    display: flex;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0.5;
}

#infosidebar_city1 .drag-handle.disabled::before {
    content: "📍";
    color: rgba(0, 0, 0, 0.3);
}
*/

/* ========================================
   1. VIEWPORT LOCK & PREVENTION
   ======================================== */
html, body {
    /* Lock viewport dimensions */
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    
    /* Prevent scrolling and shifting */
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    
    /* Prevent pull-to-refresh and overscroll */
    overscroll-behavior: none;
    
    /* Prevent text selection except in specific areas */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Prevent iOS bounce effect */
    -webkit-overflow-scrolling: auto;
    
    /* Disable momentum scrolling */
    -webkit-transform: translateZ(0);
}

/* Main app container - locked viewport */
#app, .main-container, body {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    touch-action: none; /* Prevent all touch gestures by default */
}

/* ========================================
   2. GENERAL STYLES
   ======================================== */
* {
    box-sizing: border-box;
    /* Prevent pinch-zoom on everything by default */
    touch-action: manipulation;
}

/* Prevent accidental zoom on form elements */
input, textarea, select, button {
    font-size: 16px !important; /* Prevents zoom on iOS */
    touch-action: manipulation;
}

/* ========================================
   3. MAP CONTAINER & MAP
   ======================================== */
#map-container {
    position: relative;
    display: flex;
    width: 100%;
    height: 75vh;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 75vh;
    max-height: 100vh;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    
    /* Allow all touch events ONLY on map */
    touch-action: none !important;
}

/* Allow map controls to work properly */
.mapboxgl-canvas-container,
.mapboxgl-canvas {
    touch-action: none !important;
}

/* ========================================
   4. SCROLLABLE AREAS
   ======================================== */
/* Allow scrolling ONLY in specific containers */
.scrollable-content,
.sidebar-content,
.info-window-content,
.modal-content,
.popup-content {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y; /* Allow vertical scrolling only */
    
    /* Re-enable text selection in content areas */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ========================================
   5. MAPBOX SPECIFIC
   ======================================== */
.mapboxgl-map .mapbox-directions-route-shield,
.mapboxgl-map .mapbox-directions-component-keyline {
    display: none;
}

.mapboxgl-map .mapbox-directions-route-line {
    opacity: 0 !important;
}

.mapboxgl-ctrl-directions .mapbox-directions-origin input,
.mapboxgl-ctrl-directions .mapbox-directions-destination input {
    font-size: 16px !important;
    height: 40px !important;
}

.mapboxgl-ctrl-geocoder--suggestion,
.suggestions {
    display: none !important;
}

.directions-icon-reverse.directions-reverse.js-reverse-inputs {
    display: none !important;
}

.mapbox-directions-profile {
    display: none !important;
}

.directions-icon.directions-icon-depart {
    background-color: red !important;
}

.directions-icon.directions-icon-arrive {
    background-color: black !important;
}

/* ========================================
   6. POPUPS
   ======================================== */
.mapboxgl-popup {
    padding: 0;
    background: none;
    z-index: 1;
}

.mapboxgl-popup-content {
    padding: 1px;
    border-radius: 10px;
    box-shadow: 3px 8px 16px rgba(0,0,0,0.55);
    max-height: 100px;
    max-width: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background-color: white;
}

.mapboxgl-popup-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
}

.mapboxgl-popup-tip {
    width: 0;
    height: 0;
    border: 10px solid transparent;
    z-index: 1;
    position: absolute;
}

.best-route-popup {
    z-index: 9999 !important;
}

.second-route-popup {
    z-index: 9998 !important;
}

.best-route-popup .mapboxgl-popup-content {
    background: rgba(255, 255, 255, 1);
}

.second-route-popup .mapboxgl-popup-content {
    background: rgba(169, 169, 169, 1);
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
    border-top: none;
    border-bottom-color: inherit;
    top: -10px;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
    border-bottom: none;
    border-top-color: inherit;
    bottom: -10px;
}

.best-route-popup .mapboxgl-popup-tip {
    border-top-color: rgba(255, 255, 255, 1);
    border-bottom-color: rgba(255, 255, 255, 1);
}

.second-route-popup .mapboxgl-popup-tip {
    border-top-color: rgba(169, 169, 169, 1);
    border-bottom-color: rgba(169, 169, 169, 1);
}

.route-popup-content {
    display: flex;
    align-items: center;
    border-radius: 0px;
    overflow: visible !important;
}

.mapboxgl-popup-content::-webkit-scrollbar,
.route-popup-content::-webkit-scrollbar {
    display: none;
}

.mapboxgl-popup-content,
.route-popup-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.popup-content {
    font-size: 15px;
    font-weight: bold;
    color: black;
    font-family: 'Arial', Arial;
    margin-bottom: 8px;
    padding: 7px;
}

/* ========================================
   7. TYPOGRAPHY & TEXT STYLES
   ======================================== */
.transport-icon {
    font-family: "Arial", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.transport-name {
    font-family: "Arial", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 12px;
    line-height: 12px;
    vertical-align: middle;
}

.map-text-outline {
    -webkit-text-stroke: 0.4px black;
    color: white;
    text-shadow: 3px 5px 5px rgba(0, 0, 0, 0.4);
}

.directions-text {
    color: white;
}

.time-value {
    font-size: 12px;
    font-weight: bold;
    color: black;
}

.time-unit {
    font-size: 11px;
    font-weight: bold;
    color: black;
}

/* ========================================
   8. INFO WINDOW BAR
   ======================================== */
.infowindowbar-container {
    width: 100%;
    overflow: visible;
}

.infowindowbar,
#infowindowbar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    align-items: stretch;
    gap: 5px;
    scrollbar-width: none;
    scrollbar-color: var(--mm-scrollbar-thumb) var(--mm-scrollbar-track);
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    background-color: transparent;
}

.infowindowbar::-webkit-scrollbar,
#infowindowbar::-webkit-scrollbar {
    height: 0;
}

.infowindowbar::-webkit-scrollbar-track,
#infowindowbar::-webkit-scrollbar-track {
    background: var(--mm-scrollbar-track);
    border-radius: 999px;
}

.infowindowbar::-webkit-scrollbar-thumb,
#infowindowbar::-webkit-scrollbar-thumb {
    background: var(--mm-scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid var(--mm-scrollbar-track);
}

.infowindowbar::-webkit-scrollbar-thumb:hover,
#infowindowbar::-webkit-scrollbar-thumb:hover {
    background: var(--mm-scrollbar-thumb-hover);
}

.infowindowbar:hover,
#infowindowbar:hover {
    scrollbar-width: thin;
}

.infowindowbar:hover::-webkit-scrollbar,
#infowindowbar:hover::-webkit-scrollbar {
    height: 10px;
}

.infowindowbar__spacer {
    flex: 0 0 auto;
    height: 1px;
    pointer-events: none;
}

.info-content {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 10px 0;
}

.info-item {
    flex: 0 0 auto;
    width: 200px;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 8px !important;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.2s ease;
}

.info-item:first-child {
    margin-left: 0;
}

.info-item .info-text {
    padding: 1px;
    background-color: transparent;
    margin-bottom: 1px;
}

.info-item img:not(.info-flag) {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3/2;
    border-radius: 8px !important;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.35);
}

.info-thumb {
    border-radius: 8px !important;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.35);
    display: block;
}

.info-item h4 {
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    background-color: transparent;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    line-height: 1.2;
}

.info-item h4.daymode-text {
    font-size: 14px;
    color: black;
    background-color: transparent;
    margin: 4px 8px;
    padding: 0 4px;
    width: auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    font-family: 'Arial', 'Trebuchet MS', sans-serif;
    box-sizing: border-box;
}

.info-item h4.nightmode-text {
    font-size: 14px;
    color: white !important;
    background-color: transparent;
    margin: 4px 8px;
    padding: 0 4px;
    width: auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    font-family: 'Arial', 'Trebuchet MS', sans-serif;
    box-sizing: border-box;
}

.info-title {
    background-color: transparent !important;
    color: black; /* Default text color for day mode */
}

.info-item p {
    display: none;
    font-family: 'Arial', sans-serif;
    font-size: 12px;
    color: #666;
    margin: 2px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.info-text-city {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16px;
    padding: 0 5px;
    background-color: transparent;
    margin-bottom: 2px;
    box-sizing: border-box;
}

.flag-container {
    height: 16px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
}

.info-flag {
    height: 16px;
    width: auto;
    object-fit: contain;
    margin: 0;
    padding: 0;
}

.info-title {
    font-size: 14px !important;
    line-height: 16px !important;
    margin: 0 !important;
    padding: 2px 4px !important;
    white-space: nowrap !important;
    color: black !important;
    background-color: transparent !important;
}

.info-item:hover,
.info-item:active {
    box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.45);
}

/* ========================================
   9. NIGHT MODE
   ======================================== */
body.nightmode .info-item .info-text {
    background-color: transparent;
}

body.nightmode .info-item h4 {
    color: #fff;
}

body.nightmode .info-item p {
    color: #ccc;
}

body.nightmode .info-title {
    color: white !important;
    background-color: transparent !important;
}

/* Ensure body stays clean in nightmode but preserves layout */
body.nightmode {
    /* Preserve body dimensions and position */
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    /* Ensure no background issues */
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
}

/* Ensure main containers stay visible in nightmode */
body.nightmode #app,
body.nightmode .main-container,
body.nightmode #map-container,
body.nightmode #map {
    visibility: visible !important;
    display: block !important;
    opacity: 1 !important;
}

/* Only remove background images from specific info elements in nightmode */
body.nightmode .info-item,
body.nightmode .info-text,
body.nightmode .info-text-city,
body.nightmode .info-title {
    background-image: none !important;
}

/* Ensure info-text-city always has transparent background */
.info-text-city {
    background-color: transparent !important;
}

/* Ensure info-title styling based on mode */
.info-title {
    background-color: transparent !important;
    color: #333;
}

body.nightmode .info-title {
    color: white !important;
    background-color: transparent !important;
}

/* Nightmode button - Webflow div 32x32px with 35px border radius */
#nightmode {
    /* Fixed dimensions */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    /* Appearance - 100% opacity white background */
    border-radius: 35px !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    background-color: #ffffff !important;  /* Solid white background */
    background-image: url('https://jcttsphzhutrtqjndqhl.supabase.co/storage/v1/object/public/images/icons/webflow_ui/moon.svg') !important;
    background-size: 24px 24px !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    cursor: pointer !important;
    /* Layout */
    padding: 0 !important;
    margin: 2px !important;
    overflow: hidden !important;
    display: inline-block !important;
    position: relative !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
    opacity: 1 !important;  /* Ensure button itself is 100% opacity */
    vertical-align: middle !important;  /* Align with text baseline */
    /* Prevent viewport issues */
    flex: 0 0 32px !important;
    transform: none !important;
    perspective: none !important;
}

/* When nightmode is active, show sun icon */
#nightmode.nightmode-active {
    background-image: url('https://jcttsphzhutrtqjndqhl.supabase.co/storage/v1/object/public/images/icons/webflow_ui/sun.svg') !important;
    background-size: 24px 24px !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
}

/* Prevent nightmode button from affecting document flow */
#nightmode:focus,
#nightmode:active {
    outline: none !important;
}

/* Hover state - slight shadow instead of opacity change */
#nightmode:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* ========================================
   10. BUTTONS & CONTROLS
   ======================================== */
.button-container {
    width: 100%;
    text-align: center;
    margin-top: 0px;
    justify-content: center;
    gap: 2px;
}

/* ========================================
   Sidebar Flags - remove baseline gap and center
   ======================================== */
#infosidebar_city_flag,
#infosidebar_country_flag {
    line-height: 0 !important;           /* kill baseline gap from typography */
    display: flex !important;            /* ensure centering works consistently */
    align-items: center !important;
    justify-content: center !important;
}

#infosidebar_city_flag img,
#infosidebar_country_flag img {
    display: block !important;           /* avoid inline baseline alignment */
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

button {
    background-color: #FFF;
    color: black;
    font-family: 'Arial', sans-serif;
    margin: .5px 0px;
    padding: 2px 6px;
    font-size: 16px !important; /* Prevent zoom on iOS */
    touch-action: manipulation;
}

button:hover {
    background-color: #ddd;
}

button.active {
    background-color: #000000;
    color: white;
}

.selectedModeButton {
    filter: invert(100%) !important;
    box-shadow: 0px -3px 5px 0px rgba(255, 255, 255, 0.3) !important;
}

.selectedModeButton:hover {
    box-shadow: inset 0px -4px 7px 0px rgba(255, 255, 255, 0.5) !important;
}

.toggle-info-btn {
    cursor: pointer;
    background-color: #FFF;
    color: black;
    padding: 8px 16px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    display: inline-block;
}

#route-buttons {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.route-button {
    margin: 3px;
    padding: 5px;
    background: white;
    border: 2px solid black;
    border-radius: 6px;
    cursor: pointer;
    z-index: 9999;
}

.selected {
    background: #FF0000;
    color: white;
}

/* ========================================
   11. FORMS & INPUTS
   ======================================== */
.flatpickr-input,
.flatpickr-input:focus,
.flatpickr-input:hover {
    cursor: pointer !important;
}

.flatpickr-calendar,
.flatpickr-calendar * {
    font-family: 'Arial', sans-serif !important;
}

.date-filter-btn:hover,
.dropbtn:hover {
    background-color: #ddd;
}

input[type="date"] {
    font-family: Arial, sans-serif;
    padding: 5px;
    color: black;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px !important; /* Prevent zoom on iOS */
}

.search-box {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 20px;
    color: black;
    font-size: 16px !important; /* Prevent zoom on iOS */
}

.search-box:empty:before {
    content: attr(data-placeholder);
    color: #ccc;
}

.search-box:focus:before {
    content: '';
}

.search-box:focus {
    color: black;
}

/* ========================================
   12. DROPDOWNS
   ======================================== */
.dropdown-menu {
    position: relative;
    display: inline-block;
    z-index: 10;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    left: 0;
    top: 100%;
}

.dropdown-content label {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-menu .dropbtn {
    background-color: #FFF;
    color: black;
    padding: 8px 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropdown-menu .dropbtn:hover,
.dropdown-menu .dropbtn:focus {
    background-color: #ddd;
}

/* ========================================
   13. UTILITIES
   ======================================== */
.hidden {
    display: none !important;
}

.svg-shadow {
    filter: drop-shadow(3px 5px 5px rgba(0, 0, 0, 0.55));
    stroke: black;
    stroke-width: 1px;
}

.svg-stroke {
    stroke: black;
    stroke-width: 1px;
}

.marker {
    position: absolute;
    transform: translate(-50%, -100%);
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}
.city-marker-hover {
    transform: scale(1.3) !important;
    z-index: 1000 !important;
}
.route-container {
    margin: 10px 0;
}

.copy-icon {
    cursor: pointer;
}

.close-btn {
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

/* ========================================
   14. LOADING PROGRESS
   ======================================== */
#country_summary_city_loading_progress {
    width: 0%;
    height: 20px;
    background-color: #4CAF50;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.3s ease;
    display: none;
}

#country_summary_city_loading_progress_container {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    position: relative;
}

/* ========================================
   15. iOS SPECIFIC FIXES
   ======================================== */
@supports (-webkit-touch-callout: none) {
    /* iOS only */
    body {
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* Prevent rubber-band scrolling */
    .main-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
        -webkit-overflow-scrolling: auto;
    }
}

/* ========================================
   16. FIX IMAGE DOWNSHIFT ISSUE - PREVENT WEBFLOW TRANSFORMS
   ======================================== */
/* Global fix: Prevent Webflow's default -34px image downshift */
/* This utility class can be applied to any image container to prevent the downshift */
.no-image-shift,
[class*="no-image-shift"],
[id*="icon_profile"],
[id*="_icon"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: none !important;
    position: relative !important;
}

.no-image-shift img,
[class*="no-image-shift"] img,
[id*="icon_profile"] img,
[id*="_icon"] img {
    display: block !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: translateY(0) !important;
    line-height: 0 !important;
    position: relative !important;
}

/* Specific fix for profile icon containers - Maximum specificity to override Webflow */
#city_col_summary_icon_profile1,
#city_col_summary_icon_profile2,
#city_col_summary_icon_profile3 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: none !important;
    position: relative !important;
    overflow: visible !important;
}

#city_col_summary_icon_profile1 img,
#city_col_summary_icon_profile2 img,
#city_col_summary_icon_profile3 img,
#city_col_summary_icon_profile1 > img,
#city_col_summary_icon_profile2 > img,
#city_col_summary_icon_profile3 > img {
    display: block !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: translateY(0) !important;
    -webkit-transform: translateY(0) !important;
    -moz-transform: translateY(0) !important;
    -ms-transform: translateY(0) !important;
    -o-transform: translateY(0) !important;
    line-height: 0 !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

/* Prevent Webflow from applying transforms to dynamically inserted images */
img[src*="spend_profile_icon"],
img[src*="icon"],
img[alt*="icon"],
img[alt*="Icon"],
img[alt*="flag"] {
    transform: translateY(0) !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 0 !important;
}

/* Specific fix for country city icon containers to prevent upward shift */
[id^="country_city_icon"]:not(img),
[id^="city_flight_icon"]:not(img) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: none !important;
    position: relative !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    top: 0 !important;
    left: 0 !important;
}

/* Fix for when the icon element itself is an IMG */
img[id^="country_city_icon"],
img[id^="city_flight_icon"] {
    display: block !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: translateY(0) !important;
    line-height: 0 !important;
    -webkit-transform: translateY(0) !important;
    -moz-transform: translateY(0) !important;
    -ms-transform: translateY(0) !important;
    -o-transform: translateY(0) !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

/* Fix for img children inside icon containers */
[id^="country_city_icon"] img,
[id^="city_flight_icon"] img {
    display: block !important;
    vertical-align: top !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: translateY(0) !important;
    line-height: 0 !important;
    -webkit-transform: translateY(0) !important;
    -moz-transform: translateY(0) !important;
    -ms-transform: translateY(0) !important;
    -o-transform: translateY(0) !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

/* Fix for temperature icons inside country_city_tavg elements */
[id^="country_city_tavg"] img {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0 !important;
    vertical-align: top !important;
}

/* ========================================
   17. MODAL Z-INDEX HIERARCHY
   ======================================== */
/* Ensure spend-item editor (col-modal) appears above profile editor */
.col-modal-backdrop {
    z-index: 2147483647 !important;
    position: fixed !important;
}

.col-profile-modal-backdrop {
    z-index: 2147483649 !important;
    position: fixed !important;
}

.col-modal {
    z-index: 2147483648 !important;
    position: relative !important;
}

.col-profile-modal {
    z-index: 2147483601 !important;
    position: relative !important;
}

/* ========================================
   18. RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    /* Ensure no horizontal scrolling on mobile */
    body, html {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Adjust info items for mobile */
    /*
    .info-item {
        width: 150px;
    }
    */
}

/* Hide trip date range by default; JS shows it only in trip mode */
.tripdaterangediv {
    display: none;
}

/* Fix for wider viewports to prevent nightmode button issues */
@media (min-width: 769px) {
    /* Reset nightmode button positioning to relative for proper inline layout */
    #nightmode,
    div#nightmode {
        position: relative !important;
    }
    
    /* Ensure body maintains proper dimensions */
    body.nightmode {
        width: 100% !important;
        height: 100% !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    /* Ensure map container stays visible */
    body.nightmode #map,
    body.nightmode #map-container {
        width: 100% !important;
        height: 75vh !important;
        visibility: visible !important;
        display: block !important;
    }
}
