.page {
  min-height: 100svh;
  background: #04070d;
  color: #eef2f7;
}

.siteHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid #101a2b;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #eef2f7;
  font-family: var(--font-display), sans-serif;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 3px;
  text-decoration: none;
  white-space: nowrap;
}

.brand > span {
  width: 13px;
  height: 13px;
  background: #2fd06b;
  transform: skewX(-12deg);
}

.siteHeader nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.8vw, 38px);
}

.siteHeader nav a {
  color: #c8d4e2;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.siteHeader nav a:hover,
.siteHeader nav a[aria-current='page'] {
  color: #35b6ff;
}

.signIn {
  padding: 10px 22px;
  background: #eef2f7;
  color: #04070d !important;
  font-family: var(--font-display), sans-serif;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  transform: skewX(-8deg);
}

.signIn > span {
  display: inline-block;
  transform: skewX(8deg);
}

.main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(42px, 6vw, 86px) clamp(20px, 4vw, 56px) 140px;
}

.heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

.live {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 25px;
  color: #2fd06b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.live > span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2fd06b;
  animation: livePulse 1.8s ease-in-out infinite;
}

.heading h1 {
  margin: 0;
  font-family: var(--font-display), sans-serif;
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: .9;
  text-transform: uppercase;
}

.intro {
  max-width: 62ch;
  margin: 20px 0 0;
  color: #8fa2b8;
  line-height: 1.55;
}

