/* Book A Repair - front office */

.bar-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.bar-intro {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.bar-alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* ---------- discount notice ---------- */

.bar-notice {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid #b7e4c7;
  border-radius: 8px;
  background: #f2fbf5;
  color: #1b4332;
  /* Centred, as a banner rather than a sentence of body copy. */
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.bar-notice-text {
  display: block;
}

.bar-notice-text a {
  color: #1b4332;
  text-decoration: underline;
}

.bar-notice-text strong,
.bar-notice-text b {
  font-weight: 700;
}

/* Sits between the last field and the submit button, so it needs air
   above it rather than below. */
.bar-notice-inline {
  margin: 0.75rem 0 1rem;
  font-size: 0.95rem;
}

/* ---------- guided journey ---------- */

.bar-progress-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  counter-reset: bar-step;
}

/* Hidden until JS turns the form into steps, so no-JS users see no rail. */
.bar-progress-rail:empty {
  display: none;
}

.bar-progress-step {
  flex: 1 1 140px;
  min-width: 110px;
}

.bar-progress-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  background: #fff;
  color: #6c757d;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.bar-progress-btn:disabled {
  cursor: default;
  opacity: 0.75;
}

.bar-progress-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e9edf0;
  color: #6c757d;
  font-size: 0.78rem;
  font-weight: 700;
}

.bar-progress-current .bar-progress-btn {
  border-color: #2b6cb0;
  color: #2b6cb0;
  font-weight: 600;
}

.bar-progress-current .bar-progress-num {
  background: #2b6cb0;
  color: #fff;
}

.bar-progress-done .bar-progress-btn {
  border-color: #cfe3d6;
  color: #1a7f37;
}

.bar-progress-done .bar-progress-num {
  background: #1a7f37;
  color: #fff;
}

.bar-progress-btn:focus-visible {
  outline: 2px solid #2b6cb0;
  outline-offset: 2px;
}

.bar-step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 0.25rem;
}

.bar-step-nav .bar-step-next {
  margin-left: auto;
}

/* ---------- model photo cards ---------- */

.bar-model-search {
  margin: 0.6rem 0 0.2rem;
}

.bar-model-search-input {
  max-width: 320px;
}

.bar-model-search[hidden] {
  display: none;
}

.bar-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  margin: 0.6rem 0 0.5rem;
}

.bar-model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.7rem 0.5rem;
  border: 1px solid #e0e4e8;
  border-radius: 10px;
  background: #fff;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bar-model-card:hover {
  border-color: #b9c4cd;
}

.bar-model-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.bar-model-img {
  width: 100%;
  max-width: 110px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.bar-model-caption {
  font-size: 0.85rem;
  line-height: 1.3;
}

.bar-model-tick {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2b6cb0;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.bar-model-card input:checked ~ .bar-model-tick {
  opacity: 1;
  transform: scale(1);
}

.bar-model-card input:checked ~ .bar-model-caption {
  font-weight: 600;
  color: #2b6cb0;
}

.bar-model-card:has(input:checked) {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

/* :has() is widely supported but not universal - keep a visible fallback. */
.bar-model-card input:focus-visible ~ .bar-model-caption {
  outline: 2px solid #2b6cb0;
  outline-offset: 3px;
}

@media (max-width: 420px) {
  .bar-model-grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
}

.bar-fieldset {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 1.5rem;
}

.bar-fieldset legend {
  width: auto;
  padding: 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: 0;
  margin-bottom: 0;
}

.bar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
}

.bar-col {
  flex: 1 1 240px;
  min-width: 0;
}

.bar-req {
  color: #cf222e;
}

/* Honeypot - visually and semantically out of the way, but not display:none,
   which some bots specifically skip. */
.bar-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bar-brand-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.75rem;
}

.bar-brand-card {
  flex: 0 1 auto;
  padding: 0.6rem 1.1rem;
  border: 1px solid #e0e4e8;
  border-radius: 999px;
  background: #f6f8fa;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bar-brand-card:hover {
  border-color: #2b6cb0;
  background: #fff;
  text-decoration: none;
}

.bar-other-input {
  margin-top: 0.5rem;
}

.bar-other-input[hidden] {
  display: none;
}

.bar-service-price:not(:empty)::before {
  content: "from ";
}

.bar-service-price {
  font-weight: 600;
}

/* ---------- repair type checkboxes ---------- */

.bar-service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0.5rem;
}

