/* =========================
   BASIC PAGE
   ========================= */

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

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: #111;

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


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

#map {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: #111;
}


/* =========================
   MAPTILER
   ========================= */

/*
   Remove default MapTiler UI
   that we don't need.
*/

.maplibregl-ctrl-top-right,
.maplibregl-ctrl-top-left,
.maplibregl-ctrl-bottom-left {
    display: none;
}


/*
   Keep MapTiler attribution
   subtle but visible.
*/

.maplibregl-ctrl-bottom-right {
    opacity: 0.35;

    font-size: 8px;

    padding: 2px 4px;
}


/* =========================
   USER LIGHT MARKER
   ========================= */

/*
   Your own location.

   This is intentionally larger
   than the other users' lights.
*/

.user-light-marker {
    width: 24px;
    height: 24px;

    background: #fff;

    border: 3px solid #000;

    border-radius: 50%;

    box-sizing: border-box;

    pointer-events: none;
}


/* =========================
   OTHER LIGHT MARKERS
   ========================= */

/*
   Other people who currently
   have their Light turned on.
*/

.other-light-marker {
    width: 12px;
    height: 12px;

    background: #fff;

    border: 2px solid #000;

    border-radius: 50%;

    box-sizing: border-box;

    pointer-events: none;
}


/* =========================
   MAIN LIGHT BUTTON
   ========================= */

#lightButton {
    position: fixed;

    left: 50%;
    bottom: 32px;

    transform: translateX(-50%);

    width: 100px;
    height: 100px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: #000;

    color: #fff;

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

    letter-spacing: 1px;

    cursor: pointer;

    z-index: 1000;

    /*
       Prevent the browser from
       highlighting/selecting the button.
    */

    user-select: none;
    -webkit-user-select: none;

    /*
       Prevent mobile browsers from
       adding their own tap highlight.
    */

    -webkit-tap-highlight-color: transparent;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border 0.2s ease,
        transform 0.2s ease;
}


/* =========================
   LIGHT BUTTON — ON
   ========================= */

#lightButton.active {
    background: #fff;

    color: #000;

    border: 2px solid #000;
}


/* =========================
   LIGHT BUTTON — PRESS
   ========================= */

#lightButton:active {
    transform:
        translateX(-50%)
        scale(0.94);
}


/* =========================
   STATUS MESSAGE
   ========================= */

#status {
    position: fixed;

    top: 20px;
    left: 50%;

    transform: translateX(-50%);

    padding: 8px 14px;

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

    color: #000;

    border-radius: 20px;

    font-size: 13px;

    z-index: 1000;

    display: none;

    box-shadow:
        0 2px 10px
        rgba(0, 0, 0, 0.15);

    /*
       Make sure long status messages
       don't create a huge bubble.
    */

    max-width: calc(100% - 40px);

    box-sizing: border-box;

    text-align: center;

    white-space: nowrap;
}


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

@media (max-width: 600px) {

    #lightButton {
        width: 90px;
        height: 90px;

        bottom: 25px;

        font-size: 16px;
    }


    #status {
        top: 15px;

        font-size: 12px;
    }


    /*
       Slightly smaller personal
       light on small screens.
    */

    .user-light-marker {
        width: 22px;
        height: 22px;
    }


    .other-light-marker {
        width: 11px;
        height: 11px;
    }
}