:root {
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
}

body.bookly-loader-page {
  min-height: 100%;
  margin: 0;
  background: #f6f5fb;
  color: #17181c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.wake-shell button,
.wake-shell a { font: inherit; }

.wake-shell {
  --wake-ink: #17181c;
  --wake-muted: #777a86;
  --wake-line: rgba(30, 31, 36, 0.09);
  --wake-purple: #6258e8;
  --wake-purple-soft: #eeecff;
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 16% 14%, rgba(112, 92, 255, 0.12), transparent 30%),
    radial-gradient(circle at 84% 88%, rgba(149, 129, 255, 0.12), transparent 29%),
    linear-gradient(145deg, #fbfaff 0%, #f4f3f9 100%);
  color: var(--wake-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.wake-shell.is-leaving {
  opacity: 0;
  transform: scale(1.015);
}

.wake-shell.is-persistent {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  width: 100%;
}

/* Keep the first health check invisible, including before JavaScript starts. */
.wake-shell[hidden] { display: none; }

.wake-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
  pointer-events: none;
}

.wake-glow-one {
  top: -210px;
  right: -120px;
  background: #b8b2ff;
  animation: wakeFloatOne 8s ease-in-out infinite alternate;
}

.wake-glow-two {
  bottom: -250px;
  left: -120px;
  background: #d9d3ff;
  animation: wakeFloatTwo 9s ease-in-out infinite alternate;
}

.wake-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(270px, 0.85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: clamp(48px, 8vw, 105px);
  width: min(940px, 100%);
}

.wake-copy { min-width: 0; }

.wake-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(54px, 9vh, 88px);
  color: var(--wake-ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.wake-brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
  background: #17181c;
  color: #fff;
  font-size: 15px;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 24px rgba(23, 24, 28, 0.13);
}

.wake-kicker {
  margin-bottom: 13px;
  color: var(--wake-purple);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.wake-copy h1 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(38px, 5.3vw, 62px);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.wake-status {
  min-height: 25px;
  margin: 23px 0 0;
  color: #34363d;
  font-size: 16px;
  font-weight: 750;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.wake-status.is-changing {
  opacity: 0;
  transform: translateY(4px);
}

.wake-progress {
  position: relative;
  width: min(310px, 100%);
  height: 4px;
  margin-top: 25px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 24, 28, 0.08);
}

.wake-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6c63ef, #988dff);
  animation: wakeProgress 1.8s cubic-bezier(0.55, 0, 0.25, 1) infinite;
}

.wake-shell.is-ready .wake-progress span {
  width: 100%;
  animation: none;
  transition: width 0.25s ease;
}

.wake-retry {
  min-height: 42px;
  margin-top: 18px;
  padding: 0 17px;
  border: 1px solid #d8d7df;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #24262c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(28, 25, 48, 0.05);
}

.wake-retry[hidden] { display: none; }

.booking-demo {
  position: relative;
  width: min(100%, 450px);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(30, 31, 36, 0.08);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 30px 90px rgba(40, 34, 80, 0.12), inset 0 1px rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.booking-demo::before {
  position: absolute;
  inset: -80px -90px auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(112, 92, 255, 0.12);
  content: "";
  filter: blur(4px);
}

.booking-demo-top {
  position: relative;
  z-index: 2;
  display: flex;
  height: 70px;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  border-bottom: 1px solid var(--wake-line);
}

.booking-demo-brand {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.booking-demo-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #777985;
  font-size: 10px;
  font-weight: 750;
}

.booking-demo-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8d84f5;
  box-shadow: 0 0 0 0 rgba(109, 99, 239, 0.34);
  animation: wakePulse 1.8s ease-out infinite;
}

.booking-demo-body {
  position: relative;
  height: 350px;
  padding: 34px 28px 28px;
}

.booking-demo-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.booking-demo-rail span {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9e8ee;
}

.booking-demo-rail span::after {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--wake-purple);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  animation: railStep 12.5s linear infinite;
}

.booking-demo-rail span:nth-child(2)::after { animation-delay: 2.5s; }
.booking-demo-rail span:nth-child(3)::after { animation-delay: 5s; }
.booking-demo-rail span:nth-child(4)::after { animation-delay: 7.5s; }
.booking-demo-rail span:nth-child(5)::after { animation-delay: 10s; }

.booking-scene {
  position: absolute;
  inset: 96px 28px auto;
  display: flex;
  min-height: 170px;
  align-items: center;
  gap: 16px;
  padding: 23px;
  border: 1px solid rgba(31, 32, 37, 0.08);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 19px 45px rgba(36, 32, 68, 0.08);
  opacity: 0;
  transform: translateY(13px) scale(0.98);
  animation: bookingScene 12.5s cubic-bezier(0.22, 0.7, 0.25, 1) infinite;
}

.booking-scene-specialist { animation-delay: 2.5s; }
.booking-scene-date { animation-delay: 5s; }
.booking-scene-time { animation-delay: 7.5s; }
.booking-scene-success { animation-delay: 10s; }

.scene-icon,
.scene-avatar,
.success-ring {
  display: grid;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
}

.scene-icon-purple {
  background: var(--wake-purple-soft);
  color: var(--wake-purple);
}

.scene-icon svg {
  width: 27px;
  height: 27px;
}

.scene-avatar {
  background: linear-gradient(145deg, #2a2b31, #111216);
  color: #fff;
  font-size: 20px;
  font-weight: 850;
}

.scene-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.scene-copy small {
  color: #92939c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.scene-copy strong {
  overflow: hidden;
  color: #202126;
  font-size: 16px;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-copy > span {
  color: #7b7d87;
  font-size: 11px;
}

.scene-check {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: #edebff;
  color: var(--wake-purple);
  font-size: 13px;
  font-weight: 900;
}

.scene-status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #46b979;
  box-shadow: 0 0 0 5px rgba(70, 185, 121, 0.11);
}

.booking-scene-date {
  flex-direction: column;
  justify-content: center;
}

.mini-calendar {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.mini-calendar span,
.time-chips span {
  display: grid;
  min-height: 39px;
  place-items: center;
  border: 1px solid #ecebf0;
  border-radius: 11px;
  color: #777985;
  font-size: 11px;
  font-weight: 750;
}

.mini-calendar span.selected,
.time-chips span.selected {
  border-color: var(--wake-purple);
  background: var(--wake-purple);
  color: #fff;
  box-shadow: 0 9px 18px rgba(98, 88, 232, 0.2);
}

.scene-copy-centered {
  align-items: center;
  flex: 0 0 auto;
  text-align: center;
}

.scene-copy-wide { width: 100%; }

.time-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}

.booking-scene-success {
  justify-content: center;
  text-align: center;
}

.success-ring {
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, #6c63ef, #8c82ff);
  color: #fff;
  box-shadow: 0 14px 32px rgba(98, 88, 232, 0.27);
}

.success-ring span {
  font-size: 27px;
  font-weight: 900;
  animation: successPop 12.5s ease infinite;
  animation-delay: 10s;
}

@keyframes bookingScene {
  0%, 2% { opacity: 0; transform: translateY(13px) scale(0.98); }
  6%, 17% { opacity: 1; transform: translateY(0) scale(1); }
  20%, 100% { opacity: 0; transform: translateY(-10px) scale(0.985); }
}

@keyframes railStep {
  0%, 1% { transform: scaleX(0); }
  17%, 100% { transform: scaleX(1); }
}

@keyframes wakeProgress {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(95%); }
  100% { transform: translateX(250%); }
}

@keyframes wakePulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 99, 239, 0.36); }
  70% { box-shadow: 0 0 0 8px rgba(109, 99, 239, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 99, 239, 0); }
}

