/*
  FindMyService — main.css
  NOTE: Design tokens live at the top as CSS variables. Change the look of
  the whole app by editing this block only — nothing below should hardcode
  a raw color/font value outside of it.

  Signature idea: hand-painted shop-signboard vernacular (deep signage
  teal + mustard, thick ink display type) — a nod to the neighborhood
  repair shops / roadside signage this marketplace is standing in for,
  rather than a generic SaaS look.
*/

:root {
  /* CONFIG: palette — 4-6 named tokens, edit here to re-theme */
  --paper: #EEF0E8;        /* page background — pale sage-grey, not cream */
  --paper-raised: #FFFFFF; /* card surfaces */
  --ink: #17233D;          /* primary text / display */
  --ink-soft: #4B5768;     /* secondary text */
  --teal: #0F6B5C;         /* brand primary — signage teal */
  --teal-deep: #0A4E43;
  --mustard: #E8A93B;      /* accent — stars, badges, highlights */
  --brick: #C1442D;        /* alerts, reject/destructive actions */
  --line: #D8D9CC;         /* hairline borders */
  --shadow: 0 1px 0 rgba(23,35,61,0.06), 0 6px 20px rgba(23,35,61,0.06);

  /* CONFIG: type scale */
  --font-display: "Fraunces", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: var(--teal); }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------------------------------------------------------------------- */
/* Layout helpers                                                         */
/* ---------------------------------------------------------------------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.center-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
}

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }
/* Prevents flex children with long unbroken text (e.g. error/notice
   messages) from forcing .stack/.row containers wider than intended —
   flex items default to min-width:auto, which lets content size override
   the container width unless explicitly reset here. */
.stack > *, .row > * { min-width: 0; }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--teal); border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); }

.btn-outline { background: transparent; color: var(--ink); }

.btn-danger { background: var(--brick); border-color: var(--brick); }

.btn-block { width: 100%; }

.btn-link {
  background: none;
  border: none;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

/* ---------------------------------------------------------------------- */
/* Cards                                                                  */
/* ---------------------------------------------------------------------- */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: width 0.5s ease;
}

/* signboard card — used for role-selection and feature-selection choices */
.signboard {
  position: relative;
  background: var(--paper-raised);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}
.signboard:hover { transform: rotate(-0.6deg) translateY(-3px); box-shadow: 0 10px 28px rgba(23,35,61,0.12); }
.signboard::before {
  /* corner "screw" detail — nod to a bolted-on shop sign */
  content: "";
  position: absolute;
  top: 10px; left: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.35;
}
.signboard::after {
  content: "";
  position: absolute;
  bottom: 10px; right: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.35;
}
.signboard h3 { font-size: 26px; margin-bottom: 6px; }
.signboard p { color: var(--ink-soft); margin: 0; }
.signboard.selected { border-color: var(--teal); background: #F4FAF8; }

.signboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 640px;
}
@media (max-width: 560px) {
  .signboard-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                  */
/* ---------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field textarea { resize: vertical; min-height: 90px; font-family: var(--font-body); }

.form-error {
  color: var(--brick);
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
}
.form-success { color: var(--teal-deep); font-size: 14px; font-weight: 600; }

fieldset { border: none; padding: 0; margin: 0; }
legend { font-family: var(--font-display); font-size: 18px; margin-bottom: 12px; padding: 0; }

/* ---------------------------------------------------------------------- */
/* Nav / dashboard header                                                 */
/* ---------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
}
.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark-sm {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}
.wordmark-sm .fms-accent { color: var(--teal); }

.icon-btn {
  position: relative;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--brick);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------------- */
/* Post box (Reddit-style creation) — UI/UX 4.1                          */
/* ---------------------------------------------------------------------- */
.post-box {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.post-box .prompt-heading {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.post-list-item {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: fit-content;
}
.status-pill.draft { color: var(--ink-soft); }
.status-pill.pending_review { color: var(--mustard); border-color: var(--mustard); }
.status-pill.confirmed, .status-pill.active { color: var(--teal); border-color: var(--teal); }
.status-pill.completed { color: var(--ink-soft); background: var(--line); }

/* ---------------------------------------------------------------------- */
/* Star rating display — always visible per working doc                  */
/* ---------------------------------------------------------------------- */
.stars { color: var(--mustard); font-size: 15px; letter-spacing: 1px; }
.stars .count { color: var(--ink-soft); font-family: var(--font-mono); font-size: 13px; margin-left: 4px; }

/* ---------------------------------------------------------------------- */
/* Utility text                                                           */
/* ---------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.muted { color: var(--ink-soft); }
