/* Telescope rentals: a hemisphere's list of cards, and one telescope's page. */
.rentals-page > h1 {
  margin-bottom: 10px;
}
.rentals-hemispheres {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}
.rentals-hemispheres > * {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  color: var(--site-text);
}
.rentals-hemispheres [aria-current] {
  border-color: var(--gold);
  color: var(--gold);
}
.rentals-intro {
  margin-bottom: 8px;
  color: var(--muted);
}
.rentals-intro p {
  margin: 0 0 4px;
}
.rentals-group {
  margin-top: 28px;
}
.rentals-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0 0 14px;
}
.rentals-group-head h2 {
  margin: 0;
  font-size: 20px;
}
.rentals-group-head a {
  font-size: 13px;
  color: var(--softgold);
}
.rental-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.rental-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  color: var(--site-text);
  text-decoration: none;
}
.rental-card:hover {
  border-color: var(--gold);
}
.rental-picture,
.telescope-shot {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  /* The frame keeps its shape whatever the picture's, and the whole picture sits inside it. */
  position: relative;
  overflow: hidden;
  background: #0b0b0b;
  color: var(--muted);
  font-size: 18px;
  letter-spacing: 0.06em;
}
.rental-picture img,
.telescope-shot img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* A card is a little taller than wide, the shape of most of the photographs. One taken upright
   fills it, held at its top so only a strip of its foot is lost; a wide one is shown whole, over
   a blurred, darkened copy of itself rather than black bands. */
.rental-picture {
  aspect-ratio: 4 / 5;
  isolation: isolate;
}
.rental-picture::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background: var(--shot) center / cover;
  filter: blur(18px) brightness(0.55);
}
.rental-picture img.upright {
  object-fit: cover;
  object-position: center top;
}
.rental-body {
  padding: 14px 16px 16px;
}
.rental-place {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.rental-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}
.rental-price {
  margin: 0 0 6px;
  font-size: 14px;
}
.rental-status,
.telescope-status {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.rental-status.free,
.telescope-status.free {
  color: #6fcf8a;
}
.rental-status.rented,
.telescope-status.rented {
  color: var(--muted);
}
.rentals-terms {
  margin-top: 40px;
}

/* ── one telescope ─────────────────────────────────────────────────────── */

.rentals-crumbs {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}
.rentals-crumbs a {
  color: var(--muted);
}
.telescope {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.telescope-shot {
  border-radius: var(--radius-panel);
  overflow: hidden;
}
.telescope-thumbs {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}
.telescope-thumbs button {
  width: 72px;
  height: 54px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
}
.telescope-thumbs button[aria-current="true"] {
  border-color: var(--gold);
}
.telescope-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.telescope-buy h1 {
  margin: 0 0 6px;
  text-align: left;
  font-size: 26px;
}

/* Below the picture and the prices, the whole width: the spec sheet in two columns, and the
   waiting list beside the request form. */
.telescope-lower {
  margin-top: 36px;
}
.telescope-spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.telescope-spec tbody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}
.telescope-spec tr {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}
.telescope-spec th,
.telescope-spec td {
  border-bottom: 0;
}
.telescope-waiting:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 40px;
  align-items: start;
}
.telescope-spec th,
.telescope-spec td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.telescope-spec th {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 760px) {
  .telescope {
    grid-template-columns: 1fr;
  }
  .telescope-spec tbody,
  .telescope-waiting:not([hidden]) {
    grid-template-columns: 1fr;
  }
  .telescope-spec tr {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

/* An observatory in its rainy season says so, beside its name or on its partner card. */
.rainy {
  color: #8fb3d9;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* ── renting: the two prices, the button, and the waiting list ───────────── */
.telescope-prices {
  display: grid;
  gap: 10px;
  margin: 20px 0 14px;
}
.telescope-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}
.telescope-price-name {
  display: grid;
  font-weight: 600;
}
.telescope-price-name small,
.telescope-price-amount small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.telescope-price-amount {
  font-weight: 600;
  white-space: nowrap;
}
.telescope-rent {
  width: 100%;
}
.telescope-ask h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.telescope-dates {
  display: grid;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.telescope-dates li {
  padding-left: 14px;
  border-left: 3px solid var(--line);
}
.telescope-dates li.free {
  border-color: #6fcf8a;
}
.telescope-ask {
  margin: 0;
}

/* When it is free and who waits, on the waiting list. */
.telescope-glance {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px 24px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}
.telescope-glance small {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.telescope-glance p,
.telescope-glance .telescope-dates {
  margin: 0;
  font-weight: 600;
}

/* Choosing a price, and when the rental starts and how long it runs. */
button.telescope-price {
  width: 100%;
  background: transparent;
  color: var(--site-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.telescope-price:hover,
button.telescope-price[aria-pressed="true"] {
  border-color: var(--gold);
}
button.telescope-price[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px var(--gold);
}
.telescope-price-amount s {
  margin-right: 4px;
  font-weight: 400;
  color: var(--muted);
}
.telescope-book {
  margin: 0 0 14px;
}
.telescope-schedule {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.telescope-schedule .bad {
  color: #e8a0a0;
}
.telescope-offer {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 600;
}
.telescope-offer[hidden] {
  display: none;
}
.telescope-tip {
  position: relative;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 16px;
  cursor: pointer;
}
.telescope-tip:hover::after,
.telescope-tip.open::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 24px;
  left: -10px;
  z-index: 2;
  width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--site-text);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}
/* The next twelve months on the waiting list, rented or free at a glance. */
.telescope-months-wrap {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.telescope-months {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.telescope-months li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}
.telescope-months small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}
.telescope-months b,
.telescope-legend b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--gold);
  color: #1d1f1c;
  font-size: 11px;
}
.telescope-months b {
  position: absolute;
  top: 6px;
  right: 6px;
}
.telescope-months .rented,
.telescope-legend .rented {
  background: #2d302c;
  color: var(--muted);
}
.telescope-months .free,
.telescope-legend .free {
  background: rgba(111, 207, 138, 0.18);
  color: #a9e5ba;
}
.telescope-months .part,
.telescope-legend .part {
  background: linear-gradient(135deg, #2d302c 50%, rgba(111, 207, 138, 0.18) 50%);
  color: var(--site-text);
}
.telescope-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.telescope-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: -8px;
  border-radius: 3px;
}
.telescope-legend b {
  margin-right: -8px;
}

.telescope-months li > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.telescope-months em {
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: #a9e5ba;
}
.telescope-months [data-start] {
  cursor: pointer;
}
.telescope-months [data-start]:hover,
.telescope-months .picked {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