@keyframes successPop {
  0%, 80% { transform: scale(0.8); opacity: 0; }
  84%, 96% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0; }
}

@keyframes wakeFloatOne {
  to { transform: translate(-40px, 35px) scale(1.08); }
}

@keyframes wakeFloatTwo {
  to { transform: translate(45px, -25px) scale(0.92); }
}

@media (max-width: 760px) {
  .wake-shell {
    overflow-y: auto;
    align-items: start;
    padding: max(20px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  }

  .wake-layout {
    grid-template-columns: 1fr;
    gap: 34px;
    width: min(430px, 100%);
  }

  .wake-copy { text-align: center; }
  .wake-brand { margin-bottom: 34px; }

  .wake-copy h1,
  .wake-progress {
    margin-right: auto;
    margin-left: auto;
  }

  .wake-copy h1 { font-size: clamp(40px, 12vw, 54px); }
  .wake-status { margin-top: 18px; }

  .booking-demo {
    min-height: 344px;
    border-radius: 27px;
  }

  .booking-demo-top {
    height: 58px;
    padding: 0 19px;
  }

  .booking-demo-body {
    height: 286px;
    padding: 25px 19px 20px;
  }

  .booking-scene {
    inset: 75px 19px auto;
    min-height: 150px;
    padding: 18px;
    border-radius: 19px;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .wake-brand { margin-bottom: 42px; }
  .booking-demo { min-height: 370px; }
  .booking-demo-body { height: 300px; }
  .booking-scene { min-height: 155px; }
}

@media (prefers-reduced-motion: reduce) {
  .wake-shell,
  .wake-shell *,
  .wake-shell *::before,
  .wake-shell *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .booking-scene-service {
    opacity: 1;
    transform: none;
  }
}
