.table-preview {
    margin: 0;
    --surface-radius: var(--radius-md);
    --surface-padding: 0;
    min-height: 200px;
    overflow: hidden;
    max-width: 100%;
}

.table-scroll {
    min-width: 100%;
    padding: 1rem;
    max-height: 420px;
    overflow-x: auto;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    min-width: 100%;
}

.preview-placeholder {
    color: var(--color-fg-muted);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.preview-note {
    margin-top: 0.75rem;
    color: var(--color-fg-muted);
    font-size: 0.9rem;
}

.table-preview table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    table-layout: fixed;
}

.table-preview th, .table-preview td {
    border: 1px solid var(--color-border-muted);
    padding: 0.4rem 0.5rem;
    text-align: left;
}

.table-preview th:focus, .table-preview td:focus {
    outline: none;
}

.table-preview th.active, .table-preview td.active {
    box-shadow: inset 0 0 0 2px var(--color-accent-fg);
}

.table-preview thead tr:first-child th:first-child {
    border-top-left-radius: var(--radius-md);
}

.table-preview thead tr:first-child th:last-child {
    border-top-right-radius: var(--radius-md);
}

.table-preview tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-md);
}

.table-preview tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-md);
}

.table-preview th {
    background: var(--color-canvas-inset);
    font-weight: 600;
}

.converter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.converter-buttons {
    display: flex;
    gap: var(--button-gap);
    margin-left: auto;
}

@media (max-width: 640px) {
    .converter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .converter-buttons {
        width: 100%;
        flex-direction: column;
        margin-left: 0;
    }

    .converter-buttons button {
        width: 100%;
    }
}
