* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

body {
    background: #0B6E4F;
}


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

.mosques-page {
    position: relative;

    width: 100%;
    height: 100dvh;

    overflow: hidden;

    background: #dfe8e2;
}


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

.map {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 1;
}


/* =========================================================
   IQranix BORDER
========================================================= */

.iqranix-border {
    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 50;

    border: 3px solid #0B6E4F;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.65),
        inset 0 0 35px rgba(11,110,79,.12);
}


/* =========================================================
   TOP BAR
========================================================= */

.top-bar {
    position: absolute;

    top: max(12px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;

    height: 62px;

    z-index: 20;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 8px;

    border-radius: 20px;

    background:
        rgba(255,255,255,.94);

    backdrop-filter: blur(20px);

    -webkit-backdrop-filter: blur(20px);

    box-shadow:
        0 10px 30px rgba(0,0,0,.16);

    border:
        1px solid rgba(11,110,79,.13);
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    flex: 1;

    display: flex;

    align-items: center;

    gap: 9px;
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    color: white;

    background:
        linear-gradient(
            145deg,
            #0B6E4F,
            #064a36
        );

    box-shadow:
        0 6px 15px rgba(11,110,79,.28);

    font-size: 20px;
}

.brand h1 {
    color: #0B6E4F;

    font-size: 16px;

    font-weight: 900;
}

.brand p {
    margin-top: 2px;

    color: #77847e;

    font-size: 10px;

    font-weight: 600;
}


/* =========================================================
   ICON BUTTONS
========================================================= */

.icon-button {
    width: 43px;
    height: 43px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border: none;

    border-radius: 14px;

    background: #f2f6f3;

    color: #0B6E4F;

    font-size: 27px;

    cursor: pointer;

    transition:
        transform .15s ease,
        background .15s ease;
}

.icon-button:active {
    transform: scale(.91);
}

#backButton {
    color: #25322d;

    font-size: 34px;

    line-height: 1;
}


/* =========================================================
   SEARCH
========================================================= */

.search-panel {
    position: absolute;

    top: 86px;

    left: 12px;
    right: 12px;

    z-index: 20;
}

.search-box {
    height: 52px;

    display: flex;

    align-items: center;

    padding: 0 14px;

    border-radius: 18px;

    background:
        rgba(255,255,255,.96);

    backdrop-filter: blur(20px);

    box-shadow:
        0 9px 27px rgba(0,0,0,.14);

    border:
        1px solid rgba(11,110,79,.13);
}

.search-symbol {
    margin-right: 9px;

    font-size: 19px;
}

.search-box input {
    flex: 1;

    min-width: 0;

    height: 100%;

    border: none;

    outline: none;

    background: transparent;

    color: #17221d;

    font-size: 14px;
}

.search-box input::placeholder {
    color: #8b9690;
}

.clear-button {
    width: 28px;
    height: 28px;

    border: none;

    border-radius: 50%;

    background: #eaf1ed;

    color: #0B6E4F;

    font-size: 20px;
}


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

.status-message {
    position: absolute;

    top: 148px;

    left: 50%;

    transform: translateX(-50%);

    z-index: 15;

    padding: 8px 14px;

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

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    border-radius: 30px;

    background:
        rgba(11,110,79,.94);

    color: white;

    box-shadow:
        0 7px 18px rgba(0,0,0,.18);

    font-size: 10px;

    font-weight: 800;
}


/* =========================================================
   PIN MODE
========================================================= */

.pin-mode-message {
    position: absolute;

    top: 150px;

    left: 12px;
    right: 12px;

    z-index: 30;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 11px;

    border-radius: 17px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #0B6E4F,
            #064a36
        );

    box-shadow:
        0 12px 30px rgba(0,0,0,.25);
}

.pin-mode-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: rgba(255,255,255,.14);
}

.pin-mode-text {
    min-width: 0;

    flex: 1;
}

.pin-mode-text strong {
    display: block;

    font-size: 12px;
}

.pin-mode-text span {
    display: block;

    margin-top: 2px;

    font-size: 9px;

    opacity: .82;
}

.cancel-pin {
    border: none;

    padding: 8px 10px;

    border-radius: 10px;

    background: rgba(255,255,255,.15);

    color: white;

    font-size: 10px;

    font-weight: 800;
}


/* =========================================================
   MOSQUE INFO
========================================================= */

.mosque-info {
    position: absolute;

    left: 12px;
    right: 12px;

    bottom: 94px;

    z-index: 30;

    display: flex;

    gap: 12px;

    padding: 15px;

    border-radius: 22px;

    background:
        rgba(255,255,255,.97);

    backdrop-filter: blur(20px);

    box-shadow:
        0 15px 40px rgba(0,0,0,.22);

    border:
        1px solid rgba(11,110,79,.13);
}

.mosque-info-icon {
    width: 50px;
    height: 50px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 16px;

    background: #e7f3ed;

    font-size: 24px;
}

.mosque-info-content {
    min-width: 0;

    flex: 1;
}

.info-label {
    color: #0B6E4F;

    font-size: 8px;

    font-weight: 900;

    letter-spacing: 1.5px;
}

