* { box-sizing: border-box; }

html, body {
    margin: 0;
    width: 100%;
    height: 100dvh;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef2ed;
    color: #143b5d;
}

@media (max-width: 1200px) {
    .navbar-nav>li>a {
        padding-left: 20px;
    }
}


.navbar-default{min-height:20px !important;}
@media (min-width: 1200px) {
    .navbar-default .navbar-nav > li > a {
        margin: auto !important;
        line-height: unset !important;
    }
}

.navbar-brand {
    font-size: 20px;
    font-weight: 600;
    margin-left:15px;    
    display: flex;
    padding: 0 !important;
    justify-content: center;
    align-items: center;
    
}
.navbar-brand img {
    height:50%;
    
}

@media (min-width: 768px) {
    .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand {
        margin-right: 15px;
    }
}
@media (max-width: 1200px) {
    .navbar-nav>li>a {
        padding-left: 20px !important;
    }
}
button { font: inherit; }

#guide {
    height: calc(100dvh - 50px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.topbar {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    background: #0b3555;
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
}

.boat-icon { font-size: 25px; }

.icon-button,
.close-button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.icon-button {
    font-size: 26px;
    color: #fff;
}
#mapContainer {
    position: relative;
    width: 100%;
    flex: 1 1 auto;

    min-height: 0;

    overflow: hidden;
}

#riverMapContainer {
    width: 100%;
    height: 100%;
}


#riverMapContainer > svg {
    display: block;
    width: 100%;
    height: 100%;
}

.location-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #1769aa;
    box-shadow: 0 0 0 8px rgba(23,105,170,.20);
    display: none;
    z-index: 10;
}

.map-controls {
    position: absolute;
    right: 16px;
    bottom: 96px;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,.16);
}

.map-controls button {
    width: 44px;
    height: 44px;
    border: 0;
    border-bottom: 1px solid #ddd;
    background: #fff;
    color: #173e5d;
    font-size: 28px;
    cursor: pointer;
}

.gps-status {
    position: absolute;
    left: 16px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    background: rgba(255,255,255,.94);
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,.14);
    font-size: 13px;
    color: #34566e;
}

.gps-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f59e0b;
}

.gps-status.ok .gps-dot { background: #16a34a; }

.poi-sheet {
    position: absolute;
    z-index: 30;
    left: 50%;
    bottom: 18px;
    width: min(92vw, 470px);
    max-height: calc(100dvh - 105px);
    overflow: auto;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,.30);
}

.poi-sheet.hidden,


.poi-images {
    width: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    align-items:center;
}

.poi-images img {
    width: 100%;
    min-width: 100%;
    height: 220px;
    object-fit: contain;
    scroll-snap-align: start;
}

.poi-body {
    position: relative;
    padding: 18px 20px 20px;
}

.close-button {
    position: absolute;
    z-index: 2;
    right: 10px;
    top: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #153f5d;
    font-size: 30px;
    line-height: 30px;
}

.poi-type {
    display: inline-block;
    margin-bottom: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eaf2f8;
    color: #1769aa;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.poi-body h1 {
    margin: 0 0 10px;
    font-size: 25px;
    color: #143b5d;
}

.poi-content {
    font-size: 16px;
    line-height: 1.55;
    color: #394f5e;
    
}

.poi-coordinates {
    margin-top: 15px;
    color: #6b7f8d;
    font-size: 12px;
}

.nearby-poi {
    position: absolute;
    z-index: 25;
    left: 14px;
    right: 14px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 22px rgba(0,0,0,.20);
}

.nearby-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1769aa;
    color: #fff;
    font-size: 23px;
}

.nearby-text {
    min-width: 0;
    flex: 1;
}

.nearby-text small {
    display: block;
    color: #6a7b87;
    margin-bottom: 2px;
}

.nearby-text strong {
    display: block;
    color: #143b5d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#openNearby {
    border: 0;
    background: transparent;
    color: #1769aa;
    font-size: 30px;
    cursor: pointer;
}

@media (min-width: 700px) {
    .poi-sheet {
        bottom: 28px;
        left: auto;
        right: 28px;
        transform: none;
    }

    .nearby-poi {
        left: 28px;
        right: auto;
        width: 360px;
        bottom: 28px;
    }
}

#gpsDebugInfo{
    font-size:22px;
}
/* =========================================================
   POI PANEL
   ========================================================= */

.poi-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;

    width: 100%;

    /*
     * Collapsed height
     */
    flex: 0 0 27dvh;

    background: #fff;
    border-radius: 18px 18px 0 0;

    box-shadow:
        0 -4px 20px rgba(0, 0, 0, 0.18);

    overflow: visible;

    transition:
        height 0.3s ease,
        flex-basis 0.3s ease;

    z-index: 1000;

    /*
     * Important for nested flex layouts.
     */
    min-height: 0;
}


/* =========================================================
   TOGGLE
   ========================================================= */

.poi-toggle {
    position: absolute;
    top: -44px;
    right: 16px;

    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 8px 8px 0 0;

    background: #fff;

    box-shadow:
        0 -2px 8px rgba(0, 0, 0, 0.12);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 10;
    cursor: pointer;
}

