/* Table Widget */

.table {
    display: flex;
    flex-direction: column;
    width: max-content;
}
.row {
    height: 70px;
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    background: var(--bg);
    align-items: center;
    width: max-content;
    min-width: 100%;
}
.row.header {
    position: sticky;
    top:0;
    order: -10000;
    z-index: 2;
}
.data {
    padding: 0.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    height: 100%;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
    overflow: clip;
    flex-direction: column;
    flex-shrink: 0;
    word-break: break-word;
}
.data.header.selected {
    background-color: var(--highlight);
}

.data-controls {
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 0;
}
.data-controls div {
    cursor: pointer;
    color: var(--line);
}
.data-controls div:hover {
    color: var(--font);
}
.data-dragger {
    cursor: grab;
    writing-mode: vertical-rl;
}
.data-dragger:active {
    cursor: grabbing;
}

.data-drag-indicator {
    width: 4px;
    height: 100%;
    background-color: var(--font);
    border-left: 4px solid var(--bg);
    border-right: 4px solid var(--bg);
    position: relative;
    box-sizing: content-box;
    margin-left: -9px;
    margin-right: -4px;
    z-index: 10000;
}
.data-resizer {
    width: 5px;
    height: 100%;
    background-color: var(--line);
    cursor: col-resize;
    border-left: 2px solid var(--bg);
    border-right: 2px solid var(--bg);
    position: relative;
    box-sizing: border-box;
    margin-left: -3px;
    margin-right: -2px;
}

.table-logo {
    width: calc(70px - 0.5rem);
    height: calc(70px - 0.5rem);
    margin-right: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--line);
    object-fit: contain;
    flex-shrink: 0;
}

.table-column-drag-remove {
    background-color: rgba(255, 0, 0, 0.2);
    position: absolute;
    width: 4rem;
    height: 4rem;
    border-radius: 4px;
    font-size: 2rem;
    backdrop-filter: blur(1px);
    transition: 200ms;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.table-column-drag-remove:hover {
    background-color: rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.table-settings-block {
    width: 2.6rem;
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    height: 70px;
    order: 0;
    overflow-y: scroll;
}
.header .table-settings-block {
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}
.table-settings-block::-webkit-scrollbar {
    display: none;
}

.table-settings-chunk {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    height: 70px;
}

.table-setting {
    border: 0;
    padding: 0;
    font-size: 1.05rem;
    cursor: pointer;
}

.divider-above, .divider-below {
    min-height: 2px;
    background-color: var(--font);
    margin-top: -1px;
    margin-bottom: -1px;
    z-index: 1;
}
.divider-above {
    order: -1;
}
.divider-below {
    order: 999;
}

.table-scope-holder {
    background: var(--bg);
    backdrop-filter: blur(4px);
    outline: 0;
    position: fixed;
    margin: 0;
    filter: drop-shadow(-1px 1px 1px var(--shadow));
    border-radius: .4rem;
    border: 1px solid var(--line);
    padding: 0;
}

.table-list-scope-edit {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* See lists.css */

.table-column-edit {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.add-columns-title {
    font-size: 1.2rem;
}
.table-column-edit .add-columns {
    gap: 0.5rem;
    display: flex;
    flex-direction: column;
}
.table-column-panel-group {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    order: -1;
}
.table-column-panel-group-controller {
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    font-weight: bold;
}
.table-column-panel-columns-holder .grandchild-holder {
    order: -1;
}
.table-column-panel-columns-holder .child-holder {
    order: 1;
    display: flex;
    flex-direction: row;
    max-width: 26rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 10rem;
    overflow-y: auto;
}
.table-column-panel-columns-holder {
    padding-left: 0.75rem;
    max-width: 20rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.table-column-panel-column {
    cursor: pointer;
    padding: 0.2rem;
    user-select: none;
    order: 15;
    border: 1px solid var(--line);
}

.data .ratio-divider {
    width: 65%;
    height: 1px;
    background-color: var(--font);
}
