/* v0.58.45 — verified layout corrections from the October 28 review. */

/* Before- and after-repair test lists use the complete work area. */
.speedtex-technician-workflow .speedtex-before-after {
    display: block;
}
.speedtex-technician-workflow .speedtex-before-after > section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem 1rem;
    width: 100%;
}
.speedtex-technician-workflow .speedtex-test-row {
    grid-template-columns: minmax(10rem, 1fr) minmax(9rem, .7fr);
    min-width: 0;
    padding: .55rem;
    border: 1px solid #e0e8ed;
    border-radius: .55rem;
    background: #fff;
}
.speedtex-technician-workflow .speedtex-before-after > section > label.speedtex-wide {
    grid-column: 1 / -1;
}

/* The original-request dialog has one vertical scroll area and no horizontal scroll. */
.speedtex-request-dialog {
    width: min(1120px, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    max-height: 92vh;
    overflow: hidden;
    box-sizing: border-box;
}
.speedtex-request-dialog .speedtex-request-snapshot {
    width: 100%;
    max-width: 100%;
    max-height: calc(92vh - 5.5rem);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}
.speedtex-request-dialog .speedtex-request-snapshot *,
.speedtex-request-dialog .speedtex-repair-line-card,
.speedtex-request-dialog .speedtex-repair-line-form,
.speedtex-request-dialog .speedtex-detail-grid {
    min-width: 0;
    box-sizing: border-box;
}
.speedtex-request-dialog .speedtex-repair-line-card {
    grid-template-columns: minmax(14rem, .8fr) minmax(0, 1.2fr);
}
.speedtex-request-dialog .speedtex-repair-line-form input,
.speedtex-request-dialog .speedtex-repair-line-form select,
.speedtex-request-dialog .speedtex-repair-line-form textarea {
    width: 100%;
    max-width: 100%;
}
.speedtex-request-dialog .speedtex-repair-line-summary,
.speedtex-request-dialog .speedtex-repair-line-summary dd,
.speedtex-request-dialog .speedtex-facts dd {
    overflow-wrap: anywhere;
}

/* Customer overview facts need visible breathing room inside both cards. */
.speedtex-customer-overview-grid .speedtex-customer-overview-card > .speedtex-facts,
.speedtex-customer-overview-grid .speedtex-panel > .speedtex-facts,
.speedtex-customer-overview-grid .speedtex-panel-flush > .speedtex-facts {
    width: auto;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .speedtex-request-dialog .speedtex-repair-line-card {
        grid-template-columns: 1fr;
    }
    .speedtex-request-dialog .speedtex-repair-line-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .speedtex-technician-workflow .speedtex-before-after > section,
    .speedtex-request-dialog .speedtex-repair-line-form,
    .speedtex-request-dialog .speedtex-snapshot-details .speedtex-detail-grid-two {
        grid-template-columns: 1fr;
    }
    .speedtex-request-dialog {
        width: calc(100vw - .75rem);
        max-width: calc(100vw - .75rem);
        max-height: 96vh;
    }
    .speedtex-request-dialog .speedtex-request-snapshot {
        max-height: calc(96vh - 4.5rem);
    }
    .speedtex-customer-overview-grid .speedtex-customer-overview-card > .speedtex-facts,
    .speedtex-customer-overview-grid .speedtex-panel > .speedtex-facts,
    .speedtex-customer-overview-grid .speedtex-panel-flush > .speedtex-facts {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}
