/* Edit location, home health enterprise, home health location and provider. They use the Edit patient shell
   (patient-editor.css: .pe, .pe-nav, .pe-main, .pe-foot); this file adds the record header, the field grids,
   the address blocks (EditorAddress), the provider's notification table and the APCM attestation row. */

/* Header: the record's name, its status, and a line of context (the parent enterprise). */
.oe-head { justify-content: space-between; flex-wrap: wrap; }
.oe-ident { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.oe-ident h2 { margin: 0; font-size: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.oe-sub { color: var(--pe-muted); font-size: 13.5px; }
.oe-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Field grids: two columns by default, four for the address line, five for the provider's name. */
.oe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; align-items: start; }
.oe-grid4 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 2px 12px; align-items: start; }
.oe-name { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 110px; gap: 2px 12px; align-items: start; }
.oe-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; align-items: start; }
.oe-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 110px; gap: 2px 12px; align-items: start; }
.oe-full { grid-column: 1 / -1; }
.oe-field-label { font-size: 13px; font-weight: 600; color: var(--pe-muted); margin: 10px 0 6px; }
.oe-grid .rz-form-field, .oe-grid3 .rz-form-field, .oe-grid4 .rz-form-field, .oe-phones .rz-form-field, .oe-name .rz-form-field { width: 100%; }
.oe-subtitle { font-size: 15px; font-weight: 700; margin: 16px 0 6px; padding-top: 12px; border-top: 1px solid var(--pe-border); }
.oe-subtitle:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.oe-msg { color: var(--pe-bad); font-size: 12.5px; margin: 2px 0 4px; }

/* Errors from every tab, above whichever tab is open. */
.oe-summary .validation-errors { margin: 0 0 12px; padding: 8px 12px 8px 30px; border-radius: 8px; color: var(--pe-bad);
    background: color-mix(in srgb, var(--pe-bad) 8%, transparent); font-size: 13px; }
.oe-summary .validation-errors:empty { display: none; }

/* Address block. Inline: fields with Validate beside the result. Summary: the saved address on one or two
   lines with Edit (billing and shipping on Edit home health location); the fields open below. */
.oe-addr { border: 1px solid var(--pe-border); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; background: var(--pe-surface); }
.oe-addr-head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 16px; }
.oe-addr-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.oe-addr-title { font-weight: 700; font-size: 15px; }
.oe-addr-sum { font-size: 14px; line-height: 1.4; }
.oe-addr-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.oe-addr-fields { margin-top: 10px; }
.oe-addr-fields[hidden] { display: none !important; }
.oe-addr.is-summary .oe-addr-fields { padding-top: 10px; border-top: 1px dashed var(--pe-border); }

/* Provider: Signing & Direct */
.oe-sig { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.oe-direct { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oe-direct .rz-password, .oe-direct input { min-width: 240px; }

/* Provider: one row per event, Email and Text message side by side. */
.oe-matrix { width: 100%; max-width: 640px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--pe-border); border-radius: 10px; overflow: hidden; }
.oe-matrix th, .oe-matrix td { padding: 8px 14px; border-bottom: 1px solid var(--pe-border); text-align: left; font-size: 14px; }
.oe-matrix th { background: var(--pe-raised); font-weight: 700; font-size: 13px; }
.oe-matrix th.oe-event { font-weight: 500; font-size: 14px; background: none; }
.oe-matrix th.oe-c, .oe-matrix td.oe-c { text-align: center; width: 120px; }
.oe-matrix tr:last-child td { border-bottom: 0; }
.oe-matrix tbody tr:hover td { background: var(--pe-raised); }

/* Home health location: APCM attestation */
.oe-attest-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.oe-attest-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.oe-attest-scope { color: var(--pe-muted); font-size: 13.5px; margin: 6px 0 14px; }
.oe-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 4px 0 14px 4px; }
.oe-check { display: flex; align-items: center; gap: 8px; }

@media (max-width: 760px) {
    .oe-grid, .oe-grid3, .oe-grid4, .oe-modes { grid-template-columns: minmax(0, 1fr); }
    .oe-phones { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .oe-name { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.oe-modes-label { margin: 12px 0 4px; }
.oe-notes { margin-top: 12px; }
.oe-help { margin-top: 10px; }
