/* ================================================================
   post-property.css  –  Client property submission page
   ================================================================ */

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #e2231a;
  --red-dk:   #c01a12;
  --gold:     #c9a94e;
  --ink:      #111111;
  --ink-80:   #333333;
  --ink-50:   #666666;
  --ink-30:   #aaaaaa;
  --line:     #e5e7eb;
  --bg:       #f5f5f7;
  --card:     #ffffff;
  --radius:   14px;
  --shadow:   0 2px 12px rgba(0,0,0,.08);
  --focus:    0 0 0 3px rgba(226,35,26,.22);
  --ff:       'DM Sans', system-ui, -apple-system, sans-serif;
  --fz-base:  15px;
  --fz-sm:    13px;
  --fz-xs:    12px;
  --fz-h2:    clamp(20px, 3vw, 26px);
  --fz-h3:    17px;
  --fz-h4:    15px;
}

body { font-family: var(--ff); font-size: var(--fz-base); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
em   { color: var(--red); font-style: normal; }
a    { color: var(--red); }
code { font-family: monospace; background: #f1f1f1; padding: 2px 6px; border-radius: 4px; font-size: var(--fz-sm); }

/* ── Header ───────────────────────────────────────────────────── */
.pp-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  background: var(--ink); padding: 10px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.pp-logo img { display: block; }
.pp-header__tag {
  margin-left: auto;
  font-size: var(--fz-sm); font-weight: 600;
  color: rgba(255,255,255,.65);
  letter-spacing: .02em;
}

/* ── Outer wrap ───────────────────────────────────────────────── */
.pp-wrap { max-width: 1060px; margin: 0 auto; padding: 32px 20px 60px; }

/* ── Step indicator ───────────────────────────────────────────── */
.pp-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 32px;
}
.pp-step {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fz-sm); font-weight: 600; color: var(--ink-30);
  padding: 8px 16px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.pp-step span {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: #ddd; color: #fff; flex-shrink: 0;
  transition: background .2s;
}
.pp-step.is-on { color: var(--red); }
.pp-step.is-on span { background: var(--red); }
.pp-step.is-done { color: var(--ink-50); }
.pp-step.is-done span { background: #22c55e; }
.pp-step-line { flex: 1; max-width: 48px; height: 2px; background: var(--line); }

/* ── Alerts ───────────────────────────────────────────────────── */
.pp-msg {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px; border-radius: 10px; margin-bottom: 20px;
  font-size: var(--fz-sm); line-height: 1.5;
}
.pp-msg i { margin-top: 2px; flex-shrink: 0; }
.pp-msg--ok  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.pp-msg--err { background: #fff1f1; color: #991b1b; border: 1px solid #fecaca; }

/* ── Centered card (steps 1–2 & done) ────────────────────────── */
.pp-card {
  max-width: 480px; margin: 0 auto;
  background: var(--card); border-radius: var(--radius); padding: 36px 32px;
  box-shadow: var(--shadow);
}
.pp-card--center { text-align: center; }
.pp-card--done   { max-width: 540px; }
.pp-card h2 { font-size: var(--fz-h2); font-weight: 700; margin-bottom: 10px; }
.pp-card__sub { color: var(--ink-50); margin-bottom: 28px; }
.pp-card form { text-align: left; }

.pp-card__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff0ef; color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 20px;
}
.pp-card__icon--ok { background: #f0fdf4; color: #16a34a; }

/* ── Buttons ──────────────────────────────────────────────────── */
.pp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ff); font-size: var(--fz-base); font-weight: 600;
  padding: 12px 28px; border-radius: 10px; border: none; cursor: pointer;
  transition: background .18s, opacity .18s, transform .1s;
  text-decoration: none; white-space: nowrap;
}
.pp-btn:active { transform: scale(.97); }
.pp-btn--red { background: var(--red); color: #fff; width: 100%; margin-top: 8px; }
.pp-btn--red:hover { background: var(--red-dk); }
.pp-btn--outline {
  background: transparent; color: var(--red);
  border: 2px solid var(--red); padding: 10px 24px; width: auto;
}
.pp-btn--outline:hover { background: #fff0ef; }
.pp-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Link-style buttons ───────────────────────────────────────── */
.pp-link { background: none; border: none; color: var(--red); font-family: var(--ff); font-size: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.pp-hint { font-size: var(--fz-sm); color: var(--ink-50); margin-top: 16px; }
.pp-resend-form { margin-top: 4px; }

/* ── OTP input ────────────────────────────────────────────────── */
.pp-otp-input {
  font-size: 28px; font-weight: 700; letter-spacing: 10px;
  text-align: center; padding: 14px 20px; border-radius: 10px;
}

/* ── Top bar (step 3) ─────────────────────────────────────────── */
.pp-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
}
.pp-top h2 { font-size: var(--fz-h2); font-weight: 700; }
.pp-top p  { color: var(--ink-50); font-size: var(--fz-sm); margin-top: 4px; }

/* ── Property form grid ───────────────────────────────────────── */
.pa-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 800px) { .pa-grid { grid-template-columns: 1fr; } }

/* ── Cards ────────────────────────────────────────────────────── */
.pa-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden;
}
.pa-card__h {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.pa-card__h span {
  width: 32px; height: 32px; border-radius: 8px;
  background: #fff0ef; color: var(--red); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.pa-card__h h3 { font-size: var(--fz-h3); font-weight: 700; }
.pa-card__b   { padding: 20px; }

.pa-box {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
}
.pa-box h4 { font-size: var(--fz-h4); font-weight: 700; margin-bottom: 10px; }
.pa-box .pf-note { margin-top: 10px; }

/* ── Form fields ──────────────────────────────────────────────── */
.pf-field { margin-bottom: 18px; }
.pf-field label {
  display: block; font-size: var(--fz-sm); font-weight: 600; color: var(--ink-80);
  margin-bottom: 6px;
}
.pf-field label .pf-hint { font-weight: 400; color: var(--ink-30); margin-left: 4px; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="number"], textarea, select {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--line);
  border-radius: 9px; font-family: var(--ff); font-size: var(--fz-base);
  color: var(--ink); background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--red); box-shadow: var(--focus);
}
input.is-bad, textarea.is-bad, select.is-bad {
  border-color: var(--red); background: #fff8f8;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea { resize: vertical; min-height: 110px; }
.pf-err { display: block; color: var(--red); font-size: var(--fz-xs); margin-top: 5px; }
.pf-note { font-size: var(--fz-xs); color: var(--ink-30); margin-top: 4px; }
.pf-sublabel { font-size: var(--fz-xs); font-weight: 600; color: var(--ink-50); display: block; margin-bottom: 4px; }

/* Layout helpers */
.pf-two   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pf-three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 600px) {
  .pf-two   { grid-template-columns: 1fr; }
  .pf-three { grid-template-columns: 1fr 1fr; }
}

/* Inline input + mini button */
.pf-inline { display: flex; gap: 8px; }
.pf-inline input { flex: 1; }
.pf-mini {
  flex-shrink: 0; padding: 10px 12px; background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 9px; font-family: var(--ff); font-size: var(--fz-xs); font-weight: 600;
  cursor: pointer; white-space: nowrap; color: var(--ink-80);
  transition: background .15s, border-color .15s;
}
.pf-mini:hover { background: #ebe9f1; border-color: #ccc; }

/* Radio groups */
.pf-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-radios--inline { margin-bottom: 10px; }
.pf-radio { display: flex; }
.pf-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.pf-radio span {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); font-size: var(--fz-sm); font-weight: 500;
  cursor: pointer; transition: all .15s; background: #fff; color: var(--ink-80);
}
.pf-radio input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.pf-radio input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

/* Chip groups */
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { display: flex; }
.pf-chip--all { margin-right: 4px; }
.pf-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.pf-chip span {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); font-size: var(--fz-sm);
  cursor: pointer; transition: all .15s; background: #fff; color: var(--ink-80);
}
.pf-chip input:checked + span { background: #fff0ef; border-color: var(--red); color: var(--red); font-weight: 600; }
.pf-chip--all input:checked + span { background: #fff0ef; border-color: var(--red); color: var(--red); }
.pf-chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

/* Money inputs */
.pf-money { display: flex; }
.pf-money input  { flex: 1; border-radius: 9px 0 0 9px; border-right: none; }
.pf-money select { width: auto; border-radius: 0 9px 9px 0; border-left: 1px solid var(--line); background-color: #f9f9f9; min-width: 90px; }
.pf-money__out { font-size: var(--fz-xs); color: var(--ink-50); margin-top: 4px; display: block; min-height: 1.2em; }

/* Pricing row */
.pf-pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
@media (max-width: 540px) { .pf-pricing { grid-template-columns: 1fr; } }
.pf-pricing.is-bad .pf-money input { border-color: var(--red); }

/* Checkbox */
.pf-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fz-sm); color: var(--ink-80); margin-bottom: 12px; }
.pf-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }

