/* Calendar filters, kind label and the Literary Arts color (IA spec, 17 Oct 2026).

   Loads after 40-classes.css and before 52-calendar-skin.css. Everything here is
   additive: the skin's own rules for the four existing studios are untouched, and
   nothing below sets a property the skin sets on the same element.

   1. Literary Arts gets a studio color like the other four (#5B4A72, from the
      round-one mockup; the pale wash is #F5F2F7).
   2. Every card carries a small label saying what kind of session it is - the
      offering's format line ("Class · 1 credit", "Workshop · 3 hours · $80",
      "Event · $20"). It sits in the card's top-right corner. The server prints it
      in the no-script list; 40-classes.js copies it onto the week-feed card.
   3. The filter bar is seven buttons now: bigger targets, and the chosen one is
      unmistakable (filled, bold, with a tick) rather than only a different shade.
   ------------------------------------------------------------------------- */

:is(.rhc-classes, .rhc-classpage) {
  --cal-literary-arts: #5B4A72;
  --cal-tint-literary-arts: #F5F2F7;
}

.rhc-classes .rhcl-occ--literary-arts,
:is(.rhc-classes, .rhc-classpage) .rhcl-card--literary-arts {
  --studio: var(--cal-literary-arts);
  --studio-tint: var(--cal-tint-literary-arts);
}

/* The chip's corner is the card's corner. */
.rhc-classes .rhcl-occ,
:is(.rhc-classes, .rhc-classpage) .rhcl-card {
  position: relative;
}

.rhc-classes .rh-kind {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 2;
  margin: 0;
  padding: 4px 9px 5px;
  background: #FBF9F4;
  color: #14201B;
  border: 1px solid rgba(20, 32, 27, 0.14);
  box-shadow: 0 1px 2px rgba(20, 32, 27, 0.14);
  font-family: var(--b);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

@media (max-width: 899px) {
  .rhc-classes .rh-kind {
    top: 12px;
    right: 12px;
  }
}

/* ---------- the filter bar ---------- */

.rhc-classes .rhcl .rhc-fopt.rhcl-type {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 9px 18px;
}

.rhc-classes .rhcl .rhc-fopt.rhcl-type.is-on {
  font-weight: 700;
}

.rhc-classes .rhcl .rhc-fopt.rhcl-type.is-on::before {
  content: "\2713";
  margin-right: 8px;
  font-weight: 700;
}

@media (max-width: 900px) {
  /* Seven choices wrap onto two or three rows on a phone. Each one is its own
     bordered button instead of a cell in one wrapped box, so a wrapped row never
     shows a stray divider and every choice is a full-size target. */
  .rhc-classes .rhcl .rhcl-seg {
    flex: 1 1 100%;
    gap: 8px;
    border: 0;
    background: none;
  }

  .rhc-classes .rhcl .rhc-fopt.rhcl-type {
    min-height: 48px;
    padding: 10px 16px;
    font-size: 15.5px;
    border: 1.5px solid var(--rule);
    background: var(--paper);
  }

  .rhc-classes .rhcl .rhc-fopt.rhcl-type.is-on {
    background: var(--ink);
    border-color: var(--ink);
  }
}

/* ---------- keeping the label off the words ----------
   The label sits in the card's top-right corner. A card with a picture carries it
   on the picture; a card without one has nothing there to sit on, so its text
   starts below the label rather than running underneath it. */

@media (max-width: 899px) {
  :is(.rhc-classes, .rhc-classpage) .rhcl-card:not(:has(.rhcl-card-art)) > .rhcl-card-body {
    padding-top: 50px;
  }

  /* 52-calendar-skin.css gives these cards a fixed height (190px, or 416px with a
     picture). With no picture and the label's room added, let them size to their words. */
  .rhc-classes .rhcl .rhcl-card--event:not(:has(.rhcl-card-art)),
  .rhc-classes .rhcl .rhcl-card:not(:has(.rhcl-card-art)) {
    height: auto;
  }

  .rhc-classes .rhcl-occ:not(:has(.rhcl-occ-art)) .rhcl-detail > .rhcl-disc {
    margin-top: 34px;
  }
}

@media (min-width: 900px) {
  /* A single-column event card is as wide as the page, so a long title could
     otherwise reach the label. */
  :is(.rhc-classes, .rhc-classpage) .rhcl-card--event:not(:has(.rhcl-card-art)) > .rhcl-card-body {
    padding-top: 50px;
  }

  .rhc-classes .rhcl-occ .rhcl-detail .rhcl-title {
    padding-right: 170px;
  }
}
