.weldexp-data-view,
.query-tables,
.weldexp-diagram--full {
    min-width: 0;
    max-width: 100%;
    margin: 0 0 2rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--border-color, #d9e0e7);
    border-radius: 14px;
    background: var(--surface-color, #fff);
}

.query-tables > header > .eyebrow {
    display: none;
}

.weldexp-table-group,
.query-tables-children {
    display: grid;
    min-width: 0;
    max-width: 100%;
    gap: 1.25rem;
}

.query-tables-node {
    position: relative;
    min-width: 0;
    max-width: 100%;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #d9e0e7);
}

.query-tables-node--level-0 {
    border-top: 0;
    padding-top: 0;
}

.query-tables-node[aria-busy="true"] {
    cursor: progress;
}

.query-tables-loading,
.query-tables-child-loading {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: .35rem 0 .75rem;
    padding: .45rem .7rem;
    border: 1px solid var(--border-color, #d9e0e7);
    border-radius: 8px;
    background: var(--surface-color, #fff);
    font-size: .92rem;
    font-weight: 650;
}

.query-tables-child-loading {
    display: flex;
    min-height: 52px;
}

.query-tables-loading::before,
.query-tables-child-loading::before {
    content: '';
    width: .9rem;
    height: .9rem;
    flex: 0 0 .9rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: query-tables-spin .75s linear infinite;
}

.button.is-loading {
    pointer-events: none;
    cursor: wait;
    opacity: .72;
}

@keyframes query-tables-spin {
    to { transform: rotate(360deg); }
}

.weldexp-search {
    display: grid;
    gap: .4rem;
    margin: 1rem 0;
}

.weldexp-search > div,
.diagram-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: end;
}

.query-tables-field-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .75rem;
    margin: .65rem 0 0;
    padding: .85rem;
    border: 1px solid var(--border-color, #d9e0e7);
    border-radius: 10px;
}

.query-tables-field-filters legend {
    padding: 0 .35rem;
    font-weight: 650;
}

.query-tables-field-filters label {
    display: grid;
    gap: .3rem;
    min-width: 0;
}

.query-tables-field-filters label > span {
    color: #526270;
    font-size: .88rem;
    font-weight: 650;
}

.query-tables-filter-actions {
    margin-top: .35rem;
}

.weldexp-search input,
.diagram-controls input,
.diagram-controls select {
    min-height: 42px;
    padding: .55rem .7rem;
    border: 1px solid #aebbc7;
    border-radius: 8px;
    background: #fff;
    color: #17202a;
}

.diagram-controls label {
    display: grid;
    gap: .35rem;
    min-width: min(100%, 190px);
    font-weight: 650;
}

.weldexp-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    margin: 1rem 0 .5rem;
    -webkit-overflow-scrolling: touch;
}

.weldexp-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: .94rem;
}

.weldexp-table th,
.weldexp-table td {
    padding: .7rem .75rem;
    border: 1px solid #d9e0e7;
    text-align: left;
    vertical-align: top;
}

.weldexp-table th {
    background: #edf3f7;
    color: #17202a;
}

.weldexp-table tbody tr:nth-child(even) {
    background: #f8fafb;
}

.weldexp-table__action {
    width: 1%;
    white-space: nowrap;
}

.weldexp-pagination {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.weldexp-record-info,
.query-tables-hint,
.diagram-help {
    color: #526270;
    font-size: .92rem;
}

.weldexp-data-notice {
    padding: 1rem 1.2rem;
    border-left: 4px solid #c57b00;
    background: #fff7e6;
    color: #5c3b00;
}

.button.is-selected {
    background: #176b4d;
    color: #fff;
}

.schaeffler-container,
.elomelegitesi-container {
    max-width: 100%;
    overflow-x: auto;
}

.schaeffler-container canvas,
.elomelegitesi-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem auto;
    background: #fff;
}

.result {
    margin-top: .75rem;
    font-weight: 650;
}

@media (max-width: 720px) {
    .weldexp-table-wrap {
        overflow-x: visible;
    }

    .weldexp-table {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: .88rem;
    }

    .weldexp-table thead {
        display: block;
        max-width: 100%;
        margin-bottom: .55rem;
    }

    .weldexp-table thead tr {
        display: flex;
        gap: .4rem;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: .25rem;
        border: 0;
        background: transparent;
        -webkit-overflow-scrolling: touch;
    }

    .weldexp-table th {
        display: block;
        flex: 0 0 auto;
        padding: .4rem .55rem;
        border: 1px solid #d9e0e7;
        border-radius: 999px;
        white-space: nowrap;
    }

    .weldexp-table__action-heading {
        display: none;
    }

    .weldexp-table tbody {
        display: grid;
        width: 100%;
        gap: .75rem;
    }

    .weldexp-table tbody tr {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border: 1px solid #d9e0e7;
        border-radius: 10px;
        background: #fff;
    }

    .weldexp-table tbody tr:nth-child(even) {
        background: #f8fafb;
    }

    .weldexp-table td {
        display: grid;
        grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr);
        gap: .75rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: .6rem .7rem;
        border: 0;
        border-bottom: 1px solid #e4e9ee;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .weldexp-table td::before {
        content: attr(data-label);
        min-width: 0;
        color: #526270;
        font-size: .82rem;
        font-weight: 650;
        overflow-wrap: anywhere;
    }

    .weldexp-table td:last-child {
        border-bottom: 0;
    }

    .weldexp-table__action {
        width: 100%;
        white-space: normal;
    }

    .weldexp-table__action a,
    .weldexp-table__action .button {
        max-width: 100%;
        white-space: normal;
    }

    .weldexp-table__empty {
        display: block;
    }

    .weldexp-table__empty::before {
        display: none;
    }

    .diagram-controls { align-items: stretch; }
    .diagram-controls label { width: 100%; }
    .query-tables-field-filters { grid-template-columns: 1fr; }
    .query-tables-filter-actions { align-items: stretch; }
}
