/* Тепловая карта заказов */

.heatmap-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.heatmap-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.heatmap-month-label {
    min-width: 140px;
    text-align: center;
    font-weight: 700;
    color: var(--ozon-navy, #001a34);
}

.heatmap-schedule-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 8px 0 6px;
    padding: 10px 12px;
    background: #f5f8fc;
    border: 1px solid var(--ozon-border, #d7e0ea);
    border-radius: 10px;
}

.heatmap-schedule-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ozon-navy, #001a34);
    cursor: pointer;
    margin-right: 4px;
}

.heatmap-schedule-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--ozon-blue, #005bff);
}

.heatmap-daykind-tabs {
    display: inline-flex;
    gap: 4px;
}

.heatmap-daykind-btn.active {
    background: var(--ozon-blue, #005bff);
    border-color: var(--ozon-blue, #005bff);
    color: #fff;
}

.heatmap-howto {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 10px;
}

.heatmap-howto .section-hint {
    margin: 0;
    line-height: 1.45;
}

#heatmapScheduleHowto {
    color: var(--ozon-navy, #001a34);
}

.heatmap-stats {
    margin: 8px 0 12px;
    font-size: 13px;
    color: var(--ozon-gray, #5b6b7c);
}

/* Место под фиксированные кружки ИИ / поддержки (bottom-right) */
#heatmapView {
    padding-bottom: 96px;
}

.heatmap-wrap {
    /* без внутренней вертикальной прокрутки — высота по таблице, скролл страницы справа */
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--ozon-border, #d7e0ea);
    border-radius: 12px;
    background: #fff;
}

.heatmap-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 12px;
}

.heatmap-table th,
.heatmap-table td {
    border-right: 1px solid rgba(215, 224, 234, 0.9);
    border-bottom: 1px solid rgba(215, 224, 234, 0.9);
    text-align: center;
    padding: 0;
    min-width: 36px;
    height: 28px;
    vertical-align: middle;
}

.heatmap-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--ozon-blue-light, #eef4ff);
    color: var(--ozon-navy, #001a34);
    font-weight: 600;
    padding: 6px 4px;
}

.heatmap-table thead th.is-weekend {
    background: #fff4e8;
    color: #9a3412;
}

.heatmap-table th.hm-corner,
.heatmap-table td.hm-hour {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #f7f9fc;
    min-width: 72px;
    width: 72px;
    text-align: left;
    padding: 0 8px;
    font-weight: 600;
    color: var(--ozon-navy, #001a34);
}

.heatmap-table thead th.hm-corner {
    z-index: 6;
    background: var(--ozon-blue-light, #eef4ff);
}

.heatmap-table td.hm-hour {
    cursor: pointer;
    user-select: none;
}

.heatmap-table td.hm-hour.is-off {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.heatmap-table td.hm-hour.is-off::after {
    content: " off";
    font-size: 10px;
    font-weight: 500;
    opacity: 0.75;
}

.heatmap-table td.hm-cell.is-weekend-col {
    box-shadow: inset 0 0 0 999px rgba(255, 180, 100, 0.04);
}

.heatmap-table td.hm-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #0f172a;
}

.heatmap-table td.hm-cell.is-empty {
    color: transparent;
    background: #e8edf3;
}

.heatmap-table td.hm-cell.is-today {
    outline: 2px solid rgba(0, 91, 255, 0.45);
    outline-offset: -2px;
}

.heatmap-table td.hm-cell.is-current-hour {
    box-shadow: inset 0 0 0 2px rgba(0, 160, 70, 0.55);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--ozon-gray, #5b6b7c);
}

.heatmap-legend-scale {
    display: inline-flex;
    height: 12px;
    width: 120px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--ozon-border, #d7e0ea);
}

.heatmap-legend-scale span {
    flex: 1;
}
