/* Buttons Icons */
.fa {
    font-size:15px;
}


.leaflet-popup-content-wrapper {
    background: var(--bg-surface);
    border-radius: var(--radius-s);
}
.leaflet-popup-tip {
    background: var(--bg-surface);
}

.leaflet-popup-content {
    width: 250px;
    max-width: 40rem;
}
.leaflet-popup-content p {
    margin-top: var(--space-4xs);
    margin-bottom: 0;
}
.leaflet-popup-content-wrapper a.btn.primary {
    color: var(--dark);
}



/* Default Mobile: The map fills the Footer Panel (height controlled by JS) */
#detailed-itinerary-map {
    width: 100%;
    height: 100%; 
}

/* Shared marker and in-map detail panel used by the detailed and summary maps. */
.remotex-map-with-sidebar {
    position: relative;
    overflow: hidden;
}

.remotex-destination-marker,
.remotex-map-marker--muted {
    display: grid;
    place-items: center;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}

.remotex-destination-marker {
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    background: var(--bg-surface, #fff);
    position: relative;
    z-index: 1;
}

.remotex-destination-marker::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--marker-color, var(--primary, #FACE48));
}

.remotex-map-marker--muted {
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    background: #999;
}

.remotex-photo-marker {
    position: relative;
    display: block;
    width: 46px;
    height: 46px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--marker-color, var(--primary, #FACE48));
    box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
    transform: translate(var(--pin-offset-x, 0), var(--pin-offset-y, 0));
    z-index: 3;
}

.remotex-photo-marker img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: inherit !important;
    object-fit: cover !important;
}

.remotex-photo-marker__number,
.remotex-numbered-marker {
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--marker-color, var(--primary, #FACE48));
    color: #171717;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.remotex-photo-marker__number {
    position: absolute;
    right: -8px;
    bottom: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
}

.remotex-numbered-marker {
    position: relative;
    width: 28px;
    height: 28px;
    border-color: #171717;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
    transform: translate(var(--pin-offset-x, 0), var(--pin-offset-y, 0));
    z-index: 3;
}

.remotex-hotel-marker {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #2f2f2d;
    color: var(--marker-color, var(--primary, #FACE48));
    box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
}

.remotex-hotel-marker svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.remotex-hotel-marker {
    position: relative;
}

.remotex-hotel-marker__number,
.chapter-hotel-marker__number {
    position: absolute;
    top: -7px;
    right: -8px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--marker-color, var(--chapter-color, #FACE48));
    color: #101010;
    font-size: 11px;
    line-height: 17px;
    text-align: center;
    font-weight: 800;
}

.remotex-airport-marker img,
.chapter-airport-marker img {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain !important;
    filter: invert(1);
}

.remotex-airport-marker,
.chapter-airport-marker {
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    overflow: hidden !important;
}

.remotex-map-with-sidebar .leaflet-sidebar {
    width: clamp(300px, 42%, 380px);
    padding: var(--space-xs, 12px);
}

.remotex-map-with-sidebar .leaflet-sidebar.right {
    right: -410px;
    padding-left: var(--space-xs, 12px);
}

.remotex-map-with-sidebar .leaflet-sidebar.right.visible {
    right: 0;
}

.remotex-map-with-sidebar .leaflet-sidebar > .leaflet-control {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-primary, #ddd);
    border-radius: var(--radius-s, 8px);
    background: var(--bg-surface, #fff);
}

.remotex-map-with-sidebar .leaflet-sidebar .close {
    top: var(--space-xs, 12px);
    right: var(--space-xs, 12px);
}

.remotex-map-sidebar__content {
    display: flex;
    height: 100%;
    min-height: 100%;
    flex-direction: column;
    overflow-y: auto;
}

.remotex-map-sidebar__image {
    width: 100%;
    overflow: hidden;
    background: var(--bg-surface-l-1, #eee);
}

.remotex-map-sidebar__image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: cover;
}

.remotex-map-sidebar__body {
    padding: var(--space-s, 16px);
    overflow-y: auto;
}

.remotex-map-sidebar.is-open {
    position: absolute;
    inset: var(--space-xs, 12px) var(--space-xs, 12px) var(--space-xs, 12px) auto;
    z-index: 2000;
    width: min(380px, calc(100% - var(--space-m, 24px)));
    overflow: auto;
    border: 1px solid var(--border-primary, #ddd);
    border-radius: var(--radius-s, 8px);
    background: var(--bg-surface, #fff);
}

@media (max-width: 767px) {
    .remotex-map-with-sidebar .leaflet-sidebar {
        width: 100%;
        padding: 0;
    }

    .remotex-map-with-sidebar .leaflet-sidebar.right {
        right: -100%;
    }
}

/* Desktop Override: Give it a fixed height when it's in the sticky sidebar */
@media (min-width: 1024px) {
    #detailed-itinerary-map {
        height: 85vh !important; /* Or whatever height looks good on desktop */
        min-height: 500px;
    }
}
/* 
   FLOATING NAV PILL 
   Position: Bottom Center
*/
.day-nav-pill {
    position: absolute;
    bottom:  var(--space-s); /* Distance from bottom */
    left: 50%;
    transform: translateX(-50%); /* This now works perfectly to center it */
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    /* background-color: white; */
    border-radius: 50px;
    padding: 5px 10px;
    
    /* box-shadow: 0 4px 15px rgba(0,0,0,0.25); */
    
    /* Z-Index must be higher than Leaflet controls (usually 1000) */
    /* z-index: 2000;  */
    pointer-events: auto;
    
    min-width: 180px;
    height: 44px;
}

/* Icons */
.day-nav-pill .nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    /* color: #333;  */
    transition: background-color 0.2s;
}

.day-nav-pill .nav-btn:hover {
    background-color: var(--bg-surface-l-2);
    color: var(--primary, #FACE48);
}

.day-nav-pill .nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Text */
.day-nav-pill .nav-label {
    font-size: 16px;
    font-weight: 800;
    /* color: #222; */
    padding: 0 10px;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
