/**
 * Gas Impex Core — Popup цен на газ (тёмная тема)
 */

/* ── Оверлей ───────────────────────────────────────────────── */
.gi-prices-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gi-prices-overlay.gi-active {
    opacity: 1;
    visibility: visible;
}

/* ── Popup-панель ──────────────────────────────────────────── */
.gi-prices-popup {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    height: 100dvh;
    background: #0d0d0d;
    border-left: 1px solid #1e1e1e;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Onest', sans-serif;
    color: #fff;
}

.gi-prices-popup.gi-active {
    transform: translateX(0);
}

/* ── Шапка ─────────────────────────────────────────────────── */
.gi-prices-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.gi-prices-popup-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Geologica', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.gi-prices-popup-title svg {
    width: 20px;
    height: 20px;
    stroke: var(--gi-red);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gi-prices-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0 !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.gi-prices-close:hover {
    background: rgba(var(--gi-red-rgb), 0.1);
    border-color: rgba(var(--gi-red-rgb), 0.25);
}

.gi-prices-close svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s ease;
}

.gi-prices-close:hover svg {
    stroke: var(--gi-red);
}

/* ── Тело ──────────────────────────────────────────────────── */
.gi-prices-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    scrollbar-width: thin;
    scrollbar-color: #222 transparent;
}

.gi-prices-popup-body::-webkit-scrollbar {
    width: 4px;
}
.gi-prices-popup-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.gi-prices-empty {
    text-align: center;
    padding: 48px 16px;
    color: #555;
    font-size: 14px;
}

/* ── Блок города ───────────────────────────────────────────── */
.gi-prices-city-block {
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.gi-prices-city-block[data-open="true"] {
    border-color: rgba(var(--gi-blue-rgb), 0.2);
}

/* Шапка города */
.gi-prices-city-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: #111;
    transition: background 0.2s ease;
}

.gi-prices-city-head:hover {
    background: #151515;
}

.gi-prices-city-name {
    font-family: 'Geologica', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    flex: 1;
}

.gi-prices-city-val {
    font-family: 'Geologica', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--gi-red);
    white-space: nowrap;
}

.gi-prices-city-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gi-prices-city-arrow svg {
    width: 14px;
    height: 14px;
    stroke: #555;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.gi-prices-city-block[data-open="true"] .gi-prices-city-arrow svg {
    transform: rotate(180deg);
    stroke: var(--gi-blue);
}

/* Список станций */
.gi-prices-city-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

/* Отдельная строка станции */
.gi-prices-station-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid #141414;
    overflow: hidden;
}

.gi-prices-station-row:last-child {
    padding-bottom: 14px;
}

.gi-prices-st-name {
    font-size: 12.5px;
    color: #888;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.gi-prices-st-val {
    font-size: 13px;
    font-weight: 600;
    color: #ddd;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Подвал ────────────────────────────────────────────────── */
.gi-prices-popup-foot {
    padding: 14px 20px;
    border-top: 1px solid #1a1a1a;
    font-size: 11px;
    color: #444;
    text-align: center;
    flex-shrink: 0;
}

/* ── Адаптив ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .gi-prices-popup {
        width: 100vw;
        max-width: 100vw;
        border-left: none;
    }
}

/* ── Блокировка скролла body ───────────────────────────────── */
body.gi-prices-open {
    overflow: hidden;
}
