/* ==========================================================
   KOSMODRIFT LIVE V18

   Уникальный ID: #kdb-live-v18.
   Старые стили #kdb-live-render-v9 к нему неприменимы.
   ========================================================== */

#kdb-live-v18,
#kdb-live-v18 *,
#kdb-live-v18 *::before,
#kdb-live-v18 *::after {
    box-sizing: border-box !important;
}

#kdb-live-v18 {
    position: absolute !important;
    top: 24px !important;
    left: 50% !important;
    right: auto !important;
    z-index: 40 !important;

    display: block !important;

    width: calc(100% - 36px) !important;
    max-width: 1880px !important;

    height: 94px !important;
    min-height: 94px !important;
    max-height: 94px !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: translateX(-50%) !important;

    border:
        1px solid rgba(69, 188, 229, 0.42) !important;

    border-radius: 0 !important;

    background:
        linear-gradient(
            108deg,
            rgba(2, 18, 30, 0.99) 0%,
            rgba(4, 29, 44, 0.98) 40%,
            rgba(24, 77, 99, 0.92) 100%
        ) !important;

    box-shadow:
        0 15px 35px rgba(0, 8, 15, 0.27) !important;

    color: #f4f8fb !important;

    overflow: hidden !important;
    isolation: isolate !important;
}

.kdb-live-v18__grid {
    display: grid !important;

    grid-template-columns:
        minmax(205px, 0.82fr)
        minmax(285px, 1.3fr)
        minmax(250px, 1fr)
        minmax(330px, 1.4fr) !important;

    grid-template-areas:
        "status current run previous" !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;
}

.kdb-live-v18__cell {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;

    min-width: 0 !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 13px 20px !important;

    border: 0 !important;
    border-right:
        1px solid rgba(79, 187, 226, 0.18) !important;

    background: transparent !important;

    overflow: hidden !important;
}

.kdb-live-v18__cell:last-child {
    border-right: 0 !important;
}

.kdb-live-v18__status {
    grid-area: status !important;

    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 9px !important;
    flex-wrap: wrap !important;
    align-content: center !important;
}

.kdb-live-v18__current {
    grid-area: current !important;
}

.kdb-live-v18__run {
    grid-area: run !important;
}

.kdb-live-v18__previous {
    grid-area: previous !important;
}

.kdb-live-v18__dot {
    display: block !important;

    width: 12px !important;
    height: 12px !important;

    flex: 0 0 12px !important;

    border-radius: 50% !important;

    background: #f02d63 !important;

    box-shadow:
        0 0 0 5px rgba(240, 45, 99, 0.12),
        0 0 14px rgba(240, 45, 99, 0.58) !important;
}

.kdb-live-v18__dot--idle {
    background: #6d8493 !important;

    box-shadow:
        0 0 0 5px rgba(109, 132, 147, 0.12) !important;
}

