/* Davis Appliance Repair — Shared Styles */

/* Ensure [hidden] works even when author CSS sets display on the element */
[hidden] { display: none !important; }
/*
@font-face {
  font-family: 'Renogare';
  src: url('/fonts/Renogare.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}
*/

:root {
  --purple: #72107C;
  --purple-dark: #631A70;
  --purple-deep: #2d0d38;
  --green: #6EA42B;
  --green-dark: #4B8108;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #e0d5e3;
  --font-heading: 'Renogare', Georgia, serif;
  --font-body: system-ui, -apple-system, sans-serif;
  --max-width: 960px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--purple-deep);
  line-height: 1.6;
}

/* ── Nav ── */
nav {
  background: #fff;
  min-height: 130px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% calc(100% - 18px),
    calc(50% + 22px) calc(100% - 18px),
    50% 100%,
    calc(50% - 22px) calc(100% - 18px),
    0% calc(100% - 18px)
  );
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
  margin-bottom: -18px;
}

.nav-left {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-left a {
  color: #fff;
  background: var(--purple);
  text-decoration: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-left a:hover,
.nav-left a.active {
  background: var(--purple-dark);
}

.nav-brand {
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  align-self: end;
}

.nav-logo {
  height: 156px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-cta {
  background: var(--green);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 1rem;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-cta:hover { background: var(--green-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--purple);
  padding: 0.25rem 0.5rem;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ── Page wrapper — white column on dark body ── */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  background: #fff;
  min-height: calc(100vh - 83px);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 2.25rem 2rem 1.25rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--purple);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

/* ── Main content ── */
main {
  padding: 1.25rem 2rem 2rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); }

.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}
.btn-outline:hover { background: #f4eef6; }

/* ── Sections ── */
section { margin-bottom: 2rem; }

section h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--purple);
  margin-bottom: 0.9rem;
}

/* ── Meet Tony ── */
.meet-tony {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.meet-tony img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  border: 3px solid var(--border);
}

/* ── Appliance list (DIY section) ── */
.appliance-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.appliance-list li::before {
  content: '✓ ';
  color: var(--green);
  font-weight: 700;
}

/* ── Service section ── */
.service-section { text-align: center; }

.appliance-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.appliance-tags span {
  background: #f4eef6;
  color: var(--purple);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.3rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.brand-groups {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.brand-group {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.brand-group strong {
  color: var(--purple);
  white-space: nowrap;
}

.brand-group span {
  color: var(--text-muted);
}

.not-covered {
  display: inline-block;
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #7a5f00;
  border-radius: var(--radius);
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

/* ── How it works ── */
.steps {
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.step {
  counter-increment: steps;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step::before {
  content: counter(steps);
  background: var(--purple);
  color: #fff;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ── CTA banner ── */
.cta-banner {
  background: var(--purple);
  color: #fff;
  text-align: center;
  padding: 2.25rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.cta-banner h2 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.cta-banner p {
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

/* ── Find-a-tech form ── */
.lookup-form {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 160px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  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 d='M1 1l5 5 5-5' stroke='%23555' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.form-group select:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

/* ── Results ── */
.results { margin-top: 1.5rem; }

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-card h3 {
  font-family: var(--font-heading);
  color: var(--purple);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.result-card .contact-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.result-message {
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.result-message.out-of-area {
  background: #f4eef6;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.result-message.no-coverage {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #7a5f00;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    min-height: unset;
    gap: 0;
    clip-path: none;
    filter: none;
    margin-bottom: 0;
  }

  .nav-brand { order: 1; flex: 1; justify-content: center; }
  .nav-toggle { display: block; order: 2; position: static; transform: none; }
  .nav-left  { display: none; order: 3; flex-direction: column; width: 100%; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.5rem; }
  .nav-right { display: none; order: 4; width: 100%; padding-bottom: 0.75rem; }

  nav.open .nav-left,
  nav.open .nav-right { display: flex; }

  .nav-left a { padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-right { justify-content: center; }
  .nav-cta { width: 100%; text-align: center; }

  .nav-logo { height: 52px; }

  .page-wrapper { min-height: unset; }

  .hero { padding: 1.5rem 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 1rem; }

  main { padding: 1.25rem 1rem; }
  footer { padding: 1.25rem 1rem; }

  .meet-tony { flex-direction: column; }
  .meet-tony img { width: 100%; height: 240px; }

  .appliance-list { columns: 1; }
  .form-row { flex-direction: column; }

  .cta-banner { padding: 1.5rem 1rem; }
  .cta-banner h2 { font-size: 1.3rem; }

  .result-card { flex-direction: column; align-items: flex-start; }
}

/* ── Intake wizard ── */
.intake-wizard {
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.wizard-progress {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: #f8f8f8;
  border-right: 1px solid var(--border);
}

.progress-step:last-child { border-right: none; }
.progress-step.done { background: #efe8f5; color: var(--purple); }
.progress-step.active { background: var(--purple); color: #fff; }

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.wizard-step h2 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--purple-deep);
}

.form-group input,
.form-group textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.form-group textarea { resize: vertical; }

.optional {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.wizard-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  justify-content: flex-end;
}

.wizard-error {
  background: #fff3f3;
  border: 1px solid #f5c0c0;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #c0392b;
}

.review-grid {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.review-row {
  display: flex;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.review-row:last-child { border-bottom: none; }
.review-row:nth-child(even) { background: #fafafa; }

.review-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 110px;
  flex-shrink: 0;
}

.review-value { color: var(--text); flex: 1; }

.btn-edit-review {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0 0.15rem;
  flex-shrink: 0;
  opacity: 0.5;
  align-self: flex-start;
  line-height: 1.6;
}
.btn-edit-review:hover { opacity: 1; color: var(--purple); }

.diag-summary {
  margin-top: 0.6rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}
.diag-section {
  margin-bottom: 0.4rem;
}
.diag-issue-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--purple);
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}
.diag-issues-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.diag-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.1rem 0;
  flex-wrap: wrap;
}
.diag-q {
  color: var(--text-muted);
  flex-shrink: 0;
}
.diag-q::after { content: ':'; }
.diag-a {
  color: var(--text);
  font-weight: 500;
}
.diag-flag {
  font-size: 0.85rem;
  color: #c0392b;
  font-weight: 500;
}

.territory-msg {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.territory-none {
  background: #fff3f3;
  border: 1px solid #f5c0c0;
  color: #c0392b;
}
.territory-other {
  background: #f5f0fb;
  border: 1px solid #c9b3e8;
  color: var(--purple-deep);
}
.territory-msg p { margin-top: 0.5rem; }

.added-appliances {
  background: #f8f5fc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}
.added-appliances ul {
  margin: 0.35rem 0 0 1.25rem;
  padding: 0;
}
.added-appliances li { margin-bottom: 0.2rem; }

.appliance-actions { margin-top: 0.5rem; }

.location-question-label {
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.location-question-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
#location-question {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #f8f5fc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
#location-subform {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #f8f5fc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.subform-heading {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--purple-deep);
}

.appliance-heading-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}
.appliance-heading-row h2 { margin-bottom: 0; }

.btn-cancel-appliance {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-cancel-appliance:hover {
  border-color: #c0392b;
  color: #c0392b;
}

.photo-upload-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.warranty-box {
  background: #fff8e1;
  border: 1px solid #f0c040;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0 1rem;
}
.warranty-box h3 {
  font-size: 1rem;
  color: #7a5c00;
  margin-bottom: 0.5rem;
}
.warranty-box p { font-size: 0.95rem; color: #5a4200; }

.self-repair-options {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.6rem;
}
.self-repair-btn {
  padding: 0.45rem 1.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.self-repair-btn:hover {
  border-color: var(--purple);
}
.self-repair-btn.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.self-repair-notice {
  background: #fff3cd;
  border: 1px solid #f0c040;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #5a4200;
}

.btn-trash {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 0.25rem;
  margin-left: 0.4rem;
  line-height: 1;
  vertical-align: middle;
}
.btn-trash:hover { color: #c0392b; }

.added-appliances li {
  display: flex;
  align-items: center;
}

/* ── Step 4: Diagnostic Questions ─────────────────────────────────────────── */

.appl-q-header {
  margin-bottom: 1.25rem;
}
.appl-q-num {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.appl-q-title {
  font-size: 1.15rem;
  color: var(--purple-deep);
  margin: 0;
}

.question-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fff;
}
.question-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.issue-section-title {
  color: var(--purple);
}

.issue-picker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.issue-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.12s, background 0.12s;
}
.issue-btn:hover {
  border-color: var(--purple);
  background: #faf4fb;
}
.issue-btn.active {
  border-color: var(--purple);
  background: #f3e8f7;
  font-weight: 600;
  color: var(--purple-deep);
}

.q-block {
  margin-bottom: 1rem;
}
.q-block:last-child { margin-bottom: 0; }

.q-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.q-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0;
}
.q-radio-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.q-select {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: #fff;
}

.q-text {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}
.q-text:focus, .q-select:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.issue-question-block {
  background: #faf4fb;
  border-color: #d9c6e0;
}

/* ── Step 4 progress bar ────────────────────────────────────────────────────── */
#step4-progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin: 0.6rem 0 1.5rem;
  overflow: hidden;
}
#step4-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.q-issue-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--purple);
  margin: 0 0 0.75rem;
}
