﻿/* =========================================================
   GEO NAVIGATION
   ========================================================= */

.geo-navigation {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 240px;
    z-index: 1050;
    background: #ffc107a6;
    border: 0px solid rgba(0, 0, 0, 0.10);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: visible;
}


/* =========================================================
   HEADER — "Міста"
   ========================================================= */

.geo-navigation__header {
    position: relative;
    padding: 12px 15px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

    .geo-navigation__header:hover {
        background: rgba(0, 0, 0, 0.045);
    }

.geo-navigation__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.geo-navigation__header-arrow {
    font-size: 20px;
    line-height: 1;
    opacity: 0.45;
    transition: transform 0.2s ease;
}


/* Стрелка заголовка */

.geo-navigation.is-open .geo-navigation__header-arrow {
    transform: rotate(90deg);
}


/* =========================================================
   COUNTRIES
   ========================================================= */

.geo-navigation__countries {
    display: none;
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: 100%;
    max-height: 62vh;
    overflow-y: auto;
    background: rgb(237 237 237);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}


/* Открытие списка стран */

.geo-navigation.is-open .geo-navigation__countries {
    display: block;
}


/* =========================================================
   COUNTRY
   ========================================================= */

.geo-navigation__country {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

    .geo-navigation__country:last-child {
        border-bottom: none;
    }


/* =========================================================
   COUNTRY LINK
   ========================================================= */

.geo-navigation__country-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .geo-navigation__country-link:hover {
        background: rgba(0, 0, 0, 0.045);
    }

.geo-navigation__country-name {
    font-weight: 500;
}

.geo-navigation__country-arrow {
    font-size: 20px;
    line-height: 1;
    opacity: 0.45;
    transition: transform 0.2s ease;
}


/* =========================================================
   CITIES
   ========================================================= */

.geo-navigation__cities {
    display: none;
    padding: 0 15px 10px 28px;
}


/* Открытие городов */

.geo-navigation__country.is-open .geo-navigation__cities {
    display: block;
}


/* Стрелка страны */

.geo-navigation__country.is-open .geo-navigation__country-arrow {
    transform: rotate(90deg);
}


/* =========================================================
   CITY
   ========================================================= */

.geo-navigation__city {
    display: block;
    padding: 5px 0;
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.82;
    transition: opacity 0.15s ease;
}

    .geo-navigation__city:hover {
        opacity: 1;
        text-decoration: underline;
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 798px) {

    .geo-navigation {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
        background: #a8a8a8e3;
    }


    /* -----------------------------------------------------
       HEADER
       ----------------------------------------------------- */

    .geo-navigation__header {
        padding: 14px 18px;
        border-radius: 0;
    }


    /* -----------------------------------------------------
       COUNTRIES
       ----------------------------------------------------- */

    .geo-navigation__countries {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        max-height: 70vh;
        overflow-y: auto;
        background: rgb(228 228 228);
        border: 0px solid rgba(0, 0, 0, 0.10);
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
    }


    /* -----------------------------------------------------
       COUNTRY
       ----------------------------------------------------- */

    .geo-navigation__country-link {
        padding: 13px 18px;
    }


    /* -----------------------------------------------------
       CITIES
       ----------------------------------------------------- */

    .geo-navigation__cities {
        padding: 0 18px 10px 32px;
    }

    .geo-navigation__city {
        padding: 7px 0;
    }
}
