/* ═══════════════════════════════════════════════════
   TIMECHAMBER BOOKING FLOW — STYLES
   Design: iPhone 14 Pro Max (393×852px) base
   Responsive: Mobile-first, fluid scaling
   ═══════════════════════════════════════════════════ */

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

/* ─── Design Tokens ──────────────────────────────────── */
:root {
  --yellow:      #FEC83E;
  --bg:          #000000;
  --cell-bg:     #363636;
  --cell-border: #828282;
  --nav-bg:      #252525;
  --cal-glass:   rgba(217, 217, 217, 0.05);
  --cal-border:  rgba(255, 255, 255, 0.72);
  --white:       #FFFFFF;

  /* Fluid spacing anchored to 393px base */
  --page-px:     clamp(16px, 5.6vw, 22px);
  --cell-size:   clamp(38px, 10.2vw, 42px);
}

/* ─── Base ───────────────────────────────────────────── */
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

/* ─── Page Container ─────────────────────────────────── */
.page {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top:    44px;
  padding-left:   var(--page-px);
  padding-right:  var(--page-px);
  padding-bottom: clamp(60px, 15vw, 80px);
}

/* ─── Step Indicator ─────────────────────────────────── */
.steps {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 36px; /* fixed — title always starts at same y across pages */
}

.step {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cell-bg);
  border: 0.5px solid var(--cell-border);
  flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s;
}

.step--active,
.step--done {
  background: var(--yellow);
  border-color: var(--yellow);
}

/* ─── Title ──────────────────────────────────────────── */
.title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(34px, 10.7vw, 42px);
  line-height: 1.2;
  color: var(--white);
  margin-bottom: clamp(10px, 2.5vw, 16px);
  letter-spacing: 0;
}

.title--accent {
  color: var(--yellow);
}

/* ─── Description ────────────────────────────────────── */
.desc {
  font-size:   clamp(13px, 3.97vw, 15.6px);
  line-height: 1.2;
  color:       var(--white);
  font-weight: 400;
  max-width:   319px;
  margin-bottom: clamp(16px, 5vw, 24px);
}

/* ─── Info Bar ───────────────────────────────────────── */
.info-bar {
  display: flex;
  align-items: flex-start;
  margin-bottom: clamp(16px, 5vw, 41px);
  gap: 0;
}

.info-group {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.info-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--yellow);
  margin-top: -1px;
}

.info-text {
  font-size:   clamp(8px, 2.55vw, 10px);
  line-height: 1.5;
  color:       var(--white);
  font-weight: 400;
}

.info-text p {
  margin: 0;
}

.info-divider {
  width: 1px;
  height: 27px;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  align-self: center;
  margin: 0 clamp(8px, 2.5vw, 13px);
}

/* ─── Calendar Widget ────────────────────────────────── */
.calendar {
  background:    var(--cal-glass);
  border:        1px solid var(--cal-border);
  border-radius: 10px;
  padding:       clamp(10px, 2.5vw, 14px) clamp(8px, 2.5vw, 12px);
  margin-bottom: clamp(14px, 3.6vw, 20px);
  width: 100%;
}

/* ── Calendar Header ── */
.calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(5px, 1.3vw, 8px);
  padding: 0 1px;
}

.cal-nav {
  width:  clamp(28px, 7.5vw, 32px);
  height: clamp(28px, 7.5vw, 32px);
  border-radius: 50%;
  background:   var(--nav-bg);
  border:       0.5px solid var(--cell-border);
  color:        var(--white);
  display:      flex;
  align-items:  center;
  justify-content: center;
  cursor:       pointer;
  padding:      0;
  flex-shrink:  0;
  transition:   background 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cal-nav:hover:not(:disabled) {
  background: #3a3a3a;
}

.cal-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cal-month {
  font-family:    'Manrope', sans-serif;
  font-weight:    600;
  font-size:      12px;
  color:          var(--white);
  letter-spacing: 0.6px;
  white-space:    nowrap;
}

/* ── Weekday Headers ── */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: clamp(3px, 0.8vw, 6px);
}

.cal-weekdays span {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size:   clamp(11px, 2.9vw, 13px); /* +20% */
  color:       var(--white);
  display:     flex;
  align-items: center;
  justify-content: center;
  height: 22px;
}

