/* =========================
   THE COUNTRY DAY SCHOOL ATHLETIC CENTRE (page-specific)
   Loaded after healthcare-detail.css, which supplies the project page template.
   This file holds only what is particular to this page, scoped to .cds-*.
========================= */

/* ================= HERO ================= */
/* The video and its overlays come from the project page template. */
.cds-hero-sub {
  display: block;
  margin-top: 8px;
  font-size: 0.42em;
  font-weight: 700;
  color: #ffffff;
}

.cds-concept {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fbeedd;
  color: #7a3d07;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.cds-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 14px/1.2 "Plus Jakarta Sans", system-ui, sans-serif;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.cds-btn-primary { background: #ecad2c; color: #ffffff; }
.cds-btn-primary:hover { background: #d99b1f; }
.cds-btn-ghost { border-color: rgba(255, 255, 255, 0.8); color: #ffffff; }
.cds-btn-ghost:hover { background: #ffffff; color: #0f172a; }
.cds-btn-line { border-color: #cbd5e1; color: #0f172a; }
.cds-btn-line:hover { background: #f1f5f9; }

/* ================= FIGURES ================= */
.cds-stats {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.cds-stats strong {
  display: block;
  color: #0f172a;
  font: 800 clamp(22px, 2.6vw, 32px)/1.1 "Sora", system-ui, sans-serif;
}

.cds-stats span {
  display: block;
  margin-top: 6px;
  color: #475569;
  font: 500 13.5px/1.45 "Plus Jakarta Sans", system-ui, sans-serif;
}

.cds-progress {
  margin-top: 24px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.cds-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #257cff 0%, #9333ea 100%);
}

/* ================= 3D WINDOW ================= */
/* Scoped with the id because the project page template also sizes #viewer.
   --cds-header is the shared sticky header's measured height, set by the stage script.
   The window fills the screen below it, because the viewer's panels need the room. */
#viewer.cds-stage {
  position: relative;
  width: 100%;
  max-width: none;
  height: calc(100svh - var(--cds-header, 116px));
  min-height: 520px;
  margin-top: 16px;
  background: #e7ebee;
  scroll-margin-top: var(--cds-header, 116px);
}

/* The site's floating assistant button sits over the viewer's own controls while exploring. */
body.cds-exploring .ai-bot-fab {
  display: none;
}

.cds-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.cds-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
}

.cds-start[hidden],
.cds-done[hidden] {
  display: none;
}

.cds-start-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: min(460px, calc(100% - 32px));
  padding: 16px 28px;
  transform: translate(-50%, -50%);
  border-radius: 18px;
  background: #0b239c;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.cds-start:hover .cds-start-pill { background: #081a78; }

.cds-start-pill small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
}

.cds-done {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 3;
  padding: 7px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(14, 20, 27, 0.14);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(14, 34, 42, 0.14);
  color: #0e141b;
  font: 600 13px "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
}

/* ================= NAMING TABLE ================= */
.cds-table-wrap {
  padding: 0 24px;
  overflow-x: auto;
}

.cds-table {
  width: 100%;
  border-collapse: collapse;
  font: 500 14.5px/1.35 "Plus Jakarta Sans", system-ui, sans-serif;
  color: #0f172a;
}

.cds-table th {
  padding: 10px 12px;
  border-bottom: 2px solid #0f172a;
  text-align: left;
  font-weight: 700;
  font-size: 12.5px;
}

.cds-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.cds-table tbody tr {
  cursor: pointer;
}

.cds-table tbody tr:hover {
  background: #f1f5f9;
}

.cds-table button {
  all: unset;
  cursor: pointer;
}

.cds-table button:focus-visible {
  outline: 2px solid #0b239c;
  outline-offset: 2px;
}

.cds-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 25px;
  border-radius: 8px;
  border: 1.5px solid #0b239c;
  background: #0b239c;
  color: #ffffff;
  font: 700 12.5px/1 "Sora", system-ui, sans-serif;
}

.cds-num[data-status="reserved"] { background: #ffffff; color: #0b239c; }
.cds-num[data-status="request"] { background: #a8730e; border-color: #a8730e; }

/* ================= CARDS ================= */
.cds-cards,
.cds-phases {
  display: grid;
  gap: 16px;
  padding: 0 24px;
}

.cds-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cds-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cds-card {
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font: 500 14.5px/1.55 "Plus Jakarta Sans", system-ui, sans-serif;
}

.cds-card strong {
  display: block;
  color: #0f172a;
  font: 800 19px/1.25 "Sora", system-ui, sans-serif;
}

.cds-card p { margin: 8px 0 0; }
.cds-card ul { margin: 12px 0 0; padding-left: 18px; color: #0f172a; list-style: disc; }

.cds-note {
  margin: 14px 0 0;
  padding: 0 24px;
  color: #475569;
  font: 500 13.5px/1.5 "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ================= RENDERINGS ================= */
.cds-gallery-group {
  margin: 20px 0 8px;
  padding: 0 24px;
  color: #0f172a;
  font: 800 17px/1.3 "Sora", system-ui, sans-serif;
}

.cds-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 24px;
}

.cds-gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #0f172a;
  text-align: left;
  font: 600 13px/1.35 "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: zoom-in;
}

.cds-gallery button:focus-visible {
  outline: 3px solid #0b239c;
  outline-offset: 3px;
  border-radius: 10px;
}

.cds-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1.72;
  object-fit: cover;
  margin-bottom: 7px;
  border-radius: 10px;
  background: #e2e8f0;
}

.cds-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 11, 18, 0.95);
  color: #ffffff;
}

.cds-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cds-lightbox figure {
  margin: 0;
  max-width: calc(100vw - 120px);
  text-align: center;
}

.cds-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 90px);
  margin: 0 auto;
  border-radius: 6px;
}

