/* Блок «Планировки»: планы 1 этажа и подвала, подсказки для телефона, статус квартиры.
   Отдельный файл, чтобы не трогать собранный main.min.css. */

/* ---------- Кнопки «1 этаж» / «Подвал» под фасадом ---------- */
.tengri-plans-extra {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1.5rem;
}
.tengri-plans-extra__label {
    font-family: "Pobeda", sans-serif;
    font-size: 1.375rem;
    line-height: 1;
    position: relative;
    top: 2px;
}
.tengri-plans-extra__buttons {
    display: flex;
    gap: 0.5rem;
}
.btn.tengri-plans-extra__btn {
    min-width: 120px;
}
.btn.tengri-plans-extra__btn.active {
    background: #b6612e;
    border-color: #b6612e;
    color: #fff;
}
html[data-color-scheme="dark"] .btn.tengri-plans-extra__btn {
    color: #2c3c3d;
    border-color: #2c3c3d;
}
html[data-color-scheme="dark"] .btn.tengri-plans-extra__btn:hover,
html[data-color-scheme="dark"] .btn.tengri-plans-extra__btn:focus,
html[data-color-scheme="dark"] .btn.tengri-plans-extra__btn.active {
    background: #2c3c3d;
    border-color: #2c3c3d;
    color: #fff;
}
@media screen and (max-width: 575.98px) {
    .tengri-plans-extra {
        flex-direction: column;
        gap: 0.75rem;
    }
    .tengri-plans-extra__buttons {
        width: 100%;
    }
    .btn.tengri-plans-extra__btn {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* ---------- План 1 этажа / подвала с помещениями ---------- */
#wholefloor [hidden] {
    display: none !important;
}
.tengri-whole-plan__scroll {
    position: relative;
}
.tengri-whole-plan__stage {
    position: relative;
}
.tengri-whole-plan__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0 auto;
}
.tengri-premises {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
/* Помещения слегка подсвечены, чтобы было понятно, что на них можно нажать */
#apartments .tengri-premise .svg-map__point {
    opacity: 0.07;
}
#apartments .tengri-premise:hover .svg-map__point,
#apartments .tengri-premise:focus-visible .svg-map__point {
    opacity: 0.4;
}
#apartments .tengri-premise .svg-map__point.active {
    opacity: 0.55;
}
#apartments .tengri-premise.is-reserved .svg-map__point {
    fill: #d6a342;
    opacity: 0.42;
}
#apartments .tengri-premise.is-sold .svg-map__point {
    fill: #8b9290;
    opacity: 0.55;
    cursor: not-allowed;
}
.tengri-premise:focus {
    outline: none;
}
.tengri-whole-plan__tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}
.tengri-whole-plan__hint {
    opacity: 0.6;
}
.tengri-whole-plan__hint--mobile {
    display: none;
}
.tengri-whole-plan__zoom {
    color: #b6612e;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: zoom-in;
}
html[data-color-scheme="dark"] .tengri-whole-plan__zoom {
    color: #e8bd62;
}

/* Список помещений под планом */
.tengri-premises-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}
.tengri-premises-list:empty {
    display: none;
}
.tengri-premises-list__btn {
    display: inline-flex;
    align-items: baseline;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid rgba(182, 97, 46, 0.45);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}
.tengri-premises-list__btn small {
    font-size: 0.75rem;
    opacity: 0.7;
}
.tengri-premises-list__btn.active {
    background: #b6612e;
    border-color: #b6612e;
    color: #fff;
}
/* Наведение только там, где есть мышь: на телефоне «залипшая» подсветка путала бы */
@media (hover: hover) {
    .tengri-premises-list__btn:hover:not(:disabled) {
        background: #b6612e;
        border-color: #b6612e;
        color: #fff;
    }
}
.tengri-premises-list__btn.is-reserved {
    border-color: rgba(214, 163, 66, 0.8);
}
.tengri-premises-list__btn:disabled {
    border-color: rgba(139, 146, 144, 0.5);
    background: transparent;
    color: inherit;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Карточка выбранного помещения */
.tengri-premise-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
    align-items: center;
    gap: 1rem 2rem;
    margin-top: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 24px;
    background: #fff;
}
html[data-color-scheme="dark"] .tengri-premise-card {
    background: #383838;
}
.tengri-premise-card__eyebrow {
    font-size: 0.875rem;
    opacity: 0.6;
}
.tengri-premise-card__title {
    margin: 0.125rem 0 0;
}
.tengri-premise-card__params {
    margin-bottom: 0;
}
.tengri-premise-card .interactive-map-apartment__status[hidden] {
    display: none;
}

