/* Shared by the submission table and the appearance editor's live preview. */
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table thead {
    background: var(--ezwp-table-header-background, linear-gradient(135deg, var(--formwiz-primary, #4d9088), var(--formwiz-primary-strong, #397570)));
}
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table thead th {
    background: var(--ezwp-col-header-background, var(--ezwp-table-header-background, transparent));
    color: var(--ezwp-col-header-text, var(--ezwp-table-header-text, var(--formwiz-surface, #fff))) !important;
}
#id_table_prod_def.ezwp-submission-colour-table thead th:nth-child(-n+2) {
    background: var(--ezwp-table-header-background, var(--formwiz-primary, #4d9088));
}
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table tbody tr {
    --ezwp-row-background: var(--ezwp-table-cell-background, var(--formwiz-surface, #fff));
}
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table tbody tr:nth-child(even) {
    --ezwp-row-background: var(--ezwp-table-stripe-background, var(--ezwp-table-cell-background, var(--formwiz-surface-blue, #f6f7fb)));
}
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table tbody tr > :is(td, th) {
    background: var(--ezwp-col-cell-background, var(--ezwp-row-background)) !important;
    color: var(--ezwp-col-cell-text, var(--ezwp-table-cell-text, var(--formwiz-ink, #212529))) !important;
    box-shadow: none;
}
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table tbody tr:is(:hover, [data-preview-state="hover"]) > :is(td, th) {
    background: var(--ezwp-table-hover-background, var(--formwiz-primary-surface, #e8f4f1)) !important;
    color: var(--ezwp-table-hover-text, var(--formwiz-ink, #212529)) !important;
}
/* Preview selection always wins, including when that same row is hovered. */
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table tbody tr.ezwp-detail-selected > :is(td, th),
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table tbody tr.ezwp-detail-selected:hover > :is(td, th) {
    background: var(--ezwp-table-selected-background, var(--formwiz-warning-soft, #fff3cd)) !important;
    color: var(--ezwp-table-selected-text, var(--formwiz-ink, #212529)) !important;
    border-color: var(--ezwp-table-selected-text, var(--formwiz-warm, #bc8034));
}
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table tbody tr.ezwp-detail-selected td:first-child {
    box-shadow: inset 4px 0 0 var(--ezwp-table-selected-text, var(--formwiz-warm, #bc8034));
}
:is(#id_table_prod_def, #ezwp_submission_style_preview).ezwp-submission-colour-table :is(th, td) > .text-muted {
    color: inherit !important;
}
.ezwp-column-style-custom {
    color: var(--formwiz-primary-strong) !important;
    background: var(--formwiz-primary-soft) !important;
    border-color: var(--formwiz-primary) !important;
}
#ezwpSubmissionStyleModal .modal-content {
    background: var(--formwiz-surface, #fff);
    color: var(--formwiz-ink, #212529);
}
.ezwp-style-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.ezwp-style-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.ezwp-style-presets button { display: flex; align-items: center; gap: 8px; text-align: left; }
.ezwp-style-presets button[aria-pressed="true"] { outline: 2px solid var(--formwiz-primary, #397570); outline-offset: 1px; }
.ezwp-style-preset-swatch { display: inline-flex; overflow: hidden; border: 1px solid var(--formwiz-border, #ddd); border-radius: 4px; flex-shrink: 0; }
.ezwp-style-preset-swatch span { width: 10px; height: 22px; }
.ezwp-style-group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.ezwp-style-group legend { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.ezwp-style-field { margin-bottom: 10px; }
.ezwp-style-field label { display: block; font-size: .82rem; margin-bottom: 4px; }
.ezwp-style-inputs { display: flex; gap: 6px; align-items: center; }
.ezwp-style-inputs .form-control-color { width: 38px; min-width: 38px; padding: 4px; }
.ezwp-style-inputs .ezwp-style-hex { width: 100%; min-width: 0; font-family: monospace; }
.ezwp-style-preview { position: sticky; top: 0; align-self: start; min-width: 0; }
#ezwp_submission_style_preview { width: 100%; border-collapse: collapse; font-size: .86rem; }
#ezwp_submission_style_preview th, #ezwp_submission_style_preview td { padding: 12px 10px; border-bottom: 1px solid var(--formwiz-border, #dde3e3); overflow-wrap: anywhere; }
#ezwp_submission_style_preview th { font-weight: 600; }
#ezwp_submission_style_preview td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ezwp-style-preview-wrap { border: 1px solid var(--formwiz-border, #dde3e3); border-radius: 8px; overflow: hidden; }
#ezwpSubmissionStyleModal [hidden] { display: none !important; }
@media (max-width: 575.98px) {
    .ezwp-style-layout { grid-template-columns: 1fr; gap: 16px; }
    .ezwp-style-preview { position: static; }
    .ezwp-column-manager-row { grid-template-columns: 24px minmax(0, 1fr); }
    .ezwp-column-manager-actions { grid-column: 2; justify-content: flex-end; }
    .ezwp-column-manager-actions .btn { width: 40px; height: 40px; }
}