/* Map */
.pf-map { width: 100%; height: 300px; border-radius: 10px; border: 1.5px solid var(--line); overflow: hidden; margin: 10px 0; }
#coordsRow { margin-top: 8px; }

/* Cover image */
.pf-cover {
  position: relative; width: 100%; height: 220px;
  border: 2px dashed var(--line); border-radius: 12px; overflow: hidden; cursor: pointer;
  background: #fafafa; transition: border-color .2s;
}
.pf-cover:hover { border-color: var(--red); }
.pf-cover.is-bad { border-color: var(--red); background: #fff8f8; }
.pf-cover input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pf-cover__empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; color: var(--ink-30);
  pointer-events: none;
}
.pf-cover__empty i   { font-size: 32px; }
.pf-cover__empty span { font-size: var(--fz-sm); font-weight: 500; }
.pf-cover__empty small { font-size: var(--fz-xs); }
.pf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }

/* Gallery drop zone */
.pf-drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 28px 20px;
  text-align: center; cursor: pointer; background: #fafafa; transition: all .2s;
  position: relative;
}
.pf-drop:hover, .pf-drop.drag-over { border-color: var(--red); background: #fff4f4; }
.pf-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pf-drop i { font-size: 28px; color: var(--ink-30); display: block; margin-bottom: 8px; }
.pf-drop strong { font-size: var(--fz-sm); display: block; margin-bottom: 4px; }
.pf-drop small { font-size: var(--fz-xs); color: var(--ink-30); }

/* Gallery thumbnails */
.pf-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.pf-gal__item {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--line);
}
.pf-gal__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-gal__rm {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: none; cursor: pointer;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.pf-gal__item:hover .pf-gal__rm { opacity: 1; }

/* File picker buttons */
.pf-file {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 9px; background: #fafafa;
  transition: border-color .15s, background .15s;
}
.pf-file:hover { border-color: var(--red); background: #fff4f4; }
.pf-file.is-bad { border-color: var(--red); background: #fff8f8; }
.pf-file i { font-size: 20px; color: var(--ink-30); }
.pf-file span { font-size: var(--fz-sm); color: var(--ink-80); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-file input[type="file"] { display: none; }

/* Sidebar submit button */
.pa-save { width: 100%; }

/* ── Done screen ──────────────────────────────────────────────── */
.pp-done-ic { font-size: 64px; color: #22c55e; margin-bottom: 16px; }
.pp-done-code {
  background: var(--bg); border-radius: 12px;
  padding: 18px 24px; margin: 20px 0 16px; display: inline-block; min-width: 220px;
}
.pp-done-code__label { font-size: var(--fz-xs); color: var(--ink-50); margin-bottom: 4px; }
.pp-done-code__val { font-size: 32px; font-weight: 800; letter-spacing: 3px; color: var(--ink); }
.pp-done-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ── Footer ───────────────────────────────────────────────────── */
.pp-footer { text-align: center; padding: 24px; color: var(--ink-30); font-size: var(--fz-xs); }

/* ── Utility: residential-only fields ─────────────────────────── */
[data-res][hidden] { display: none !important; }
[data-res] { display: block; }

/* ── Loading state ────────────────────────────────────────────── */
.pp-btn.is-loading { opacity: .7; cursor: not-allowed; }
.pp-btn.is-loading::after { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; margin-left: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