.mosque-info h2 {
    margin-top: 3px;

    color: #17221d;

    font-size: 16px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.mosque-info p {
    margin-top: 4px;

    color: #748078;

    font-size: 10px;

    line-height: 1.4;
}

.distance {
    color: #0B6E4F !important;

    font-weight: 800;
}

.close-info {
    position: absolute;

    top: 8px;
    right: 9px;

    width: 27px;
    height: 27px;

    border: none;

    border-radius: 50%;

    background: #edf2ef;

    color: #52605a;

    font-size: 19px;
}


/* =========================================================
   ACTIONS
========================================================= */

.info-actions {
    display: flex;

    gap: 8px;

    margin-top: 10px;
}

.primary-action,
.secondary-action {
    border: none;

    padding: 9px 12px;

    border-radius: 10px;

    font-size: 10px;

    font-weight: 800;
}

.primary-action {
    background: #0B6E4F;

    color: white;
}

.secondary-action {
    background: #eaf1ed;

    color: #0B6E4F;
}


/* =========================================================
   PIN PANEL
========================================================= */

.pin-panel {
    position: absolute;

    left: 12px;
    right: 12px;

    bottom: 92px;

    z-index: 40;

    padding: 18px;

    border-radius: 23px;

    background:
        rgba(255,255,255,.98);

    box-shadow:
        0 20px 50px rgba(0,0,0,.27);
}

.panel-header {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    margin-bottom: 14px;
}

.panel-label {
    color: #0B6E4F;

    font-size: 8px;

    font-weight: 900;

    letter-spacing: 1.5px;
}

.panel-header h2 {
    margin-top: 4px;

    color: #17221d;

    font-size: 18px;
}

.panel-close {
    width: 30px;
    height: 30px;

    border: none;

    border-radius: 50%;

    background: #edf2ef;

    color: #52605a;

    font-size: 20px;
}

.pin-panel label {
    display: block;

    margin: 9px 0 5px;

    color: #52605a;

    font-size: 10px;

    font-weight: 800;
}

.pin-panel input,
.pin-panel textarea {
    width: 100%;

    border: 1px solid #dce5e0;

    outline: none;

    border-radius: 12px;

    background: #f8faf9;

    color: #17221d;

    padding: 11px;

    font-family: inherit;

    font-size: 12px;
}

.pin-panel textarea {
    height: 62px;

    resize: none;
}

.pin-panel input:focus,
.pin-panel textarea:focus {
    border-color: #0B6E4F;

    background: white;
}

.coordinates-box {
    display: grid;

    grid-template-columns: auto 1fr;

    gap: 4px 10px;

    margin-top: 10px;

    padding: 10px;

    border-radius: 12px;

    background: #edf5f1;

    font-size: 9px;

    color: #718079;
}

.coordinates-box strong {
    color: #0B6E4F;

    font-size: 10px;
}

.save-pin-button {
    width: 100%;

    margin-top: 11px;

    padding: 13px;

    border: none;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #0B6E4F,
            #064a36
        );

    color: white;

    font-size: 12px;

    font-weight: 900;
}


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

.bottom-controls {
    position: absolute;

    left: 12px;
    right: 12px;

    bottom: max(12px, env(safe-area-inset-bottom));

    height: 67px;

    z-index: 20;

    display: flex;

    align-items: center;

    border-radius: 21px;

    background:
        rgba(255,255,255,.96);

    backdrop-filter: blur(20px);

    box-shadow:
        0 12px 35px rgba(0,0,0,.18);

    border:
        1px solid rgba(11,110,79,.14);
}

.bottom-button {
    flex: 1;

    height: 58px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 3px;

    border: none;

    background: transparent;

    color: #78857f;

    cursor: pointer;
}

.bottom-button span {
    font-size: 19px;
}

.bottom-button small {
    font-size: 8px;

    font-weight: 800;
}

.bottom-button.active {
    color: #0B6E4F;
}

.pin-button {
    color: #0B6E4F;
}


/* =========================================================
   LOADING
========================================================= */

.loading-overlay {
    position: absolute;

    inset: 0;

    z-index: 100;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 8px;

    background:
        linear-gradient(
            145deg,
            #0B6E4F,
            #063f2e
        );

    color: white;

    transition:
        opacity .35s ease,
        visibility .35s ease;
}

.loading-overlay.hidden {
    opacity: 0;

    visibility: hidden;

    pointer-events: none;
}

.loading-overlay strong {
    font-size: 17px;
}

.loading-overlay span {
    font-size: 10px;

    opacity: .75;
}

.loader {
    width: 42px;
    height: 42px;

    border: 4px solid rgba(255,255,255,.25);

    border-top-color: white;

    border-radius: 50%;

    animation:
        spin .8s linear infinite;
}

@keyframes spin {

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   HIDDEN
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   GOOGLE MAP OVERRIDES
========================================================= */

.gm-style-iw-c {
    border-radius: 15px !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
}


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

@media (max-width: 380px) {

    .brand h1 {
        font-size: 15px;
    }

    .brand p {
        font-size: 9px;
    }

    .search-panel {
        top: 82px;
    }

    .status-message {
        top: 143px;
    }

}


/* =========================================================
   PRINT
========================================================= */

@media print {

    .top-bar,
    .search-panel,
    .status-message,
    .pin-mode-message,
    .mosque-info,
    .pin-panel,
    .bottom-controls,
    .iqranix-border,
    .loading-overlay {
        display: none !important;
    }

    .map {
        position: static;

        width: 100vw;

        height: 100vh;
    }

}