:root {
  --color-osnova: #e67e22;
  --color-ney: #34495e;
  --color-siniy: #004461;
  --color-tekst: #353535;
  --color-aktsent: #f39c12;
  --color-s-fon: #f0f0f0;
  --color-fon: #ffffff;
  --color-tfon: #454545;
  --color-vsr: #27ae60;
  --color-khr: #f1c40f;
  --color-sre: #95a5a6;
  --color-nir: #e74c3c;
}

/* ===== Модальное окно геолокации ===== */
.geo-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f0f0f0ea;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.night-on .geo-modal-overlay {
    background: #454545ea;
}
.geo-modal-overlay.active {
    display: flex;
}

.geo-modal {
    background: var(--color-fon);
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    animation: geoModalIn 0.3s ease-out;
}
.night-on .geo-modal {
    background: var(--color-tekst);
    color: var(--color-fon);
}
@keyframes geoModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.geo-modal-header {
    padding: 20px 25px 15px;
    position: relative;
}

.geo-modal-title {
    margin: 0;
    font-size: 120%;
    font-family: ProS, Helvetica, sans-serif;
    color: var(--color-tekst);
    text-align: center;
}
.night-on .geo-modal-title, .night-on .geo-question, .night-on .geo-city-name {
    color: var(--color-fon);
}
.night-on .geo-city-item:hover {
    background: var(--color-aktsent);
}
.night-on .geo-city-all {
    color: var(--color-khr);
}
.night-on .geo-city-all:hover {
    background: var(--color-tfon);
}
.geo-modal-body {
    padding: 20px 25px 25px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Секция с ближайшим городом */
.geo-nearest-section {
    text-align: center;
    margin-bottom: 20px;
}

.geo-question {
    font-size: 16px;
    color: var(--color-tekst);
    margin: 0 0 20px 0;
}

.geo-question strong {
    color: var(--color-osnova);
    font-family: ProS, Helvetica, sans-serif;
    font-size: 120%;
}
.geo-question strong:hover {
    cursor: pointer;
}
.geo-question svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    fill: var(--color-osnova);
    margin: 0 5px -1px 3px;
}

.geo-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.geo-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-family: ProS, Helvetica, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.geo-btn-primary {
    background: var(--color-khr);
    color: var(--color-tekst);
    font-family: ProS, Helvetica, sans-serif;
}

.geo-btn-primary:hover {
    background: var(--color-aktsent);
}

.geo-btn-secondary {
    background: var(--color-s-fon);
    color: var(--color-tekst);
    border: 1px solid var(--color-s-fon);
}

.geo-btn-secondary:hover {
    background: #e0e0e0;
    border-color: #e0e0e0;
}

/* Список городов */
.geo-cities-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    text-align: center;
}
.night-on .geo-cities-title {
    color: var(--color-khr);
}
.geo-cities-list {
    margin-top: 10px;
}

.geo-city-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--color-tekst);
    margin-bottom: 4px;
}

.geo-city-item:hover {
    background: var(--color-khr);
    text-decoration: none;
}

.geo-city-name {
    font-size: 15px;
    color: var(--color-tekst);
}

.geo-city-distance {
    font-size: 13px;
    color: var(--color-tekst);
    background: var(--color-s-fon);
    padding: 3px 10px;
    border-radius: 12px;
    font-family: ProS, Helvetica, sans-serif;
}

.geo-city-separator {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.geo-city-all {
    color: var(--color-siniy);
    font-family: ProB, Helvetica, sans-serif;
    justify-content: center;
}

.geo-city-all:hover {
    background: var(--color-s-fon);
    color: var(--color-siniy);
}

.geo-city-all .geo-city-name {
    color: var(--color-siniy);
}
.night-on .geo-city-all .geo-city-name {
    color: var(--color-khr);
}
.geo-modal-close {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: 0;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: 0.2s;
}

.geo-modal-close:hover {
    transform: scale(1.3);
    transition: 0.2s;
    cursor: pointer;
}

.geo-modal-close svg {
    min-width: 16px;
    width: 16px;
    height: 16px;
    fill: var(--color-nir);
}

/* Загрузка */
.geo-loading {
    text-align: center;
    padding: 20px;
}

.geo-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid var(--color-siniy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Переключатель городов в шапке ===== */
.cityselector {
    position: relative;
    display: inline-block;
}

.cityselector-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    min-width: 160px;
    justify-content: space-between;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--color-tekst);
}

.cityselector-current:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.city-name {
    font-family: ProS, Helvetica, sans-serif;
}

.city-arrow {
    transition: transform 0.3s;
    fill: #666;
}

.cityselector-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
}

.cityselector-dropdown.open {
    display: block;
    animation: dropdownIn 0.2s ease-out;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.city-option {
    display: block;
    padding: 10px 16px;
    color: var(--color-tekst);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}

.city-option:hover {
    background: #f5f5f5;
}

.city-option.active {
    background: #e3f2fd;
    color: #1976d2;
    font-family: ProS, Helvetica, sans-serif;
}

.city-dropdown-separator {
    height: 1px;
    background: #eee;
}

/* ===== Транспортные линии в карточке заведения ===== */
.city-transport {
    margin: 15px 0;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
}

.city-transport-title {
    font-size: 14px;
    font-family: ProB, Helvetica, sans-serif;
    color: var(--color-tekst);
    margin-bottom: 10px;
}

.transport-line {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--color-fon);
    border-left: 4px solid var(--line-color, #ccc);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.line-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.line-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.line-name {
    font-family: ProS, Helvetica, sans-serif;
    font-size: 13px;
    min-width: 120px;
}

.line-stations {
    font-size: 13px;
    color: #555;
    padding-left: 32px;
}

/* ===== Кнопка геолокации ===== */
.geo-manual-btn {
    width: 26px;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0px;
    padding: 0px;
    position: relative;
    background: transparent;
    border: 0px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-tekst);
    transition: all 0.2s;
}

.geo-manual-btn:hover .gorod-icon svg {
    fill: var(--color-nir);
}
.night-on .geo-manual-btn:hover .gorod-icon svg {
    fill: var(--color-khr);
}
.gorod-icon {
    width: auto;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.gorod-icon svg {
    width: 18px;
    margin-top: 1px;
    height: 17px;
    fill: var(--color-tekst);
}
.night-on .gorod-icon svg {
    fill: var(--color-fon);
}

/* ===== Адаптивность ===== */
@media (max-width: 576px) {
    .geo-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }
    
    .geo-modal-header {
        padding: 15px 20px 0;
    }
    
    .geo-modal-title {
        font-size: 18px;
    }
    
    .geo-modal-body {
        padding: 15px 20px 20px;
    }
    
    .geo-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .geo-city-item {
        padding: 10px 12px;
    }
    
    .cityselector-current {
        min-width: 140px;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .transport-line {
        padding: 8px 10px;
    }
    
    .line-name {
        min-width: 100px;
        font-size: 12px;
    }
    
    .line-stations {
        font-size: 12px;
        padding-left: 32px;
    }
}