html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: #263d19;
}

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

#header {

    position: absolute;

    left: 0;
    top: 0;
    right: 0;

    height: 44px;

    background: #263d19;

    color: white;

    display: flex;

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

    font-size: 18px;
    font-weight: 600;

    z-index: 20;
}

/* ============================================================
   MAP
   ============================================================ */

#map-container {

    position: absolute;

    left: 0;
    top: 44px;
    right: 0;
    bottom: 52px;

    overflow: hidden;

    background: #263d19;

    touch-action: none;
}


#map-image {

    position: absolute;

    left: 0;
    top: 0;

    transform-origin: 0 0;

    user-select: none;

    -webkit-user-select: none;

    -webkit-user-drag: none;

    pointer-events: none;
}


/* ============================================================
   GPS POSITION MARKER
   ============================================================ */

#position-marker {

    position: absolute;

    width: 24px;
    height: 24px;

    margin-left: -12px;
    margin-top: -12px;

    border-radius: 50%;

    background:
        rgba(255, 0, 0, 0.60);

    border:
        2px solid
        rgba(255, 255, 255, 0.95);

    box-sizing: border-box;

    z-index: 10;

    display: none;

    pointer-events: none;
}


/* ============================================================
   GPS ACCURACY CIRCLE
   ============================================================ */

#accuracy-circle {

    position: absolute;

    border-radius: 50%;

    background:
        rgba(0, 120, 255, 0.15);

    border:
        1px solid
        rgba(0, 100, 255, 0.45);

    box-sizing: border-box;

    transform:
        translate(-50%, -50%);

    z-index: 8;

    pointer-events: none;

    display: none;
}


/* ============================================================
   BOTTOM CONTROLS
   ============================================================ */

#controls {

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 52px;

    background:
        rgba(255, 255, 255, 0.95);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 6px 8px;

    box-sizing: border-box;

    z-index: 20;

    box-shadow:
        0 -1px 5px
        rgba(0, 0, 0, 0.20);
}


/* ============================================================
   GPS BUTTON
   ============================================================ */

#gps-button {
    height: 40px;
    min-width: 0;
    padding: 0 10px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #888;
    border-radius: 6px;
    background: #cccccc;
    color: #222;
    box-sizing: border-box;
    white-space: nowrap;
    touch-action: manipulation;
    text-align: center;
}


#gps-button:active {
    background: #d5d5d5;
}


/* ============================================================
   POINTS OF INTEREST BUTTON
   ============================================================ */

#poi-button {
    height: 40px;
    min-width: 0;
    margin-left: 8px;
    padding: 0 10px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #888;
    border-radius: 6px;
    background: #cccccc;
    color: #222;
    box-sizing: border-box;
    white-space: nowrap;
    touch-action: manipulation;
    text-align: center;    
}


#poi-button:active {
    background: #d5d5d5;
}


#poi-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 9;
}

/* ============================================================
   POINTS OF INTEREST PINS
   ============================================================ */

.poi-pin {
    position: absolute;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    margin-top: -28px;

    background: #d22;
    border: 2px solid white;
    border-radius: 50% 50% 50% 0;

    transform: rotate(-45deg);

    box-shadow:
        0 1px 4px
        rgba(0, 0, 0, 0.45);

    z-index: 9;

    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
}


/*
 * The centre of the pin.
 */
.poi-pin::after {
    content: "";
    position: absolute;

    width: 9px;
    height: 9px;

    left: 7px;
    top: 7px;

    background: white;
    border-radius: 50%;
}


/* ============================================================
   POINTS OF INTEREST POPUP
   ============================================================ */

#poi-popup {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    width: 90vw;
    max-height: 80vh;

    background: white;

    padding: 20px;

    box-sizing: border-box;

    z-index: 100;

    display: none;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

/* ============================================================
   POI POPUP CLOSE BUTTON
   ============================================================ */

#poi-close {
    position: absolute;

    right: 8px;
    top: 8px;

    width: 36px;
    height: 36px;

    padding: 0;

    font-size: 26px;
    line-height: 32px;

    border: none;
    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.90);

    color: #333;

    z-index: 2;

    touch-action: manipulation;
}


#poi-close:active {
    background: #ddd;
}


/* ============================================================
   POI POPUP IMAGE
   ============================================================ */

#poi-image {
    display: none;

    width: 100%;
    height: auto;

    max-height: 400px;

    object-fit: contain;
}

/* ============================================================
   POI POPUP TEXT
   ============================================================ */

#poi-title {
    margin:
        4px 40px
        8px 4px;

    font-size: 22px;
    line-height: 1.2;
}


#poi-text {
    margin:
        0 4px
        6px 4px;

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

    white-space: pre-line;

}

/* ============================================================
   ZOOM BUTTONS
   ============================================================ */

#zoom-controls {

    position: absolute;

    right: 12px;
    top: 12px;

    z-index: 30;

    display: flex;

    flex-direction: column;

    gap: 6px;
}


#zoom-controls button {

    width: 44px;
    height: 44px;

    padding: 0;

    font-size: 28px;

    line-height: 40px;

    background:
        rgba(255, 255, 255, 0.90);

    border:
        1px solid #777;

    border-radius: 6px;

    box-shadow:
        0 1px 4px
        rgba(0, 0, 0, 0.35);

    touch-action: manipulation;
}


#zoom-controls button:active {

    background: #ddd;
}


#gps-status {
    margin-left: 10px;

    font-size: 14px;

    color: #555;

    white-space: nowrap;
}