.poi-chevron {
    display: block;
    font-size: 28px;
    line-height: 1;
}


/* =========================================================
   EXPANDED PANEL
   ========================================================= */

.poi-panel.expanded {
    /*
     * Take the available space left by the map.
     */
    flex: 0 0 auto;
    max-height: 85dvh;
    min-height: 40dvh;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   HEADER
   ========================================================= */

.poi-header {

    display: flex;

    align-items: center;

    padding:
        18px
        60px
        8px
        18px;

    /*
     * Header must never shrink.
     */
    flex:
        0 0 auto;
}

.poi-panel.expanded .poi-header{
    padding: 5px 20px;
}
.poi-panel.expanded .poi-header #poi-labelTitlePassed
, .poi-panel.expanded .poi-header #poi-labelTitleArrival
, .poi-panel.expanded .poi-header .poi-distance{
    font-size: 10px;
}
.poi-panel.expanded .poi-header #poiPanelTitle{
    font-size: 13px;
}

.poi-icon {

    flex: 0 0 auto;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 10px;

    border-radius: 50%;
    overflow: hidden;

    background: #eee;
}

.poi-icon img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.poi-heading {

    min-width: 0;

    display: flex;

    flex-direction: column;
}

.poi-heading small {

    font-size: 13px;

    color: #777;

    line-height: 1.2;
}

.poi-heading strong {

    font-size: 18px;

    line-height: 1.25;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.poi-distance {


    font-size: 13px;

    color: #666;
}


/* =========================================================
   COLLAPSED PREVIEW
   ========================================================= */

.poi-preview {

    display: flex;

    gap: 12px;

    padding:
        4px
        18px
        18px;

    min-height: 100px;

    flex:
        1 1 auto;

    min-width: 0;
}

.poi-preview-image {

    flex:
        0 0 100px;

    width: 100px;
    height: 100px;

    border-radius: 10px;

    overflow: hidden;

    background: #eee;
}

.poi-preview-image img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.poi-preview-text {

    position: relative;

    flex: 1;

    min-width: 0;

    padding-right: 28px;

    font-size: 14px;

    line-height: 1.45;

    overflow: hidden;
}

.poi-preview-content {

    display: -webkit-box;

    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.poi-read-more {

    position: absolute;

    right: 0;
    bottom: 0;

    border: 0;

    background: #fff;

    padding:
        0
        0
        0
        8px;

    font-size: 20px;

    line-height: 20px;

    cursor: pointer;
}


/* =========================================================
   EXPANDED CONTENT
   ========================================================= */
.poi-expanded {
    display: none;

    /*
     * Take all remaining space inside the panel
     * after the header.
     */
    flex: 1 1 auto;

    flex-direction: column;

    min-height: 0;

    overflow: hidden;
}

.poi-panel.expanded .poi-expanded {
    display: flex;
}

.poi-panel.expanded .poi-preview {
    display: none;
}


/* =========================================================
   IMAGE CAROUSEL
   ========================================================= */

.poi-images {

    /*
     * Fixed part of expanded panel.
     */
    flex:
        0 0 35dvh;

    width: 100%;

    min-height: 0;

    overflow-x: auto;
    overflow-y: hidden;

    display: flex;

    scroll-snap-type: x mandatory;

    background: #111;
}

.poi-images:empty {

    display: none;
}

.poi-image {

    flex:
        0 0 100%;

    width: 100%;
    height: 100%;

    scroll-snap-align: start;

    object-fit: cover;
}


/* =========================================================
   CONTENT
   ========================================================= */
.poi-scroll{
    overflow-y:scroll;
    padding-bottom: 65px;
}


.poi-content {
    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    max-height: none;

    padding: 10px;

    font-size: 16px;
    line-height: 1.55;

    color: #394f5e;
}

.poi-content h2 {

    margin:
        0
        0
        12px;

    font-size: 24px;

    line-height: 1.2;
}

.poi-full-content {

    font-size: 14px;
    text-align: justify;
    line-height: 1.55;
}


/* =========================================================
   PREVIOUS / NEXT
   ========================================================= */
.poi-navigation {
    flex:
        0 0 50px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    border-top:
        1px solid #c5c5c5;
    border-bottom:
        1px solid#c5c5c5;
    z-index: 10;
    width: 100%;
    bottom:0px;
    background:#fff;
    
}
.poi-navigation button {

    border: 0;

    background: transparent;

    font-size: 16px;

    padding: 8px;

    cursor: pointer;
}

.poi-navigation button:disabled {

    opacity: 0.3;

    cursor: default;
}

.poi-navigation button span {

    vertical-align: middle;
}

.poi-position {

    font-size: 13px;

    color: #777;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .poi-images {

        /*
         * Image area can be smaller on mobile.
         */
        flex-basis: 32dvh;
    }

    .poi-content h2 {

        font-size: 18px;
    }
}

.poi-expanded-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.poi-expanded-icon {
    /* flex: 0 0 48px; */
    /* width: 40px; */
    height: 21px;
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
    float: left;
    /* gap: 5px; */
    padding-right: 5px;
}

.poi-expanded-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.poi-expanded-heading #poiPanelExpandedTitle {
    flex: 1;
    min-width: 0;
    margin: 0;
}