/* ——— Шахматка (chess-2026) ——— */

.chess-2026 {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--color-neutral-900);
}

.chess-2026__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.chess-2026__head {
    display: flex;
    align-items: center;
    gap: 80px;
    padding-left: 8px;
    font-size: 12px;
    line-height: 16px;
    color: var(--color-neutral-500);
}

.chess-2026__head-floor {
    flex: 0 0 40px;
    text-align: right;
}

.chess-2026__head-price {
    white-space: nowrap;
}

.chess-2026__grid-wrap {
    position: relative;
    min-width: 0;
}

.chess-2026__grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.chess-2026__grid::-webkit-scrollbar {
    display: none;
}

.chess-2026__row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
}

.chess-2026__floor-num {
    flex: 0 0 40px;
    text-align: right;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    color: var(--color-neutral-500);
}

.chess-2026__cells {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}

.chess-2026__cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 71.5px;
    width: 71.5px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chess-2026__cell--available {
    padding: 0;
    cursor: pointer;
    background-color: var(--color-neutral-0);
    border-color: var(--color-neutral-200);
    color: var(--color-neutral-900);
}

.chess-2026__cell--available:hover {
    border-color: var(--color-neutral-300);
}

.chess-2026__cell--available.is-active {
    background-color: var(--color-red-500);
    border-color: var(--color-red-500);
    color: var(--color-neutral-0);
}

.chess-2026__cell--available.is-filter-hidden {
    background-color: var(--color-neutral-50);
    border-color: transparent;
    pointer-events: none;
}

.chess-2026__cell--available.is-filter-hidden .chess-2026__cell-price {
    visibility: hidden;
}

.chess-2026__cell-price {
    white-space: nowrap;
}

.chess-2026__cell--sold {
    background-color: var(--color-neutral-100);
    border-color: transparent;
}

.chess-2026__cell--empty {
    background-color: var(--color-neutral-50);
    border-color: transparent;
}

.chess-2026__cell--booked {
    background-color: var(--color-neutral-200);
    border-color: transparent;
}

.chess-2026__cell-icon {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.chess-2026__gradient {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.chess-2026__gradient.is-visible {
    opacity: 1;
}

.chess-2026__gradient--left {
    left: 0;
    background: linear-gradient(90deg, var(--color-neutral-0) 0%, rgba(255, 255, 255, 0) 100%);
}

.chess-2026__gradient--right {
    right: 0;
    background: linear-gradient(270deg, var(--color-neutral-0) 0%, rgba(255, 255, 255, 0) 100%);
}

.chess-2026__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding-top: 4px;
}

.chess-2026__legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chess-2026__legend-sample {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 48px;
    height: 40px;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
}

.chess-2026__legend-sample--available {
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    color: var(--color-neutral-900);
}

.chess-2026__legend-sample--sold {
    background: var(--color-neutral-100);
}

.chess-2026__legend-sample--booked {
    background: var(--color-neutral-200);
}

.chess-2026__legend-sample--selected {
    background: var(--color-red-500);
    color: var(--color-neutral-0);
}

.chess-2026__legend-sample--inactive {
    background: var(--color-neutral-50);
}

.chess-2026__legend-icon {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
}

.chess-2026__legend-text {
    font-size: 12px;
    line-height: 16px;
    color: var(--color-neutral-500);
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .chess-2026__head {
        justify-content: center;
        gap: 0;
        padding-left: 0;
    }

    .chess-2026__head-floor {
        display: none;
    }

    .chess-2026__floor-num {
        flex: 0 0 24px;
        width: 24px;
        font-size: 12px;
        line-height: 16px;
    }

    .chess-2026__grid {
        gap: 24px;
    }

    .chess-2026__row {
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
    }

    .chess-2026__cells {
        flex: 1 1 0;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 4px 8px;
    }

    .chess-2026__cell {
        flex: 0 0 70px;
        width: 70px;
        height: 40px;
        font-size: 12px;
        font-weight: 400;
        line-height: 16px;
    }

    .chess-2026__cell-icon {
        flex: 0 0 16px;
        width: 16px;
        height: 16px;
    }

    .chess-2026__legend {
        gap: 12px;
    }
}
