/* Repair.sg booking form theme — derived from repair.sg global.css + booking screenshots */
:root {
  --dark: #333;
  --text: #212529;
  --muted: #666;
  --yellow: #f2c94c;
  --gold: #b8860b;
  --green: #18ba3f;
  --grey-bg: #f8f8f8;
  --border: #e3e3e3;
  --error: #d33;
  --radius: 12px;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 18px;
  color: var(--text);
  line-height: 1.5;
  background: #fff;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }

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

/* Header */
.header { background: var(--dark); position: fixed; top: 0; left: 0; width: 100%; padding: 28px 0; z-index: 100; }
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.header__logo img { height: 48px; display: block; }
.header__phone { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; font-size: 20px; transition: transform .2s ease; }
.header__phone:hover { transform: scale(1.05); }

/* Layout */
.booking { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding-top: 150px; padding-bottom: 120px; align-items: start; }

/* Step panel */
.step__title { font-size: 34px; font-weight: 700; color: #444; margin-bottom: 10px; line-height: 1.15; }
.step__subtitle { color: var(--muted); margin-bottom: 25px; }
.step__error { color: var(--error); margin: 10px 0; font-weight: 600; }
.step__nav { display: flex; justify-content: space-between; margin-top: 30px; }
.step__nav--end { justify-content: flex-end; }

.panel { background: var(--grey-bg); border-radius: var(--radius); padding: 25px; margin-bottom: 20px; }
.panel__label { font-weight: 700; display: block; margin: 18px 0 12px; }
.panel__label:first-child { margin-top: 0; }
.panel__hint { color: var(--muted); font-size: 16px; margin-top: 12px; }
.panel__hint a { color: #7677bd; }

/* Service selection cards */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 10px; }
.service-card { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 35px 20px; text-align: center; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.service-card.is-selected { border-color: var(--yellow); background: #fffbe8; }
.service-card__icon { font-size: 44px; margin-bottom: 14px; }
.service-card__label { font-weight: 600; }

/* Quantity steppers */
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 20px; margin-bottom: 12px; flex-wrap: wrap; }
.stepper-row__info { flex: 1 1 240px; }
.stepper-row__name { font-weight: 600; }
.stepper-row__price { color: var(--muted); font-size: 16px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--yellow); font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper button:disabled { background: #eee; color: #aaa; cursor: default; }
.stepper__value { min-width: 30px; text-align: center; font-weight: 700; font-size: 20px; }

/* Form fields */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="number"], .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid #ccc; border-radius: 8px; font: inherit; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field--error input, .field--error textarea { border-color: var(--error); }
.field__error { color: var(--error); font-size: 15px; margin-top: 5px; }
.field[hidden] { display: none; }

.typeahead { position: relative; }
.typeahead__list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 50; max-height: 280px; overflow-y: auto; margin-top: 4px; }
.typeahead__item { padding: 12px 15px; cursor: pointer; font-size: 17px; }
.typeahead__item:hover, .typeahead__item:focus { background: #fffbe8; outline: none; }
.typeahead__item + .typeahead__item { border-top: 1px solid var(--border); }
.typeahead__status { color: var(--muted); font-size: 16px; margin-top: 8px; }
.typeahead__box { position: relative; }
.typeahead__box input { padding-right: 48px; }
.typeahead__input--locked { background: #fffbe8 !important; border-color: var(--yellow) !important; font-weight: 600; }
.typeahead__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: none; border-radius: 50%; background: #eee; color: #555; font-size: 15px; font-weight: 700; cursor: pointer; line-height: 1; }
.typeahead__clear:hover { background: #e0e0e0; }

/* Photo upload */
.photo-preview img { max-height: 180px; border-radius: 8px; display: block; margin-bottom: 10px; }

/* Calendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 15px; }
.cal-nav__label { font-weight: 600; }
.cal-nav button { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--yellow); cursor: pointer; font-size: 18px; font-weight: 700; }
.cal-nav button:disabled { background: #eee; color: #aaa; cursor: default; }
.date-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 10px; }
.date-chip { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 14px 6px; text-align: center; cursor: pointer; }
.date-chip.is-selected { border-color: var(--yellow); background: #fffbe8; }
.date-chip__dow, .date-chip__month { font-size: 15px; color: var(--muted); }
.date-chip__day { font-size: 24px; font-weight: 700; }
.slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.slot-card { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; cursor: pointer; }
.slot-card.is-selected { border-color: var(--yellow); background: #fffbe8; }
.slot-card__name { font-weight: 700; }
.slot-card__time { color: var(--muted); font-size: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 28px; padding: 15px 40px; font: inherit; font-weight: 700; cursor: pointer; transition: transform .1s ease; text-decoration: none; }
.btn:hover { transform: scale(1.04); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn--next { background: var(--yellow); color: #333; }
.btn--back { background: #e4e4e4; color: #333; }
.btn--whatsapp { background: var(--green); color: #fff; gap: 10px; width: 100%; }
.btn--whatsapp svg { fill: #fff; }

/* Sidebar */
.sidebar-card { background: #fff; border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.08); padding: 25px; margin-bottom: 25px; }
.sidebar-card h3 { font-size: 22px; margin-bottom: 15px; color: #333; }
.price-block { background: var(--grey-bg); border-left: 4px solid var(--yellow); padding: 15px; margin-bottom: 15px; }
.price-block__title { color: var(--gold); font-weight: 700; margin-bottom: 5px; }
.price-block__line { font-size: 16px; color: #444; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.price-block__amount { white-space: nowrap; font-weight: 600; }
.price-block__subtotal { font-weight: 700; margin-top: 8px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 6px; }
.sidebar-total { font-size: 20px; margin-top: 5px; }
.sidebar-empty { color: var(--muted); font-size: 16px; margin-bottom: 10px; }

/* Review */
.review-block { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.review-block h4 { margin-bottom: 6px; }
.review-block p { color: #444; font-size: 17px; margin-bottom: 4px; }

/* Thank-you (full-page: sidebar is hidden on this step) */
.booking--full { grid-template-columns: 1fr; }
.booking--full .booking__sidebar { display: none; }
.thanks { text-align: center; padding: 80px 0; max-width: 560px; margin: 0 auto; }
.thanks .btn--whatsapp { max-width: 340px; margin: 25px auto 0; }

/* Mobile bar (hidden on desktop) */
.mobile-bar { display: none; }

@media (max-width: 991px) {
  .booking { grid-template-columns: 1fr; padding-top: 120px; padding-bottom: 140px; }
  .booking__sidebar { display: none; }

  .header { padding: 18px 0; }
  .header__logo img { height: 40px; }
  .header__phone span { display: none; }

  .step__title { font-size: 28px; }

  .mobile-bar { display: block; position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.12); z-index: 90; }
  .mobile-bar__drawer { display: none; max-height: 45vh; overflow-y: auto; padding: 15px; border-bottom: 1px solid var(--border); }
  .mobile-bar__drawer.is-open { display: block; }
  .mobile-bar__row { display: flex; align-items: center; gap: 10px; padding: 12px 15px; }
  .mobile-bar__total { font-weight: 700; font-size: 19px; margin-right: auto; }
  .btn--details { background: var(--yellow); color: #333; padding: 10px 18px; font-size: 16px; }
  .mobile-bar .btn--next { padding: 10px 24px; font-size: 16px; }
  .step__nav .btn--next { display: none; } /* Next lives in the sticky bar on mobile */
}