.tengri-whole-plan__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 1.5rem;
}
.tengri-whole-plan__text {
    margin: 0;
    max-width: 640px;
}
.tengri-whole-plan__text:empty {
    display: none;
}
#wholefloor .interactive-map-floor {
    cursor: pointer;
}
@media screen and (max-width: 991.98px) {
    .tengri-premise-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }
    .tengri-premise-card__btn {
        width: 100%;
    }
}
@media screen and (max-width: 767.98px) {
    .interactive-map-floorplan-container.tengri-whole-plan {
        padding: 0.75rem;
        border-radius: 24px;
    }
    /* На телефоне план крупнее экрана и листается вбок — по помещениям можно попасть пальцем */
    .tengri-whole-plan__scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tengri-whole-plan__scroll::-webkit-scrollbar {
        display: none;
    }
    .tengri-whole-plan__stage {
        width: 900px;
    }
    .tengri-whole-plan__hint--desktop {
        display: none;
    }
    .tengri-whole-plan__hint--mobile {
        display: inline;
    }
    .tengri-premise-card {
        padding: 1rem 1.125rem;
    }
    .tengri-whole-plan__footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .tengri-whole-plan__btn {
        width: 100%;
    }
}

/* ---------- Статус квартиры в карточке ---------- */
.interactive-map-apartment__status {
    display: inline-flex;
    margin-top: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: rgba(214, 163, 66, 0.18);
    color: #8a5a12;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
}
html[data-color-scheme="dark"] .interactive-map-apartment__status {
    background: rgba(214, 163, 66, 0.22);
    color: #f0c879;
}

/* ---------- Телефон: выбор блока на фасаде ---------- */
.tengri-facade-blocks {
    display: none;
}
@media screen and (max-width: 991.98px) {
    .tengri-facade-blocks {
        position: sticky;
        left: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0 0 1rem;
    }
    .tengri-facade-blocks__label {
        font-family: "Pobeda", sans-serif;
        font-size: 1.5rem;
        line-height: 1;
        position: relative;
        top: 2px;
        margin-right: 0.25rem;
    }
    .tengri-facade-blocks__btn {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 100%;
        background: #838383;
        color: #fff;
        font-size: 1rem;
        font-weight: 500;
        line-height: 1;
        cursor: pointer;
        transition: background 0.25s ease-out;
    }
    .tengri-facade-blocks__btn.active {
        background: #b6612e;
    }
}

/* ---------- Телефон: планы этажей ---------- */
.tengri-swipe-hint {
    display: none;
}
@media screen and (max-width: 767.98px) {
    /* Планы блоков 1 и 4 помещаются в ширину экрана целиком */
    #floorplan .interactive-map-v1 {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    #floorplan .interactive-map-v1 .interactive-map__img {
        width: 100%;
    }
    /* Планы блоков 2 и 3 широкие и листаются вбок — подсказываем это */
    #floorplan .interactive-map-floorplan-container.is-wide + .tengri-swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.75rem;
        font-size: 0.875rem;
        opacity: 0.7;
    }
    #floorplan .interactive-map-floorplan-container.is-wide + .tengri-swipe-hint::before {
        content: "←";
    }
    #floorplan .interactive-map-floorplan-container.is-wide + .tengri-swipe-hint::after {
        content: "→";
    }
}

/* ---------- Цена в карточке квартиры: за м² крупно, полная стоимость мелко ---------- */
.interactive-map-apartment__params-row--small {
    margin-top: -0.375rem;
    font-size: 0.875rem;
    opacity: 0.7;
}
.interactive-map-apartment__params-row--small::before {
    top: -4px;
}
.interactive-map-apartment__payment-note {
    margin-top: -0.375rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    text-align: right;
    opacity: 0.65;
}

/* ---------- Первый экран: видео на фоне ---------- */
/* Если браузер не дал видео запуститься само (энергосбережение на iPhone, экономия трафика),
   он рисует поверх обложки свой значок «плей». Видео тут фоновое, кнопка не нужна — скрываем. */
/* Обложка лежит поверх видео и исчезает, только когда видео действительно играет */
.hero-video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.hero.is-video-playing .hero-video-poster {
    opacity: 0;
}
#heroVideo::-webkit-media-controls,
#heroVideo::-webkit-media-controls-panel,
#heroVideo::-webkit-media-controls-overlay-play-button,
#heroVideo::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0 !important;
}
