/* ==========================================================================
   Magnolia Assurant Group — Property management, contact & legal pages
   Extends styles.css (never overrides its tokens). Loaded after styles.css.
   ========================================================================== */

/* ---------- Layout helpers ---------- */
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .steps--4 { grid-template-columns: 1fr; } }

.quick-tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .quick-tiles--3 { grid-template-columns: 1fr; } }
@media (min-width: 640px) and (max-width: 960px) { .quick-tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 960px) { .quick-tiles--3 .quick-tile { flex-direction: column; align-items: flex-start; } }

/* Form + sidebar */
.pm-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start; }
.pm-layout--even { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.pm-aside { display: grid; gap: 1.25rem; }
@media (min-width: 961px) { .pm-aside--sticky { position: sticky; top: calc(var(--header-h) + 1.25rem); } }
@media (max-width: 960px) { .pm-layout, .pm-layout--even { grid-template-columns: 1fr; } }

.form-card { padding: clamp(1.35rem, 3.5vw, 2.5rem); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.form-card__head { margin-bottom: 1.5rem; }
.form-card__head h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); margin-bottom: .35em; }
.form-card__head p { margin: 0; }

/* Numbered form sections */
.form-section { display: grid; gap: 1.1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.form-section:first-of-type { padding-top: 0; border-top: 0; }
.form-section__title {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin: 0;
}
.form-section__num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--teal); color: var(--gold); font-size: .9rem;
}
.form-actions { display: grid; gap: .75rem; }
.form-actions .small { margin: 0; text-align: center; }
.form-actions .icon { width: 1em; height: 1em; }
.field legend .optional, .field label .optional { margin-left: .25em; }

/* Consent block links */
.consent__links { margin: .55rem 0 0 calc(20px + .7rem); font-size: .78rem; }
.consent__links a { color: var(--teal); }

/* Invalid tile groups (native radios are visually hidden) */
.was-validated .choice input:invalid + .choice__box { border-color: var(--high); }
.group-error { display: none; font-size: .85rem; color: var(--high); }
.was-validated fieldset:invalid > .group-error, .was-validated .field:has(input:invalid) > .group-error { display: block; }

/* Category tiles: icon over label */
.choices--cats { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .65rem; }
.choices--cats .choice__box {
  flex-direction: column; justify-content: center; text-align: center; gap: .45rem;
  padding: 1.05rem .6rem .95rem; min-height: 96px;
}
.choices--cats .choice__box > .icon { width: 1.75em; height: 1.75em; }
.choices--cats .choice__title { font-size: .92rem; }
.choices--cats .choice input:checked + .choice__box::after { top: .45rem; right: .45rem; transform: none; width: 19px; height: 19px; }

/* Priority tiles: stacked, full-width rows */
.choices--priority { grid-template-columns: 1fr; }
.choices--priority .choice__box { align-items: flex-start; padding: 1.05rem 3rem 1.05rem 1.1rem; }
.choices--priority .choice__box::before {
  content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: .42em;
  background: var(--dot, var(--teal-300));
}
.choice--low { --dot: var(--low); }
.choice--medium { --dot: var(--medium); }
.choice--high { --dot: var(--high); }
.choice__head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
.choices--priority .choice__desc { margin-top: .35em; }

/* Inline radio pills: keep them tappable */
.choices--inline .choice__box { min-height: 46px; }

/* Photo uploader */
.file-drop { position: relative; }
.file-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-drop:focus-within { border-color: var(--teal); background: var(--teal-50); outline: 3px solid var(--gold); outline-offset: 2px; }
.file-drop.is-dragover { border-color: var(--gold); background: var(--gold-50); }
.file-drop__title { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.file-drop__hint { font-size: .85rem; }
.photo-previews { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .65rem; }
.photo-previews:empty { display: none; }
.photo-preview { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--teal-50); border: 1px solid var(--line); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview__fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--teal); padding: .5rem; text-align: center; font-size: .72rem; word-break: break-word; }
.photo-preview__remove {
  position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(19, 39, 43, .82); color: #fff; transition: background-color .15s;
}
.photo-preview__remove:hover { background: var(--high); }
.photo-preview__remove svg { width: 16px; height: 16px; }
.photo-status { margin: 0; }