.dateControl {
  display: grid;
  gap: 8px;
  color: #8fa2b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.dateControl input,
.selection select {
  min-height: 44px;
  border: 1px solid #25334a;
  border-radius: 6px;
  background: #0a1220;
  color: #eef2f7;
}

.dateControl input {
  min-width: 190px;
  padding: 9px 12px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 24px;
  color: #8fa2b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend i {
  width: 10px;
  height: 10px;
  border: 1px solid #25334a;
}

.legend .openKey { border-color: #168a4a; background: #0b2b20; }
.legend .bookedKey { background: #10192a; }
.legend .blockedKey { border-color: #57313e; background: #21131b; }

.courts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}

.court {
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid #182641;
  border-radius: 12px;
  background: #08111f;
}

.courtHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.courtHeader h2 {
  margin: 0;
  font-family: var(--font-display), sans-serif;
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
}

.courtHeader > span {
  padding: 9px 14px;
  border: 1px solid #25334a;
  color: #a9c7e8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.slotGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.slot,
.skeleton {
  min-height: 88px;
  border-radius: 0;
}

.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 12px 8px;
  border: 1px solid #1a2945;
  background: #091221;
  color: #647fa5;
  cursor: not-allowed;
  transition: border-color 180ms cubic-bezier(.16, 1, .3, 1), background 180ms cubic-bezier(.16, 1, .3, 1), color 180ms cubic-bezier(.16, 1, .3, 1), transform 180ms cubic-bezier(.16, 1, .3, 1);
}

.slot strong {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 800;
  letter-spacing: .4px;
  line-height: 1;
  white-space: nowrap;
}

.slot span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.slot.available {
  border-color: #168a4a;
  background: #09251d;
  color: #35e786;
  cursor: pointer;
}

.slot.available:hover {
  border-color: #35e786;
  background: #0b3024;
  transform: translateY(-2px);
}

.slot.selected {
  border-color: #35b6ff;
  background: #0b2935;
  color: #eef2f7;
  box-shadow: inset 0 0 0 1px #35b6ff;
}

.slot.blocked {
  border-color: #3c2632;
  background: #1b1118;
  color: #8b6478;
}

.skeleton {
  border: 1px solid #16233a;
  background: #0b1525;
  animation: skeletonPulse 1.3s ease-in-out infinite alternate;
}

.courtNote {
  margin: 26px 0 0;
  color: #8fb6e2;
  font-size: 13px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #25334a;
  background: #0a1220;
}

.alert p { margin: 0; }
.alert strong { white-space: nowrap; }
.warning { border-color: #5b4920; color: #ffc46b; }
/* The page speaks through this box instead of a browser popup, so it has to
   carry bad news as clearly as good. */
.error { border-color: #7a2323; background: #2a1010; color: #ffc4c4; }
.alert { display: block; }
.alert strong { display: block; white-space: normal; margin-bottom: 4px; }
.success { border-color: #1f7a3f; color: #d7f4df; }
.alert button { margin-left: auto; border: 0; background: transparent; color: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* Who the booking is being made as, stated above the fields it fills in. */
.accountNote {
  margin: 0 0 4px;
  padding: 0.5rem 0.7rem;
  border: 1px solid #16233a;
  border-left: 3px solid #2fd06b;
  border-radius: 8px;
  background: #070c16;
  color: #b9c6d6;
  font-size: 12.5px;
  line-height: 1.5;
}
.accountNote a { color: #35b6ff; font-weight: 600; }
.accountNote strong { color: #eef2f7; }

.selection {
  position: sticky;
  z-index: 30;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid #2b3d5c;
  border-radius: 10px;
  background: #0a1220;
  box-shadow: 0 20px 50px rgb(0 0 0 / 35%);
}

.selectionSummary {
  display: grid;
  min-width: 250px;
  margin-right: auto;
}

.selectionSummary span,
.selection label {
  color: #8fa2b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.selectionSummary strong { margin: 4px 0; }
.selectionSummary small { color: #8fa2b8; }
.selection label { display: grid; gap: 5px; }
.selection select { min-width: 126px; padding: 7px 10px; text-transform: none; }
.selection > p { color: #8fa2b8; font-size: 13px; white-space: nowrap; }

.confirm,
.cancel {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.confirm { border: 1px solid #2fd06b; background: #2fd06b; color: #04140a; }
.confirm:hover { background: #46e08a; }
.confirm:disabled { opacity: .55; cursor: wait; }
.cancel { border: 1px solid #2b3d5c; background: transparent; color: #c8d4e2; }

@keyframes livePulse { 50% { opacity: .25; } }
@keyframes skeletonPulse { to { opacity: .52; } }

@media (max-width: 980px) {
  .courts { grid-template-columns: 1fr; }
  .selection { flex-wrap: wrap; }
  .selectionSummary { flex: 1 1 100%; }
}

@media (max-width: 700px) {
  .siteHeader { align-items: flex-start; flex-direction: column; padding-block: 16px; }
  .siteHeader nav { width: 100%; justify-content: space-between; }
  .siteHeader nav a:nth-child(3) { display: none; }
  .heading { align-items: flex-start; flex-direction: column; }
  .dateControl, .dateControl input { width: 100%; }
  .court { padding: 20px; }
  .courtHeader { align-items: flex-start; flex-direction: column; }
  .slotGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selection > p { display: none; }
  .confirm { flex: 1 1 auto; }
}

@media (max-width: 430px) {
  .brand { font-size: 23px; }
  .siteHeader nav > a:not(.signIn):not([aria-current='page']) { display: none; }
  .slot { min-height: 78px; }
  .selection { bottom: 8px; }
  .selection label { flex: 1 1 100%; }
  .selection select { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .live > span,
  .skeleton { animation: none; }
}

/* Availability is read live, so the page says which state it is in. */
.gridStatus { margin-left: auto; font-size: 12.5px; font-weight: 600; color: #8fa2b8; }
.gridStatus--live { color: #2fd06b; }
.gridStatus--checking { color: #8fa2b8; }
.gridStatus--offline { color: #ffc46b; }
.courts.is-stale { opacity: 0.5; filter: saturate(0.5); pointer-events: none; }
.slot.past { opacity: 0.35; }
.slot.isSelected { outline: 2px solid #2fd06b; outline-offset: 1px; }
