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

html,
body {
  height: 100%;
  font-family:
    'Space Grotesk',
    system-ui,
    -apple-system,
    sans-serif;
  color: #efeae1;
  background: #121214;
  print-color-adjust: exact;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* ===== Typography ===== */

p,
body {
  font-size: 16px;
  line-height: 26px;
  color: #efeae1;
}

h1 {
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 42px;
  line-height: 64px;
  font-weight: bold;
  letter-spacing: 0.01em;
}

h2 {
  display: flex;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  width: 100%;
}

.small {
  font-size: 14px;
  line-height: 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Colors ===== */

.secondary {
  color: #9c968b;
}

/* ===== Basic Layout ===== */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 48px;
  padding-top: 56px; /* room for the language flag in the top-left corner */
}

header,
main,
footer {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

header img:first-of-type {
  filter: invert(1) brightness(1.35);
}

/* Keep the logo at its original size (468px max) even though the layout is wider */
.brand-block img {
  max-width: min(100%, 380px);
}

footer {
  color: #9c968b;
  gap: 20px;
  row-gap: 8px;
  padding-bottom: 32px;
  flex-wrap: wrap;
}

footer div {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

main {
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

ol {
  padding: 0 16px;
}

ol li {
  margin-bottom: 16px;
}

/* ===== Components ===== */

.flag {
  position: absolute;
  top: 8px;
  left: 8px;
  height: 32px;
  width: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.moon {
  width: 180px;
}

.title {
  display: flex;
  flex: 1 0 auto;
  margin-top: 8px;
}

.divider {
  display: flex;
  height: 5px;
  width: 32px;
  background-color: #3b9dff;
}

/* List */

.list {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 20px;
  align-items: center;
  gap: 12px;
}

.row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.row > div:last-child:not(:only-child) {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.list h2:not(:first-child) {
  margin-top: 10px;
}

/* Faint separator under every price row (two-column rows only) */
.row:has(> div:nth-child(2)) {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(239, 234, 225, 0.08);
}

/* Opening hours — today highlighted */
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
}

.hours-row.today {
  background: rgba(59, 157, 255, 0.12);
}

.hours-row.today .day {
  color: #efeae1;
}

.hours-row .day {
  color: #9c968b;
}

.hours-row .time.closed {
  color: #f87171;
}

.hours-row .time {
  text-align: right;
}

.hours-row .date {
  margin-left: 10px;
  font-size: 14px;
  color: #6f6a62;
  font-variant-numeric: tabular-nums;
}


.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: #9c968b;
  border: 1px solid #33363b;
  padding: 10px 22px;
  border-radius: 999px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
}

.status-dot.closed {
  background: #ef4444;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #9fd0ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3b9dff;
  box-shadow: 0 0 0 4px rgba(59, 157, 255, 0.18);
}

/* Payment card */
.pay-card {
  width: 100%;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px dashed #3a3d43;
}

.pay-value {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.pay-note {
  padding: 16px 0;
  line-height: 1.6;
}

/* ===== Functional ===== */
.gap-8 {
  gap: 8px;
}
.gap-16 {
  gap: 16px;
}
.gap-32 {
  gap: 32px;
}

/* ===== Print ===== */
@media print {
  header,
  main,
  footer {
    max-width: 520px;
  }

  .print-hide {
    display: none;
  }

  .print-break {
    break-after: page;
  }
}

.status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.reopen-note {
  font-size: 13px;
  color: #9c968b;
}

.reopen-note:empty {
  display: none;
}

/* ===== Page navigation ===== */

html {
  scroll-behavior: smooth;
}

.title {
  scroll-margin-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ===== Week calendar ===== */

.cal {
  --cal-line: rgba(239, 234, 225, 0.07);
  --cal-open: #3b9dff;
  --cal-booked: #f87171;
  --cal-row: 40px;
  --cal-axis: 52px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 48px;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cal-sub {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: #9c968b;
}

.cal-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-today,
.cal-btn {
  height: 36px;
  border: 1px solid #33363b;
  background: transparent;
  color: #efeae1;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.cal-today {
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  margin-right: 4px;
}

.cal-btn {
  width: 36px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}

.cal-today:hover:not(:disabled),
.cal-btn:hover:not(:disabled) {
  border-color: #3b9dff;
  background: rgba(59, 157, 255, 0.12);
}

.cal-today:focus-visible,
.cal-btn:focus-visible {
  outline: 2px solid #3b9dff;
  outline-offset: 2px;
}

.cal-today:disabled,
.cal-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal-grid {
  display: grid;
  grid-template-columns: var(--cal-axis) repeat(7, minmax(0, 1fr));
  grid-template-rows: auto calc(var(--hours, 8) * var(--cal-row));
  border: 1px solid #26282c;
  border-radius: 14px;
  background: #18181b;
  padding: 0 8px 12px 0;
}

.cal-message {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 440px;
  padding: 24px;
  text-align: center;
  color: #9c968b;
  font-size: 15px;
  line-height: 22px;
}

.cal-message-link {
  padding: 8px 18px;
  border: 1px solid #33363b;
  border-radius: 999px;
  color: #efeae1;
  font-size: 14px;
  font-weight: 500;
}

.cal-message-link:hover,
.cal-message-link:focus-visible {
  border-color: #3b9dff;
  background: rgba(59, 157, 255, 0.12);
}

/* Calendar data unavailable: message only, no grid controls or legend */
.cal.is-unavailable .cal-toolbar,
.cal.is-unavailable .cal-legend {
  display: none;
}

.cal.is-unavailable .cal-grid {
  grid-template-rows: auto;
  padding: 0;
}

/* Day headers */
.cal-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 0 14px;
}

.cal-dow {
  font-size: 13px;
  color: #9c968b;
}

.cal-date {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cal-head.is-today .cal-dow {
  color: #9fd0ff;
}

.cal-head.is-today .cal-date {
  background: #3b9dff;
  color: #0d1a29;
  font-weight: 700;
}

.cal-head.is-past {
  opacity: 0.35;
}

/* Hour axis */
.cal-axis {
  position: relative;
}

.cal-hour {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  font-size: 12px;
  color: #6f6a62;
  font-variant-numeric: tabular-nums;
}

/* Day columns */
.cal-col {
  position: relative;
  border-left: 1px solid var(--cal-line);
  background-image: linear-gradient(var(--cal-line) 1px, transparent 1px);
  background-size: 100% var(--cal-row);
  border-bottom: 1px solid var(--cal-line);
}

.cal-col.is-today {
  background-color: rgba(59, 157, 255, 0.05);
}

.cal-col.is-past,
.cal-col.is-unknown {
  background-color: rgba(0, 0, 0, 0.25);
}

.cal-col.is-closed {
  background-color: rgba(239, 234, 225, 0.02);
}

.cal-closed-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #6f6a62;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.04em;
}

/* Blocks */
.cal-block {
  position: absolute;
  left: 3px;
  right: 3px;
  margin-top: 1px;
  border-radius: 6px;
  padding: 5px 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  line-height: 16px;
}

.cal-open {
  background: rgba(59, 157, 255, 0.2);
  border-left: 3px solid var(--cal-open);
  color: #d8ebff;
}

.cal-booked {
  background: repeating-linear-gradient(
    -45deg,
    rgba(248, 113, 113, 0.16) 0 5px,
    rgba(248, 113, 113, 0.04) 5px 10px
  );
  border-left: 3px solid rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.cal-time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cal-label {
  font-size: 12px;
  opacity: 0.8;
}

/* Current time */
.cal-now {
  position: absolute;
  left: -1px;
  right: 0;
  height: 2px;
  background: #ef4444;
  z-index: 2;
  pointer-events: none;
}

.cal-now::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
}

/* Legend */
.cal-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 13px;
  line-height: 18px;
  color: #9c968b;
}

.cal-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.swatch-open {
  background: rgba(59, 157, 255, 0.35);
  border-left: 3px solid #3b9dff;
}

.swatch-booked {
  background: repeating-linear-gradient(-45deg, rgba(248, 113, 113, 0.45) 0 3px, transparent 3px 6px);
  border-left: 3px solid rgba(248, 113, 113, 0.7);
}

.swatch-closed {
  background: rgba(239, 234, 225, 0.06);
  border: 1px solid #33363b;
}

@media (max-width: 600px) {
  .cal {
    --cal-row: 34px;
    --cal-axis: 26px;
  }

  .cal-grid {
    padding-right: 4px;
    border-radius: 12px;
  }

  .cal-hour {
    right: 6px;
    font-size: 11px;
  }

  .cal-min,
  .cal-label {
    display: none;
  }

  .cal-date {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .cal-dow {
    font-size: 11px;
  }

  .cal-block {
    left: 2px;
    right: 2px;
    padding: 4px 3px;
    font-size: 11px;
    line-height: 13px;
    border-left-width: 2px;
    border-radius: 4px;
  }

  .cal-closed-label {
    font-size: 11px;
  }
}

/* The page-break spacer between header and main only matters in print;
   on screen it would add an extra flex gap above the calendar. */
@media screen {
  body > .print-break {
    display: none;
  }
}

/* Body is a flex column: never let a section shrink below its content
   (a wrapped nav would otherwise overflow onto the logo). */
body > * {
  flex-shrink: 0;
}

/* ===== Small screens: compact header ===== */
@media (max-width: 600px) {
  body {
    gap: 36px;
  }

  header {
    gap: 28px;
  }

  .brand-block img {
    max-width: min(100%, 240px);
  }

  .brand-block {
    gap: 10px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .status-pill {
    font-size: 15px;
    gap: 8px;
    padding: 7px 16px;
  }

  .status-dot {
    width: 8px;
    height: 8px;
  }

  .reopen-note {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .cal-today {
    padding: 0 10px;
  }
}