/* ---------- Emergency notice ---------- */
.notice--emergency { align-items: center; flex-wrap: wrap; padding: 1.1rem 1.25rem; border-radius: var(--r); box-shadow: var(--shadow); }
.notice--emergency > .icon { width: 2rem; height: 2rem; margin: 0; }
.notice--emergency__text { flex: 1 1 280px; }
.notice--emergency__text strong { color: var(--high); display: block; font-family: var(--font-display); font-size: 1.05rem; }
.notice--emergency .btn { flex: none; }
.btn--danger { background: var(--high); color: #fff; }
.btn--danger:hover { background: #972F22; color: #fff; }
.page-hero .notice { margin-top: 1.75rem; max-width: 880px; position: relative; }

/* ---------- Priority guide (sidebar) ---------- */
.priority-guide { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.priority-guide li { padding: .95rem 1rem; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--dot, var(--teal)); background: #fff; }
.priority-guide .p-low { --dot: var(--low); }
.priority-guide .p-medium { --dot: var(--medium); }
.priority-guide .p-high { --dot: var(--high); }
.priority-guide__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem .75rem; margin-bottom: .3rem; }
.priority-guide__goal { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: .95rem; }
.priority-guide p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* Priority table (full width) */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.pm-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.pm-table th, .pm-table td { text-align: left; padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.pm-table thead th { font-family: var(--font-display); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--cream); font-weight: 600; }
.pm-table tbody tr:last-child > * { border-bottom: 0; }
.pm-table td strong { white-space: nowrap; }

/* ---------- Success panels ---------- */
.form-success:focus { outline: none; }
.form-success h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.lead-id { display: inline-block; font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; color: var(--teal); background: var(--teal-50); border: 1px dashed var(--teal-300); border-radius: 8px; padding: .2em .6em; }
.next-steps { text-align: left; max-width: 560px; margin: 1.75rem auto 0; padding: 1.35rem 1.4rem; border-radius: var(--r); background: var(--cream); border: 1px solid var(--line); }
.next-steps:empty { display: none; }
.next-steps h3 { font-size: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.next-steps .checklist { margin-bottom: 0; }
.next-steps .notice { margin-top: 1rem; }
.form-success .btn-row { justify-content: center; margin-top: 1.75rem; }

/* ---------- Pay rent ---------- */
.pay-card { text-align: left; }
.pay-card__top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.pay-card__top h2 { font-size: 1.45rem; margin: 0; }
.pay-card__payee { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .9rem 1rem; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); margin-bottom: 1.1rem; font-size: .95rem; }
.pay-card__payee strong { font-family: var(--font-display); font-size: 1.05rem; }
.pay-card .btn--lg { white-space: normal; text-align: center; }
.pay-card__secure { display: flex; gap: .55rem; align-items: flex-start; margin: 1rem 0 0; font-size: .85rem; color: var(--muted); }
.pay-card__secure .icon { color: var(--low); margin-top: .1em; }
.pay-card .notice { margin-top: 1.1rem; flex-wrap: wrap; }
.pay-card .notice .btn-row { margin-top: .75rem; }
.pay-card a[aria-disabled="true"] { cursor: not-allowed; }

.secure-panel { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem 1.5rem; align-items: start; }
@media (max-width: 560px) { .secure-panel { grid-template-columns: 1fr; } }

/* ---------- Info list (contact card, owner sidebar) ---------- */
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.info-list li { display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: start; }
.info-list__label { display: block; font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: .1rem; }
.info-list a, .info-list__value { color: var(--ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.info-list a:hover { color: var(--gold-ink); text-decoration: underline; }
.card--teal .info-list a, .card--teal .info-list__value { color: #fff; }
.card--teal .info-list__label { color: var(--teal-300); }

/* Service cards */
.service-card h3 { margin-top: 1.1rem; }
.service-card .checklist { margin: 1rem 0 0; font-size: .95rem; }
.service-card p:last-child { margin-bottom: 0; }

/* Insurance tie-in cards */
.tie-card { display: flex; gap: 1.1rem; align-items: flex-start; text-decoration: none; }
.tie-card h3 { font-size: 1.2rem; margin-bottom: .3em; }
.tie-card p { margin-bottom: .6rem; font-size: .96rem; }

/* PM gateway spacing (reuses .gateway / .gate from styles.css) */
.pm-gateway { margin-top: clamp(2rem, 4.5vw, 3rem); }
.gate__lead { margin: 0; }
.gate__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.gate__links a {
  display: flex; align-items: center; gap: .8rem; padding: .8rem .95rem; border-radius: 12px; text-decoration: none;
  background: rgba(30, 56, 61, .05); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.gate__links a:hover { border-color: var(--gold); background: #fff; transform: translateX(3px); color: var(--ink); }
.gate__links a > .icon:first-child { color: var(--gold-ink); width: 1.35em; height: 1.35em; }
.gate__links a > .icon:last-child { margin-left: auto; color: var(--muted); }
.gate__links small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: .84rem; }

/* ---------- Legal pages ---------- */
.legal-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem; font-size: .92rem; color: var(--muted-c); }
.legal-meta .icon { color: var(--gold); }
.legal-meta span { display: inline-flex; align-items: center; gap: .45em; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1.35rem 1.5rem; margin-bottom: 2.5rem; box-shadow: var(--shadow-sm); }
.toc h2 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .85rem; font-weight: 600; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2 240px; column-gap: 2rem; }
.toc li { margin-bottom: .4rem; break-inside: avoid; font-size: .95rem; }
.toc a { text-decoration: none; color: var(--teal); }
.toc a:hover { text-decoration: underline; color: var(--gold-ink); }
.legal { font-size: 1rem; }
.legal section { padding-top: .25rem; margin-bottom: 2.25rem; }
.legal h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-bottom: .6em; padding-top: .5rem; }
.legal h3 { font-size: 1.1rem; margin: 1.35em 0 .45em; }
.legal ul { padding-left: 1.25rem; margin: 0 0 1.1em; }
.legal li { margin-bottom: .45em; }
.legal .callout { border-left: 4px solid var(--gold); background: var(--gold-50); padding: 1rem 1.2rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0 0 1.1em; color: var(--ink); }
.legal .callout p:last-child { margin-bottom: 0; }
.keyword { font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; background: var(--teal-50); color: var(--teal); padding: .08em .45em; border-radius: 6px; white-space: nowrap; }
.legal-contact { display: grid; gap: .45rem; margin: 0; padding: 1.2rem 1.35rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); font-style: normal; }
.legal-contact strong { font-family: var(--font-display); }
.back-to-top { font-size: .88rem; }

/* ---------- Pay rent: Venmo / mailed check / optional ACH ---------- */
.pay-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .pay-methods { grid-template-columns: 1fr; } }
.pay-method { padding: clamp(1.35rem, 3vw, 2rem); border-radius: var(--r-lg); display: grid; gap: 1.1rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.pay-method--wide { grid-column: 1 / -1; }
.pay-method__head { display: flex; gap: 1rem; align-items: center; }
.pay-method__head h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 0; }
.pay-method__head p { margin: .2rem 0 0; font-size: .92rem; }
.pay-method__body { display: grid; gap: 1rem; }
.pay-method .notice { margin: 0; }
.venmo-note { display: grid; gap: .2rem; padding: .75rem .95rem; border-radius: 10px; background: var(--cream); border: 1px dashed var(--line-strong); }
.venmo-note code, .faq code { font-family: var(--font-body); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.faq code { background: var(--teal-50); padding: .1em .4em; border-radius: 6px; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: .95rem 1.05rem; border-radius: 12px; background: var(--teal-50); border: 1px solid var(--teal-100); }
.copy-row__value { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); overflow-wrap: anywhere; }
.copy-status { font-size: .85rem; color: var(--low); margin: -.5rem 0 0; }
.copy-status:empty { display: none; }
.pay-steps { counter-reset: pay; list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.pay-steps li { counter-increment: pay; position: relative; padding-left: 2.4rem; font-size: .96rem; line-height: 1.5; }
.pay-steps li::before {
  content: counter(pay); position: absolute; left: 0; top: -.05em; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--teal); color: var(--gold); font-family: var(--font-display); font-weight: 600; font-size: .85rem;
}
.pay-card .pay-steps { margin-bottom: 1.25rem; }
.pay-card .btn--block + .btn--block { margin-top: .65rem; }
.pay-card .pay-card__secure a { color: var(--teal); font-weight: 600; }
