html {
    font-size: 14px;
}

body {
    margin: 0;
    background: #f5f6f8;
}

.card {
    border: 1px solid #e1e4e8;
}

#sqlEditor {
    height: 200px;
    width: 100%;
}

.schema-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.schema-tree {
    max-height: 500px;
    overflow-y: auto;
}

.schema-object {
    margin-bottom: 2px;
}

.schema-table-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 6px 4px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    gap: 6px;
    align-items: center;
}

    .schema-table-button:hover {
        background: #f0f2f5;
    }

.schema-arrow {
    width: 15px;
    font-size: 10px;
}

.schema-columns {
    display: none;
    margin-left: 22px;
}

    .schema-columns.show {
        display: block;
    }

.schema-column {
    display: flex;
    justify-content: space-between;
    padding: 4px 6px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
}

    .schema-column:hover {
        background: #f0f2f5;
    }

.column-type {
    color: #888;
    font-size: 11px;
}

.result-table {
    max-height: 500px;
    overflow: auto;
}

/* On the Query page, keep overall page scrolling normal but make only the results area scrollable.
   Use a viewport-based max-height so the results pane shows its own scrollbar while other parts stay static. */
.query-page .result-table {
    /* Reserve space for header, sql editor and other page chrome. Adjust the offset (420px) if you want
       more or less room for editor / controls. */
    max-height: calc(100vh - 420px);
    overflow-y: auto;
}

    .result-table table {
        white-space: nowrap;
    }

    .result-table thead {
        position: sticky;
        top: 0;
        z-index: 1;
    }

code {
    font-size: 12px;
}
