/* MLS access setup (MLSListings Exhibit E) -- js/shared/mls-authorization.js.
   Reuses the setup wizard's look (.gsu-card, .gsu-primary, .gsu-pill, .gsu-status from
   guided-setup.css); everything new is namespaced .mla-. Coral #D85A30 is the accent; no red. */

/* Progress (2026-11-23): the same 3-part bar as the Dashboard's locked market card
   (.mlk-steps / .mlk-step-labels, defined below). */
.mla-progress { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #E9ECEF; }

.mla-intro { margin: 0; padding: 14px 16px 0; font-size: 14.5px; line-height: 1.5; color: #2A2A2E; }
.mla-block { padding: 14px 16px; border-bottom: 1px solid #E9ECEF; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.mla-block:last-child { border-bottom: 0; }
.mla-block h3 { margin: 0; font-size: 14.5px; font-weight: 700; color: #111114; }
.mla-block p { margin: 0; font-size: 14px; line-height: 1.5; color: #2A2A2E; }
.mla-hint { display: block; font-size: 14px; font-weight: 400; color: #6B7079; line-height: 1.4; }
.mla-req { font-weight: 700; color: #B8451F; }
.mla-reqnote { margin: 12px 0 0; font-size: 14px; color: #5B616B; }

.mla-form { width: 100%; display: flex; flex-direction: column; }
.mla-row { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid #F0F1F4; }
.mla-row:last-child { border-bottom: 0; }
.mla-label { font-size: 14px; font-weight: 600; color: #111114; }
.mla-input { width: 100%; max-width: 380px; height: 40px; padding: 0 12px; border: 1px solid #D8D8DC; border-radius: 10px; font: inherit; font-size: 14.5px; color: #111114; background: #FFFFFF; }
.mla-input:focus { outline: none; border-color: #F38A6E; box-shadow: 0 0 0 3px rgba(216, 90, 48, 0.14); }

.mla-actions { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 6px; }
.mla-err { display: none; width: 100%; font-size: 14.5px; color: #8A3414; background: #FDF1EC; border: 1px solid #F3C9B9; border-radius: 10px; padding: 10px 12px; }
.mla-err.show { display: block; }
.mla-err-list { margin: 6px 0 0; padding-left: 18px; }
.mla-err-list li { margin: 3px 0; }
.mla-err-act { margin-top: 10px; }
.mla-x-file { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #5B616B; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.mla-x-file:hover { background: #EEF0F3; }
.mla-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14.5px; font-weight: 600; color: #B8451F; cursor: pointer; text-decoration: underline; }

.mla-summary { width: 100%; max-width: 640px; }
.mla-sum-box { border: 1px solid #E3E5EA; border-radius: 12px; background: #FFFFFF; overflow: hidden; min-width: 0; }
.mla-sum-box h4 { margin: 0; padding: 10px 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #6B7079; background: #F7F8FA; border-bottom: 1px solid #E3E5EA; }
.mla-sum-box dl { margin: 0; }
.mla-sum-row { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 10px 14px; border-bottom: 1px solid #F0F1F4; }
.mla-sum-row:last-child { border-bottom: 0; }
.mla-sum-row dt { margin: 0; font-size: 14px; color: #6B7079; }
.mla-sum-row dd { margin: 0; font-size: 14.5px; color: #111114; word-break: break-word; }

.mla-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* Light gray so the Download / Choose PDF pills stand out from the white card (Mark 2026-11-11). */
.mla-btn.gsu-pill { background: #EEF0F3; border-color: #D3D6DC; }
.mla-btn.gsu-pill:hover:not([disabled]) { background: #E4E7EC; }
.mla-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mla-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mla-file:focus + .mla-fname { outline: 2px solid #F38A6E; outline-offset: 2px; }
.mla-fname { font-size: 14.5px; color: #5B616B; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsu-primary[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Status panels match the Dashboard card: coral icon, bold title, plain text.
   Approved uses teal; not approved uses the burnt sienna box (no red, no amber). */
.mla-panel { display: flex; gap: 10px; align-items: flex-start; margin: 16px 18px; }
.mla-panel-ic { flex: none; margin-top: 1px; font-size: 20px; color: #D85A30; }
.mla-panel.is-ok .mla-panel-ic { color: var(--teal-700, #0A9E8A); }
.mla-panel.is-warn { padding: 12px 14px; border-radius: 10px; background: #F6E3DA; }
.mla-panel.is-warn .mla-panel-ic, .mla-panel.is-warn .mlk-text b { color: #9C3A1A; }

/* Stand-alone window (opened from the "MLS data unavailable" banner). */
.mla-modal { position: fixed; inset: 0; z-index: 10050; background: rgba(17, 17, 20, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.mla-modal-card { background: #FFFFFF; border-radius: 14px; width: 100%; max-width: 720px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28); overflow: hidden; }
.mla-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #F7F7F9; border-bottom: 1px solid #ECEDF0; }
.mla-head-l { display: flex; align-items: center; gap: 12px; }
.mla-head-ic { width: 34px; height: 34px; border-radius: 8px; background: #D85A30; color: #FFFFFF; display: grid; place-items: center; font-size: 19px; flex: none; }
.mla-modal-head h2 { margin: 0; font-size: 17px; font-weight: 800; color: #111114; }
.mla-x { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 18px; color: #5B616B; }
.mla-x:hover { background: #F0F1F4; }
.mla-modal-body { min-height: 120px; }
.mla-modal-body .gsu-status { margin: 16px; }

@media (max-width: 640px) {
  .mla-row { grid-template-columns: 1fr; gap: 6px; }
  .mla-input { max-width: none; }
  .mla-modal { padding: 0; }
  .mla-modal-card { border-radius: 0; min-height: 100vh; }
}

/* Link inside the "MLS data unavailable" banner (js/morgan.js morganRenderMlsNotice). */
.mm-mls-cta { font-weight: 700; color: #B8451F; margin-left: 6px; white-space: nowrap; }
.mla-btnrow { display: flex; flex-wrap: wrap; gap: 10px; }

/* Locked market card (2026-11-23): shown in place of market data until MLS access is
   approved. Rendered by window.mlsLockedPanel() in js/shared/mls-authorization.js. */
.mlk { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px 6px; }
.mlk-ghost { width: 100%; height: 64px; display: block; }
.mlk-ghost line { stroke: #F0F1F3; stroke-width: 1; }
.mlk-ghost path { fill: none; stroke: #E3E5E9; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mlk-text { display: flex; flex-direction: column; gap: 6px; }
.mlk-text b { font-size: 16px; font-weight: 700; color: var(--ink, #1B1D22); }
.mlk-text span { font-size: 14px; line-height: 1.5; color: #4A4F57; }
.mlk-sub { margin: 0; font-size: 14px; color: #4A4F57; }
.mlk-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mlk-btn { height: 44px; padding: 0 18px; border: 0; border-radius: 8px; background: #D85A30; color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mlk-btn:hover { background: #C24E28; }
.mlk-btn:focus-visible, .mlk-link:focus-visible { outline: 2px solid #D85A30; outline-offset: 2px; }
.mlk-link { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: #D85A30; cursor: pointer; }
.mlk-link:hover { text-decoration: underline; }
.mlk-link[disabled] { opacity: .6; cursor: wait; text-decoration: none; }
.mlk-note { font-size: 14px; color: #4A4F57; }
.mlk-steps { display: flex; gap: 8px; }
.mlk-seg { flex: 1; height: 6px; border-radius: 3px; background: #E3E5E9; }
.mlk-seg.done { background: #D85A30; }
.mlk-seg.now { background: #F9B8A6; }
.mlk-step-labels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: -8px; font-size: 13px; color: #6D6D76; }
.mlk-step-labels span:nth-child(2) { text-align: center; }
.mlk-step-labels span:nth-child(3) { text-align: right; }
.mlk-step-labels .now { color: var(--ink, #1B1D22); font-weight: 600; }
.mlk-row { display: flex; align-items: flex-start; gap: 10px; }
.mlk-row > .mlk-ic { flex: none; margin-top: 1px; color: #D85A30; }
.mlk-warn { padding: 12px 14px; border-radius: 10px; background: #F6E3DA; }
.mlk-warn > .mlk-ic, .mlk-warn .mlk-text b { color: #9C3A1A; }
.mlk-err { margin: 0; font-size: 14px; color: #9C3A1A; }
/* Market Research: the card replaces the sections until access is approved. */
.mr-layout.is-mls-locked { display: block !important; }
.mr-layout.is-mls-locked .mr-rail, .mr-layout.is-mls-locked .mr-panel { display: none !important; }
.mr-mls-locked { max-width: 640px; }
.mr-mls-locked .card-body { padding: 16px 18px 18px; }
