/* PetPal — warm, clean, mobile-first. */
:root {
  --sand:   #fdf8f2;
  --card:   #ffffff;
  --ink:    #2c2420;
  --muted:  #7a6f66;
  --line:   #ece3d8;
  --brand:  #e07a3f;      /* warm terracotta */
  --brand-d:#c25e28;
  --brand-t:#fbe9dc;
  --green:  #2f8f5b;
  --green-t:#e4f3ea;
  --red:    #c0392b;
  --red-t:  #fbe7e4;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(70,50,30,.06), 0 8px 28px rgba(70,50,30,.05);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  font-size: 16px;
}
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff;
  padding: 10px 14px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-inner { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.brand-mark { color: var(--brand); }
.brand-name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  appearance: none; border: 1px solid var(--line); background: var(--sand);
  color: var(--ink); padding: 8px 14px; border-radius: 999px; font-size: .92rem;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.tab:hover { border-color: var(--brand); }
.tab[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab:focus-visible, .btn:focus-visible, input:focus-visible, .slot:focus-visible, .service:focus-visible {
  outline: 3px solid var(--brand-t); outline-offset: 2px;
}

/* Panels */
.panel { padding: 22px 0 40px; }
.hero { margin-bottom: 18px; }
h1 { font-size: 1.7rem; margin: 0 0 6px; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; margin: 0 0 10px; }
.lede { color: var(--muted); margin: 0 0 4px; font-size: 1.02rem; }

/* Cards & forms */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.form.narrow { max-width: 420px; }
fieldset { border: none; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; font-size: 1.05rem; padding: 0; margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-weight: 600; font-size: .92rem; }
.req { color: var(--brand-d); }
.opt, .hint { color: var(--muted); font-weight: 400; }
.hint { font-size: .82rem; }
input[type="text"], input[type="tel"], input[type="date"], input[type="password"] {
  font-family: inherit; font-size: 1rem; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
input:focus { border-color: var(--brand); }
input.invalid { border-color: var(--red); background: var(--red-t); }
.field-error { color: var(--red); font-size: .86rem; margin: 8px 0 0; font-weight: 600; }

/* Services */
.services { display: grid; grid-template-columns: 1fr; gap: 10px; }
.service {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 2px solid var(--line); border-radius: 12px; padding: 14px; background: #fff;
  cursor: pointer; text-align: left; font-family: inherit; font-size: 1rem; color: var(--ink);
}
.service:hover { border-color: var(--brand); }
.service[aria-checked="true"] { border-color: var(--brand); background: var(--brand-t); }
.service-name { font-weight: 700; }
.service-desc { color: var(--muted); font-size: .85rem; }
.service-price { font-weight: 800; font-size: 1.1rem; color: var(--brand-d); white-space: nowrap; }

/* Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slots-placeholder { grid-column: 1 / -1; margin: 4px 0; }
.slot {
  appearance: none; border: 2px solid var(--line); background: #fff; color: var(--ink);
  padding: 10px 6px; border-radius: 10px; font-family: inherit; font-size: .95rem;
  font-weight: 600; cursor: pointer;
}
.slot:hover:not(:disabled) { border-color: var(--brand); }
.slot[aria-checked="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.slot:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

/* Summary */
.summary { margin: 0 0 14px; }
.summary:not(:empty) {
  background: var(--brand-t); border-radius: 10px; padding: 12px 14px; font-size: .95rem;
}
.summary strong { color: var(--brand-d); }

/* Buttons */
.btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-family: inherit; font-size: 1rem; font-weight: 700; padding: 12px 18px;
  border-radius: 10px; cursor: pointer;
}
.btn:hover { border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-lg { width: 100%; padding: 15px; font-size: 1.08rem; }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-danger { background: var(--red-t); border-color: var(--red-t); color: var(--red); font-size: .85rem; padding: 8px 12px; }
.btn-danger:hover { border-color: var(--red); }

.form-status { margin: 12px 0 0; font-weight: 600; min-height: 1.2em; }
.form-status.error { color: var(--red); }
.form-status.ok { color: var(--green); }

/* Confirmation */
.confirm { margin-top: 18px; text-align: center; border-color: var(--green); }
.confirm-tick {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--green-t); color: var(--green); font-size: 1.8rem; line-height: 54px; font-weight: 800;
}
.confirm-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; max-width: 360px; margin: 14px auto; }
.confirm-details dt { color: var(--muted); font-weight: 600; }
.confirm-details dd { margin: 0; font-weight: 600; }

/* Bookings list */
.bookings-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.booking {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
}
.booking-when { font-weight: 700; }
.booking-svc { color: var(--brand-d); font-weight: 700; }
.booking-meta { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.booking-notes { font-size: .9rem; margin-top: 4px; }
.booking.past { opacity: .6; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); margin-left: 6px; }

.empty {
  text-align: center; padding: 34px 18px; border: 2px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); background: #fff;
}
.empty-icon { color: var(--brand); opacity: .8; margin-bottom: 4px; }
.empty-cta { margin-top: 10px; }

.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dash-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stat { line-height: 1.1; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .82rem; }

.disclaimer { color: var(--muted); font-size: .82rem; margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 12px; }
.muted { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 20px; }
.site-footer p { padding: 16px 0; font-size: .88rem; }

/* Wider screens */
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .header-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  h1 { font-size: 2rem; }
}