.kdb-live-v18__word {
    display: block !important;

    flex: 0 0 auto !important;

    margin: 0 !important;

    color: #ffffff !important;

    font-family: "Oswald", sans-serif !important;
    font-size: 28px !important;
    font-weight: 750 !important;
    font-style: italic !important;
    line-height: 1 !important;

    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.kdb-live-v18__division {
    display: block !important;

    min-width: 0 !important;
    margin: 0 !important;

    color: #9cafbd !important;

    font-family: "Oswald", sans-serif !important;

    text-transform: uppercase !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;

    /*
     * KDB LIVE PHASE TYPOGRAPHY V18.6
     *
     * Было:
     *   desktop 11px
     *   mobile   9px
     *
     * Теперь один responsive размер.
     */
    font-size:
        clamp(
            12px,
            0.95vw,
            15px
        ) !important;

    font-weight:
        780 !important;

    line-height:
        1.05 !important;

    letter-spacing:
        0.025em !important;

    /* Keep the phase legible: LIVE stays on line one, phase on line two. */
    flex: 0 0 calc(100% - 21px) !important;
    margin-left: 21px !important;

}

.kdb-live-v18__label {
    display: block !important;

    margin: 0 0 5px !important;
    padding: 0 !important;

    color: #8fa6b5 !important;

    font-family: "Golos Text", sans-serif !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    line-height: 1.12 !important;
    letter-spacing: 0.09em !important;

    text-transform: uppercase !important;
    white-space: normal !important;
}

.kdb-live-v18__value {
    display: block !important;

    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #f5f8fa !important;

    font-family: "Oswald", sans-serif !important;
    font-size: 17px !important;
    font-weight: 650 !important;
    line-height: 1.16 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.kdb-live-v18__run .kdb-live-v18__value {
    font-size: 15px !important;
}

.kdb-live-v18__connection {
    position: absolute !important;
    right: 8px !important;
    bottom: 7px !important;

    display: block !important;

    width: 6px !important;
    height: 6px !important;

    border-radius: 50% !important;

    background: #35c57a !important;
    opacity: 0.75 !important;
}

#kdb-live-v18[data-connection="error"]
.kdb-live-v18__connection {
    background: #ef526b !important;
}

@media (max-width: 820px) {
    #kdb-live-v18 {
        top: 20px !important;

        /* Align the LIVE panel with the full-width mobile track and grid blocks.
           Its border remains the visual edge, so no extra side gutters are needed. */
        width: 100% !important;

        height: 219px !important;
        min-height: 219px !important;
        max-height: 219px !important;
    }

    .kdb-live-v18__grid {
        grid-template-columns:
            minmax(0, 50%)
            minmax(0, 50%) !important;

        grid-template-rows:
            43px
            66px
            67px
            43px !important;

        grid-template-areas:
            "status status"
            "current run"
            "previous previous" !important;
    }

    .kdb-live-v18__cell {
        padding: 9px 11px !important;
    }

    .kdb-live-v18__status {
        border-right: 0 !important;

        border-bottom:
            1px solid rgba(79, 187, 226, 0.18) !important;
    }

    .kdb-live-v18__current {
        border-right:
            1px solid rgba(79, 187, 226, 0.18) !important;

        border-bottom:
            1px solid rgba(79, 187, 226, 0.18) !important;
    }

    .kdb-live-v18__run {
        border-right: 0 !important;

        border-bottom:
            1px solid rgba(79, 187, 226, 0.18) !important;

        background:
            linear-gradient(
                145deg,
                rgba(31, 88, 112, 0.13),
                rgba(4, 27, 42, 0.02)
            ) !important;
    }

    .kdb-live-v18__previous {
        border-right: 0 !important;
    }

    .kdb-live-v18__word {
        font-size: 23px !important;
    }

    

    .kdb-live-v18__label {
        margin-bottom: 4px !important;

        font-size: 8px !important;
        line-height: 1.1 !important;
    }

    .kdb-live-v18__value {
        font-size: 14px !important;
        line-height: 1.16 !important;
    }

    .kdb-live-v18__run .kdb-live-v18__value {
        font-size: 13px !important;
        line-height: 1.18 !important;
    }
}

@media (max-width: 390px) {
    #kdb-live-v18 {
        width: 100% !important;
    }

    .kdb-live-v18__cell {
        padding-right: 9px !important;
        padding-left: 9px !important;
    }

    .kdb-live-v18__value {
        font-size: 13px !important;
    }

    .kdb-live-v18__run .kdb-live-v18__value {
        font-size: 12px !important;
    }
}

/* HOME LIVE weather contract: desktop uses the separate weather tower;
   only mobile gets the compact copy inside upper LIVE. */
#kdb-live-v18 .kdb-live-v2__weather {
    display: none !important;
}

@media (max-width: 820px) {
    #kdb-live-v18 .kdb-live-v2__weather {
        display: grid !important;
        grid-column: 1 / -1 !important;
        min-width: 0 !important;
        height: 100% !important;
        padding: 7px 10px !important;
        grid-template-columns: 28px minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 7px !important;
        border-top: 1px solid rgba(79, 187, 226, 0.18) !important;
        background: rgba(74, 217, 255, 0.05) !important;
        overflow: hidden !important;
    }
}