/* ── Calendar Grid ── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(6px, 1.7vw, 9px) clamp(1px, 0.3vw, 2px);
  justify-items: center;
}

.cal-cell {
  width:  var(--cell-size);
  height: var(--cell-size);
  border-radius: 50%;
  background:    var(--cell-bg);
  border:        0.55px solid var(--cell-border);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-family:   'Manrope', sans-serif;
  font-weight:   700;
  font-size:     clamp(13px, 3.6vw, 15px);
  color:         var(--white);
  cursor:        pointer;
  transition:    background 0.12s, border-color 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action:  manipulation;
  padding:       0;
  line-height:   1;
  border-style:  solid;
  user-select:   none;
}

.cal-cell:hover:not(.cal-cell--disabled):not(.cal-cell--empty) {
  border-color: var(--yellow);
  background:   rgba(254, 200, 62, 0.12);
}

.cal-cell:active:not(.cal-cell--disabled):not(.cal-cell--empty) {
  transform: scale(0.92);
}

.cal-cell--today {
  border-color: var(--yellow) !important;
}

.cal-cell--selected {
  background:   var(--yellow) !important;
  border-color: var(--yellow) !important;
  color:        var(--cell-bg) !important;
}

.cal-cell--disabled {
  opacity: 0.22;
  cursor:  not-allowed;
  pointer-events: none;
}

.cal-cell--empty {
  background:     transparent !important;
  border:         none !important;
  pointer-events: none;
  visibility:     hidden;
}

/* ─── Time Slots ─────────────────────────────────────── */
.time-slots {
  display: flex;
  gap: clamp(6px, 2vw, 11px);
  margin-bottom: clamp(14px, 3.6vw, 20px);
  flex-wrap: nowrap;
}

.time-btn {
  flex: 1;
  height: 38px;
  background:     var(--cell-bg);
  border:         0.5px solid var(--cell-border);
  border-radius:  5px;
  color:          var(--white);
  font-family:    'Manrope', sans-serif;
  font-weight:    600;
  font-size:      clamp(10px, 3.05vw, 12px);
  letter-spacing: 0.6px;
  cursor:         pointer;
  transition:     background 0.12s, border-color 0.12s, color 0.12s;
  white-space:    nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action:   manipulation;
  padding:        0;
}

.time-btn:hover {
  border-color: var(--yellow);
}

.time-btn:active {
  transform: scale(0.96);
}

.time-btn--selected {
  background:   var(--yellow) !important;
  border-color: var(--yellow) !important;
  color:        var(--cell-bg) !important;
}

/* ─── Next Button ────────────────────────────────────── */
.btn-next {
  display:        flex;
  align-items:    center;
  justify-content: center;
  height:         clamp(38px, 9.7vw, 44px);
  min-width:      clamp(160px, 44vw, 180px);
  padding:        0 clamp(16px, 4vw, 20px);
  background:     var(--yellow);
  border:         0.7px solid var(--yellow);
  border-radius:  21px;
  color:          var(--cell-bg);
  font-family:    'Manrope', sans-serif;
  font-weight:    700;
  font-size:      clamp(12px, 3.3vw, 14px);
  letter-spacing: 0.7px;
  cursor:         pointer;
  white-space:    nowrap;
  transition:     opacity 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action:   manipulation;
  box-shadow:     0 3px 18px rgba(0, 0, 0, 0.45);
}

.btn-next:disabled {
  opacity: 0.38;
  cursor:  not-allowed;
}

.btn-next:not(:disabled):hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-next:not(:disabled):active {
  transform: translateY(0) scale(0.97);
}

/* ─── Decorative Blob ────────────────────────────────── */
/* Base: page 1 — bottom right, slight tilt */
/* position: fixed keeps blob at viewport bottom without adding scroll height */
.deco-blob {
  position:        fixed;
  bottom:          -110px;
  right:           -20px;
  width:           115vw;
  height:          clamp(160px, 41vw, 185px);
  transform:       rotate(-8deg);
  transform-origin: right bottom;
  pointer-events:  none;
  z-index:         0;
  overflow:        visible;
  opacity:         0.9;
}

.deco-blob img {
  width:   100%;
  height:  100%;
  display: block;
}

/* Content above blob */
.page > *:not(.deco-blob) {
  position: relative;
  z-index:  1;
}

/* ─── Nav Buttons — shared pages 2 & 3 ──────────────── */
.nav-buttons {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            clamp(10px, 2.5vw, 13px);
}

