/* Custom styles for the Touche theme integration */

/* The fixed navbar is 72px high, so a scrolled-to element must stop below it. */
html {
  scroll-padding-top: 4.5rem;
}

/* On phones the month name takes its own row above the links. */
.calendar-nav h2 {
  width: 100%;
}

@media (min-width: 768px) {
  .calendar-nav h2 {
    width: auto;
  }
}

.calendar-month {
  table-layout: fixed;
}

.calendar-month td {
  height: 7rem;
  vertical-align: top;
}

/* A Mist border on an unchecked box is about 1.2:1 on Paper; Slate meets the 3:1 floor for controls. */
.form-check-input {
  border-color: #6c757d;
}

/*
 * Touche removes the focus ring, so keyboard users cannot see where they are.
 * Amber alone is about 2:1 on Paper, so an Ink ring sits inside it: one of the two meets 3:1 on any background.
 */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input[type="submit"]:focus-visible,
[role="button"]:focus-visible,
.form-check-input:focus-visible {
  outline: 2px solid #f5a637;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #000;
}

/* Amenities page: the photos are the content, so they get the full column width. */
.amenity-photo {
  aspect-ratio: 3 / 2;
  display: block;
  object-fit: cover;
  width: 100%;
}

@media (min-width: 768px) {
  .amenity-wide .amenity-photo {
    aspect-ratio: 21 / 9;
  }
}

/* Many residents are older; the default badge text is about 12px. */
.amenity .badge {
  font-size: 0.875rem;
  padding: 0.4em 0.75em;
}

.amenity-reason {
  max-width: 65ch;
}

/*
 * News and events: each day shows its date once. A full Mist rule separates days;
 * a shorter rule, in the text column only, separates the items of one day.
 */
.agenda-day {
  border-top: 1px solid #e9ecef;
  padding-block: 3rem;
}

.agenda-day:last-child {
  border-bottom: 1px solid #e9ecef;
}

/* The heading wraps the date, so it keeps the date's own type. */
.agenda-date {
  font: inherit;
}

.agenda-weekday,
.agenda-time {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.agenda-time {
  color: #000;
}

.agenda-event + .agenda-event {
  border-top: 1px solid #e9ecef;
  margin-top: 2rem;
  padding-top: 2rem;
}

.agenda-text {
  max-width: 65ch;
}

/* On a long day the date stays in view below the fixed navbar. */
@media (min-width: 768px) {
  .agenda-date {
    position: sticky;
    top: 6rem;
  }
}
