/* Правила применяются только после инициализации JS (data-column-resize-ready):
   до неё таблица живёт своим дизайн-макетом (auto-layout, min-width-полы),
   и measureBaseWidths снимает честные базовые ширины. */
table[data-column-resize-key][data-column-resize-ready="1"] {
    table-layout: fixed;
}

table[data-column-resize-key][data-column-resize-ready="1"] th,
table[data-column-resize-key][data-column-resize-ready="1"] td {
    min-width: 0 !important;
}

table[data-column-resize-key][data-column-resize-ready="1"] th[data-column-resize-cell] {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Одна исходная таблица и один внешний визуальный каркас. Глобальные стили
   Bootstrap/GridView больше не рисуют второй контур внутри карточки. */
[data-column-resize-shell="1"] table[data-column-resize-key][data-column-resize-ready="1"] {
    margin-bottom: 0;
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.sh-list-scroll[data-column-resize-shell="1"],
.ww-table-wrap[data-column-resize-shell="1"] {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.sh-list-scroll[data-column-resize-shell="1"] {
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

[data-column-resize-pass-through="1"] {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.column-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    width: 10px;
    cursor: col-resize;
    touch-action: none;
    user-select: none;
}

.column-resize-handle::after {
    position: absolute;
    top: 18%;
    right: 2px;
    bottom: 18%;
    width: 2px;
    border-radius: 999px;
    background: #94a3b8;
    content: "";
    opacity: .35;
    transition: opacity .12s ease, background-color .12s ease;
}

.column-resize-handle:hover::after,
.column-resize-handle:focus-visible::after,
.column-resize-handle.is-active::after {
    background: #2563eb;
    opacity: 1;
}

.column-resize-handle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

body.is-column-resizing,
body.is-column-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

.column-resize-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 8px;
}

.column-resize-reset {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.column-resize-reset:hover {
    border-color: #60a5fa;
    background: #dbeafe;
    color: #1e40af;
}

.column-resize-reset:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.column-resize-reset.is-confirmed {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.column-resize-reset-icon {
    font-size: 15px;
    line-height: 1;
}

@media (max-width: 767px) {
    .column-resize-toolbar {
        justify-content: flex-start;
    }
}