/* Ghost pill — ← VORIGE */
.btn-prev {
  display:         flex;
  align-items:     center;
  justify-content: center;
  height:          clamp(34px, 8.7vw, 38px);
  min-width:       clamp(110px, 30vw, 130px);
  padding:         0 clamp(14px, 3.5vw, 18px);
  background:      transparent;
  border:          0.7px solid var(--white);
  border-radius:   21px;
  color:           var(--white);
  font-family:     'Manrope', sans-serif;
  font-weight:     700;
  font-size:       clamp(12px, 3.3vw, 14px);
  letter-spacing:  0.7px;
  cursor:          pointer;
  white-space:     nowrap;
  transition:      opacity 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action:    manipulation;
}

.btn-prev:hover  { opacity: 0.7; }
.btn-prev:active { transform: scale(0.97); }

/* ─── Responsive Breakpoints ─────────────────────────── */

/* Extra bottom padding on mobile so CTA button clears the fixed blob */
@media (max-width: 480px) {
  .page {
    padding-bottom: clamp(130px, 33vw, 150px);
  }
}

/* Very small phones (< 360px) */
@media (max-width: 359px) {
  :root {
    --cell-size: 30px;
  }

  .page {
    padding-top: 32px;
    padding-bottom: 24px;
  }

  .title {
    font-size: 28px;
    margin-bottom: 8px;
  }

  .steps {
    margin-bottom: 24px;
  }

  .desc {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .info-bar {
    margin-bottom: 12px;
  }

  .calendar {
    margin-bottom: 10px;
  }

  .time-slots {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }

  .time-btn {
    flex: 0 0 calc(50% - 6px);
    height: 34px;
  }

  .btn-next {
    height: 38px;
  }
}

/* Short viewport (landscape or compact phones, height < 680px) */
@media (max-height: 680px) and (max-width: 480px) {
  .page {
    padding-top: 32px;
    padding-bottom: 20px;
  }

  .steps { margin-bottom: 20px; }

  .title {
    font-size: clamp(26px, 8vw, 34px);
    margin-bottom: 8px;
  }

  .desc { margin-bottom: 10px; }

  .info-bar { margin-bottom: 10px; }

  .calendar { margin-bottom: 10px; }

  .time-slots { margin-bottom: 10px; }

  :root { --cell-size: 34px; }
}

/* Small phones (360–393px) — primary target (iPhone) */
@media (min-width: 360px) and (max-width: 393px) {
  :root {
    --cell-size: 38px;
  }
}

/* Regular phones (394–480px) */
@media (min-width: 394px) and (max-width: 480px) {
  :root {
    --cell-size: 42px;
  }

  .desc {
    max-width: 100%;
  }
}

/* ─── Tablet & Desktop ──────────────────────────────── */
@media (min-width: 481px) {
  body {
    align-items:   center;
    min-height:    100dvh;
    padding:       40px 24px;
    background:    #111;
  }

  .page {
    max-width:     500px;
    border-radius: 28px;
    height:        auto;
    min-height:    unset;
    padding-top:   52px;
    padding-left:  clamp(28px, 7vw, 40px);
    padding-right: clamp(28px, 7vw, 40px);
    padding-bottom: 52px;
    box-shadow:    0 32px 96px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.06);
  }

  /* Blob hidden on desktop — clean card look */
  .deco-blob { display: none; }

  .steps { margin-bottom: 40px; }

  .title {
    font-size: 48px;
    margin-bottom: 14px;
  }

  .desc {
    font-size: 15px;
    max-width: 100%;
    margin-bottom: 24px;
  }

  .info-bar {
    margin-bottom: 28px;
  }

  .info-text { font-size: 10px; }

  .calendar {
    padding: 16px 14px;
    margin-bottom: 20px;
  }

  .cal-weekdays span { font-size: 13px; }

  :root {
    --cell-size: 46px;
  }

  .time-btn {
    height: 44px;
    font-size: 13px;
  }

  .btn-next {
    height: 48px;
    font-size: 14px;
    min-width: 190px;
  }

  .btn-prev {
    height: 40px;
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 56px 32px;
  }

  .page {
    max-width: 540px;
    padding-top: 60px;
    padding-left: 48px;
    padding-right: 48px;
    padding-bottom: 60px;
  }

  .title { font-size: 54px; }

  :root {
    --cell-size: 50px;
  }
}

@media (min-width: 1024px) {
  .page {
    max-width: 560px;
  }
}

/* ─── Focus visible (accessibility) ─────────────────── */
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

button:focus:not(:focus-visible) {
  outline: none;
}
