/*
 * PodoClick public location search — v33
 * Final, isolated layer for the ergonomic desktop/mobile booking flow.
 */

.pc-booking-lead__mobile {
  display: none;
}

.pc-booking-eyebrow {
  gap: 0.38rem;
  flex-wrap: wrap;
}

.pc-quick-booking-card {
  order: initial;
  padding: 32px;
  border: 1px solid rgba(214, 226, 238, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 68px rgba(16, 36, 55, 0.1);
  backdrop-filter: blur(18px) saturate(125%);
}

.pc-location-card__header {
  margin-bottom: 20px;
}

.pc-quick-booking-card .pc-location-card__header h2 {
  margin: 0;
  color: var(--pb-ink);
  font-size: clamp(1.55rem, 2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.pc-location-card__header p {
  margin: 9px 0 0;
  color: var(--pb-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.pc-location-field {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 78px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--pb-border-strong);
  border-radius: 18px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.pc-location-field:hover {
  border-color: #bfd7e7;
}

.pc-location-field:focus-within {
  border-color: #28b6dd;
  box-shadow: 0 0 0 4px rgba(42, 174, 234, 0.12);
}

.pc-location-field.is-invalid {
  border-color: #ef8f8f;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.1);
}

.pc-location-field__icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #668096;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pc-location-field__control {
  display: block;
  min-width: 0;
  cursor: text;
}

.pc-location-field__control > span {
  display: block;
  margin-bottom: 1px;
  color: #718397;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
}

.pc-location-field__control input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--pb-ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 32px;
  text-overflow: ellipsis;
}

.pc-location-field__control input::placeholder {
  color: #94a3b2;
  font-weight: 400;
  opacity: 1;
}

.pc-location-field__clear {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #66778a;
  font: inherit;
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.pc-location-field__clear:hover,
.pc-location-field__clear:focus-visible {
  background: #f0f7fb;
  color: var(--pb-ink);
}

.pc-location-field__clear:focus-visible,
.pc-location-detect:focus-visible,
.pc-location-submit:focus-visible,
.suggestion-item:focus-visible,
.pc-slot-preview__time:focus-visible,
.pc-slot-preview__more:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(42, 174, 234, 0.16);
}

.pc-location-field .suggestions-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 5200;
  display: none;
  max-height: min(360px, 44dvh);
  padding: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce6ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 36, 55, 0.18);
  scrollbar-width: thin;
}

.pc-location-field .suggestion-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 9px 11px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--pb-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pc-location-field .suggestion-item:hover,
.pc-location-field .suggestion-item.is-active {
  background: linear-gradient(135deg, #effffd, #f0f8ff);
  color: var(--pb-ink);
}

.suggestion-item__marker {
  color: #18aaa6;
  font-size: 0.72rem;
  text-align: center;
}

.suggestion-item__copy {
  display: block;
  min-width: 0;
}

.suggestion-item__copy strong,
.suggestion-item__copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-item__copy strong {
  color: var(--pb-ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.suggestion-item__copy small {
  margin-top: 2px;
  color: #748598;
  font-size: 0.76rem;
  font-weight: 400;
}

.pc-location-suggestions__empty {
  padding: 14px;
  color: #67798d;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.pc-location-suggestions__empty.is-loading::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid #c9eaf1;
  border-top-color: #18aaa6;
  border-radius: 50%;
  vertical-align: -2px;
  animation: pc-location-spin 700ms linear infinite;
}

.pc-location-detect {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 8px 0 6px;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #079da4;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.pc-location-detect:hover {
  color: #087e8a;
}

.pc-location-detect:disabled {
  cursor: wait;
  opacity: 0.68;
}

.pc-location-detect svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pc-location-detect.is-loading svg {
  animation: pc-location-pulse 900ms ease-in-out infinite alternate;
}

.pc-location-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(115deg, #17c9bc, #27aae9);
  box-shadow: 0 13px 28px rgba(30, 176, 211, 0.21);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.pc-location-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 17px 32px rgba(30, 176, 211, 0.27);
  filter: saturate(1.05);
}

.pc-location-submit:active {
  transform: translateY(0);
}

.pc-location-submit:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.pc-location-submit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.pc-location-submit:hover svg {
  transform: translateX(2px);
}

.pc-location-submit.is-loading svg {
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pc-location-spin 700ms linear infinite;
}

.pc-location-submit.is-loading svg path {
  display: none;
}

.pc-location-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 2px 0;
  color: #75869a;
  font-size: 0.78rem;
  line-height: 1.4;
}

.pc-location-privacy svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: #6f8498;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.pc-search-status {
  min-height: 0;
  margin: 11px 2px 0;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.pc-search-status.is-info,
.pc-search-status.is-muted {
  background: #f2f8fc;
  color: #496176;
}

.pc-search-status.is-success {
  background: #ecfbf5;
  color: #08724c;
}

.pc-search-status.is-error {
  background: #fff2f2;
  color: #a33636;
}

.pc-clinics-section {
  scroll-margin-top: 88px;
}

.clinics-list[aria-busy="true"] {
  cursor: progress;
}

.pc-slot-preview {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 15px 0 2px;
  border-top: 1px solid #e8eef4;
}

.pc-slot-preview__title {
  display: block;
  margin-bottom: 11px;
  color: #34495d;
  font-size: 0.84rem;
  font-weight: 600;
}

.pc-slot-preview__row {
  display: grid;
  grid-template-columns: minmax(92px, 126px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pc-slot-preview__row + .pc-slot-preview__row {
  margin-top: 8px;
}

.pc-slot-preview__date {
  color: #65778b;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: capitalize;
}

.pc-slot-preview__times {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pc-slot-preview__time {
  min-width: 68px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #cce8ec;
  border-radius: 12px;
  background: #f4fffd;
  color: #0b756f;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.pc-slot-preview__time:hover {
  border-color: #5fd1cb;
  background: #eafffb;
  transform: translateY(-1px);
}

.pc-slot-preview__more {
  min-height: 44px;
  margin-top: 9px;
  padding: 7px 2px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #0d8d98;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.pc-slot-preview__more:hover {
  color: #086c78;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pc-slot-preview__message {
  margin: 0;
  color: #687b8f;
  font-size: 0.82rem;
}

.pc-slot-preview__message.is-error {
  color: #9c4a4a;
}

.pc-slot-preview__skeleton {
  display: flex;
  gap: 8px;
}

.pc-slot-preview__skeleton span {
  display: block;
  width: 82px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(90deg, #edf3f7 25%, #f7fafc 45%, #edf3f7 65%);
  background-size: 240% 100%;
  animation: pc-slot-skeleton 1.2s ease infinite;
}

@keyframes pc-location-spin {
  to { transform: rotate(360deg); }
}

@keyframes pc-location-pulse {
  to { transform: translateY(-1px) scale(1.05); }
}

@keyframes pc-slot-skeleton {
  to { background-position: -180% 0; }
}

@media (max-width: 960px) {
  .pc-booking-hero-grid {
    gap: 26px;
  }

  .pc-quick-booking-card {
    order: initial;
    width: min(100%, 620px);
  }
}

@media (max-width: 768px) {
  .pc-public-booking .pc-booking-hero {
    padding: 28px 0 20px;
  }

  .pc-public-booking .pc-booking-hero-grid {
    gap: 20px;
  }

  .pc-booking-hero-copy {
    padding: 0;
  }

  .pc-booking-hero-logo,
  .pc-booking-hero-actions,
  .pc-booking-points,
  .pc-booking-lead__desktop,
  .pc-booking-eyebrow__desktop {
    display: none;
  }

  .pc-booking-lead__mobile {
    display: inline;
  }

  .pc-booking-eyebrow {
    min-height: 0;
    padding: 6px 9px;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .pc-public-booking .pc-booking-hero h1 {
    max-width: 650px;
    margin: 16px 0 13px;
    font-size: clamp(2.15rem, 9.4vw, 3.25rem);
    line-height: 1.03;
    letter-spacing: -0.065em;
  }

  .pc-public-booking .pc-booking-hero-copy p {
    font-size: 1rem;
    line-height: 1.58;
  }

  .pc-quick-booking-card {
    width: 100%;
    padding: 23px;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(16, 36, 55, 0.1);
  }

  .pc-location-card__header {
    margin-bottom: 17px;
  }

  .pc-quick-booking-card .pc-location-card__header h2 {
    font-size: 1.5rem;
    line-height: 1.18;
  }

  .pc-location-card__header p {
    margin-top: 7px;
    font-size: 0.88rem;
  }

  .pc-location-field {
    min-height: 76px;
  }

  .pc-location-field__control input {
    min-height: 32px;
    font-size: 16px;
  }

  .pc-location-submit {
    min-height: 56px;
  }

  .pc-location-field .suggestions-list {
    max-height: min(330px, 42dvh);
  }

  .pc-clinics-section {
    padding-top: 20px;
    scroll-margin-top: 76px;
  }

  .pc-slot-preview__time,
  .pc-slot-preview__more {
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  .pc-public-booking .pc-public-container {
    width: min(calc(100% - 32px), 1180px);
  }

  .pc-public-booking .pc-booking-nav {
    height: 68px;
  }

  .pc-public-booking .pc-booking-logo img {
    width: min(152px, calc(100vw - 92px));
  }

  .pc-public-booking .pc-booking-hero {
    padding-top: 24px;
  }

  .pc-public-booking .pc-booking-hero h1 {
    font-size: clamp(2.08rem, 10.2vw, 2.55rem);
  }

  .pc-quick-booking-card {
    padding: 20px;
    border-radius: 22px;
  }

  .pc-location-field {
    grid-template-columns: 30px minmax(0, 1fr) 44px;
    min-height: 74px;
    padding-left: 12px;
  }

  .pc-location-field__icon {
    width: 23px;
    height: 23px;
  }

  .pc-location-detect {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.88rem;
  }

  .pc-location-submit {
    padding-right: 14px;
    padding-left: 14px;
    font-size: 0.94rem;
  }

  .pc-location-privacy {
    align-items: flex-start;
    font-size: 0.72rem;
  }

  .pc-location-field .suggestions-list {
    right: -1px;
    left: -1px;
  }

  .pc-slot-preview__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pc-slot-preview__times {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pc-slot-preview__time {
    width: 100%;
    min-width: 0;
  }

  .pc-clinic-sort {
    width: 100%;
    justify-content: space-between;
  }

  .pc-clinic-sort select {
    max-width: 190px;
  }
}

@media (max-width: 360px) {
  .pc-public-booking .pc-public-container {
    width: min(calc(100% - 24px), 1180px);
  }

  .pc-public-booking .pc-booking-hero h1 {
    font-size: 2rem;
  }

  .pc-quick-booking-card {
    padding: 17px;
  }

  .pc-quick-booking-card .pc-location-card__header h2 {
    font-size: 1.35rem;
  }

  .pc-location-submit {
    gap: 8px;
    font-size: 0.89rem;
  }

  .pc-location-submit svg {
    width: 18px;
    height: 18px;
  }

  .pc-slot-preview__times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 700px) and (max-width: 992px) and (max-height: 600px) {
  .pc-public-booking .pc-booking-hero {
    padding: 20px 0 24px;
  }

  .pc-public-booking .pc-booking-hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: 20px;
    align-items: start;
  }

  .pc-booking-hero-logo,
  .pc-booking-hero-actions,
  .pc-booking-points {
    display: none;
  }

  .pc-public-booking .pc-booking-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(2.1rem, 5.5vw, 3.05rem);
  }

  .pc-quick-booking-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-location-submit,
  .pc-location-submit svg,
  .pc-slot-preview__time {
    transition: none;
  }

  .pc-location-submit.is-loading svg,
  .pc-location-suggestions__empty.is-loading::before,
  .pc-slot-preview__skeleton span,
  .pc-location-detect.is-loading svg {
    animation-duration: 1.8s;
  }
}