/* Photo mode: wider cards so the image and the label both have room. */
.bar-service-list-photo .bar-check-card {
  align-items: center;
  flex: 1 1 260px;
}

.bar-check-img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #f4f6f8;
}

.bar-check-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex: 1 1 240px;
  max-width: 100%;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid #e0e4e8;
  border-radius: 6px;
  background: #fff;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bar-check-card:hover {
  border-color: #b9c4cd;
}

.bar-check-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.bar-check-box {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #b9c4cd;
  border-radius: 4px;
  background: #fff;
}

.bar-check-card input:checked ~ .bar-check-box {
  border-color: #2b6cb0;
  background: #2b6cb0;
}

.bar-check-card input:checked ~ .bar-check-box::after {
  content: "";
  display: block;
  width: 4px;
  height: 9px;
  margin: 1px 0 0 5px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.bar-check-card input:focus-visible ~ .bar-check-box {
  outline: 2px solid #2b6cb0;
  outline-offset: 2px;
}

.bar-check-card input:checked ~ .bar-check-text {
  font-weight: 600;
}

.bar-check-text {
  line-height: 1.35;
}

.bar-check-price {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #6c757d;
}

.bar-no-services {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #6c757d;
}

/* ---------- store picker ---------- */

.bar-store-list {
  margin-top: 0.6rem;
  border: 1px solid #e0e4e8;
  border-radius: 6px;
  overflow: hidden;
}

.bar-store-item + .bar-store-item {
  border-top: 1px solid #e9edf0;
}

.bar-store-radio {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.bar-store-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.85rem 1rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bar-store-label:hover {
  background: #f6f8fa;
}

/* The pin doubles as the radio indicator. */
.bar-store-pin {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 2px solid #c8d1d9;
  border-radius: 50%;
  color: #9aa5ad;
  background: #fff;
}

.bar-store-radio:checked ~ .bar-store-label .bar-store-pin {
  border-color: #2b6cb0;
  background: #2b6cb0;
  color: #fff;
}

.bar-store-radio:focus-visible ~ .bar-store-label .bar-store-pin {
  outline: 2px solid #2b6cb0;
  outline-offset: 2px;
}

.bar-store-heading {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.bar-store-name {
  font-weight: 600;
}

.bar-store-radio:checked ~ .bar-store-label .bar-store-name {
  color: #2b6cb0;
}

.bar-store-city {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Details are collapsed until this store is the selected one. */
.bar-store-details {
  display: none;
  padding: 0 1rem 1rem 3.7rem;
  font-size: 0.9rem;
  color: #444;
}

.bar-store-radio:checked ~ .bar-store-details {
  display: block;
}

.bar-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  padding: 0.2rem 0;
}

.bar-store-key {
  flex: 0 0 110px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a949a;
  padding-top: 0.12rem;
}

.bar-store-row-hours {
  align-items: flex-start;
}

.bar-hours-table {
  margin: 0;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.bar-hours-table th,
.bar-hours-table td {
  padding: 0.15rem 0.9rem 0.15rem 0;
  text-align: left;
  vertical-align: top;
  border: 0;
  font-weight: 400;
  white-space: nowrap;
}

.bar-hours-table th {
  color: #6c757d;
  font-weight: 400;
}

.bar-hours-table tr + tr th,
.bar-hours-table tr + tr td {
  border-top: 1px solid #eef1f4;
}

.bar-store-note {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e0e4e8;
  font-size: 0.88rem;
  color: #6c757d;
}

@media (max-width: 575px) {
  .bar-store-details {
    padding-left: 1rem;
  }

  .bar-store-key {
    flex: 0 0 100%;
  }
}

.bar-file-feedback {
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

.bar-file-feedback .bar-file-error {
  color: #cf222e;
}

.bar-consent {
  margin: 1rem 0 1.5rem;
}

.bar-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}

.bar-checkbox input {
  margin-top: 0.25rem;
  flex: 0 0 auto;
}

.bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.bar-link {
  font-size: 0.9rem;
  text-decoration: underline;
}

/* ---------- tracking page ---------- */

.bar-track-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #f6f8fa;
  border-left: 5px solid #9aa0a6;
  border-radius: 4px;
}

.bar-ref-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
}

.bar-ref {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.bar-status-badge {
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.bar-progress {
  height: 8px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0 1.5rem;
}

.bar-progress-fill {
  height: 100%;
  transition: width 0.4s ease;
}

.bar-note {
  background: #fff8e5;
  border: 1px solid #ffe08a;
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
}

.bar-note p {
  margin: 0.4rem 0 0;
}

.bar-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin: 0 0 1.5rem;
}

.bar-details > div {
  min-width: 160px;
}

.bar-details dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  font-weight: 600;
}

.bar-details dd {
  margin: 0.2rem 0 0;
}

.bar-price {
  font-weight: 700;
}

.bar-service-tags {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

.bar-service-tags li {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin: 0 0.3rem 0.3rem 0;
  border: 1px solid #cfe3fb;
  border-radius: 999px;
  background: #eaf3fc;
  font-size: 0.85rem;
}

.bar-desc h3,
.bar-photos h3,
.bar-timeline h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.bar-desc {
  margin-bottom: 1.5rem;
}

.bar-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.bar-photo-grid img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e5e5e5;
}

.bar-timeline ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid #e9ecef;
}

.bar-timeline li {
  position: relative;
  padding: 0 0 1.25rem 0.75rem;
}

.bar-dot {
  position: absolute;
  left: -1.85rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e9ecef;
}

.bar-timeline-status {
  font-weight: 600;
}

.bar-timeline-date {
  font-size: 0.8rem;
  color: #6c757d;
}

.bar-timeline-note {
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

/* ---------- message thread ---------- */

.bar-thread {
  margin: 2rem 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e9ecef;
}

.bar-thread-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.bar-thread-list li {
  max-width: 82%;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.bar-msg-shop {
  background: #f6f8fa;
  border: 1px solid #e5e9ed;
}

.bar-msg-customer {
  margin-left: auto;
  background: #eaf3fc;
  border: 1px solid #cfe3fb;
}

.bar-msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  color: #6c757d;
}

.bar-msg-body {
  font-size: 0.95rem;
  line-height: 1.55;
  word-break: break-word;
}

.bar-msg-body p:last-child,
.bar-msg-body ul:last-child,
.bar-msg-body ol:last-child {
  margin-bottom: 0;
}

.bar-msg-body ul,
.bar-msg-body ol {
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}

.bar-reply textarea {
  margin-bottom: 0.75rem;
}

.bar-msg-files {
  margin-top: 0.5rem;
}

.bar-file-chip {
  display: inline-block;
  max-width: 100%;
  padding: 0.35rem 0.7rem;
  margin: 0 0.35rem 0.35rem 0;
  border: 1px solid #cfd6dc;
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  text-decoration: none;
  word-break: break-all;
}

.bar-file-chip:hover {
  border-color: #2b6cb0;
  text-decoration: none;
}

/* ---------- widget / footer ---------- */

.bar-widget {
  padding: 1.5rem;
  background: #f6f8fa;
  border-radius: 6px;
  text-align: center;
}

.bar-widget-title {
  margin-top: 0;
}

.bar-widget .bar-link {
  display: block;
  margin-top: 0.75rem;
}

.bar-footer-links {
  margin-top: 0.5rem;
}

@media (max-width: 575px) {
  .bar-row {
    display: block;
  }

  .bar-track-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