.cds-lightbox figcaption {
  margin-top: 10px;
  font: 600 14px/1.3 "Plus Jakarta Sans", system-ui, sans-serif;
}

.cds-lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font: 600 13px "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
}

.cds-lb-nav {
  flex: none;
  width: 48px;
  height: 64px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.cds-lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.cds-lb-prev { margin-right: 10px; }
.cds-lb-next { margin-left: 10px; }

@media (max-width: 760px) {
  .cds-lightbox figure { max-width: calc(100vw - 16px); }
  .cds-lb-nav { position: absolute; bottom: 12px; }
  .cds-lb-prev { left: 12px; margin: 0; }
  .cds-lb-next { right: 12px; margin: 0; }
}

/* ================= TIMELINE ================= */
.cds-timeline {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: #475569;
  font: 500 14.5px/1.5 "Plus Jakarta Sans", system-ui, sans-serif;
}

.cds-timeline li {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.cds-timeline b { color: #0f172a; font-weight: 700; }

/* ================= CLOSE ================= */
.cds-close .hero-subtitle a,
#naming .hero-subtitle a { color: #0b239c; font-weight: 700; }

.cds-foot {
  width: min(1200px, 95vw);
  margin: 16px auto 40px;
  padding: 16px 24px 0;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font: 500 12.5px/1.55 "Plus Jakarta Sans", system-ui, sans-serif;
}

/* On a phone the viewer's own view buttons run along the top, so this moves clear of them. */
@media (max-width: 820px) {
  .cds-done { top: 56px; left: auto; right: 12px; transform: none; }
}

@media (max-width: 900px) {
  .cds-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cds-cards, .cds-phases { grid-template-columns: 1fr; }
  .cds-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cds-gallery-group { padding-left: 8px; padding-right: 8px; }
  .cds-timeline li { grid-template-columns: 1fr; gap: 2px; }
  .cds-table-wrap, .cds-cards, .cds-phases, .cds-gallery, .cds-note { padding-left: 8px; padding-right: 8px; }
}

/* ================= SHARING ================= */
/* Same dialog as the Interactive Operating Room page, in this page's navy. */
.cds-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cds-table td.cds-share-cell {
  width: 1%;
  padding: 4px 8px;
  white-space: nowrap;
}

.cds-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #0b239c;
  cursor: pointer;
}

.cds-share-btn:hover {
  background: rgba(11, 35, 156, 0.1);
}

.cds-share-btn:focus-visible,
.cds-net:focus-visible,
.cds-tool:focus-visible {
  outline: 3px solid #0b239c;
  outline-offset: 2px;
}

.cds-sharebox {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.cds-sharebox::backdrop {
  background: rgba(6, 14, 18, 0.72);
}

.cds-sharebox img[data-share-image] {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid #e6e8eb;
}

.cds-sharebox-body {
  padding: 16px 18px 18px;
}

.cds-sharebox-title {
  margin: 0 0 6px;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.cds-sharebox-text {
  margin: 0 0 14px;
  color: #475569;
  font-size: 13.5px;
  line-height: 1.5;
}

.cds-sharebox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cds-sharebox-actions--tools {
  margin-top: 10px;
}

.cds-net,
.cds-tool {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font: 600 13.5px "Plus Jakarta Sans", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.cds-net {
  border: 1px solid #0b239c;
  background: #0b239c;
  color: #ffffff;
}

.cds-net:hover {
  border-color: #081a78;
  background: #081a78;
}

.cds-net[hidden],
.cds-sharebox-phone[hidden] {
  display: none;
}

.cds-tool {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.cds-tool:hover {
  background: #f1f5f9;
}

.cds-sharebox-close {
  margin-left: auto;
}

.cds-sharebox-phone {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #eef1fa;
}

.cds-sharebox img[data-share-qr] {
  flex: none;
  width: 132px;
  height: 132px;
  border-radius: 6px;
  background: #ffffff;
}

.cds-sharebox-phone-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.cds-sharebox-phone p {
  margin: 0 0 10px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.cds-sharebox-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: #0b239c;
  font-size: 13px;
  font-weight: 600;
}

/* A phone needs the space for the share button more than the floor name, which the viewer shows anyway. */
@media (max-width: 560px) {
  .cds-table th:nth-child(3),
  .cds-table td:nth-child(3) {
    display: none;
  }
}
