/* RopeBreak.net site layer. The look comes from rb-bootstrap; this file only adds what the theme has no component for. */

/* Safe areas (installed PWA, notched phones) */
.rb-header .navbar { padding-top: max(var(--bs-navbar-padding-y), env(safe-area-inset-top, 0px)); }
.rb-header .container-xl, .rb-main, .rb-footer .container-xl {
  padding-left: max(var(--bs-gutter-x, 1.5rem) * .5, env(safe-area-inset-left, 0px));
  padding-right: max(var(--bs-gutter-x, 1.5rem) * .5, env(safe-area-inset-right, 0px));
}
.rb-footer { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important; }
.rb-footer a { color: inherit; }
.rb-body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.rb-main { flex: 1 0 auto; }
.rb-main:focus { outline: none; }
.rb-skip { position: absolute; z-index: 2000; top: .5rem; left: .5rem; padding: .5rem .75rem; background: var(--bs-body-bg); }

/* Calendar: titles are links inside agenda rows */
.calendar-agenda-title > a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.is-cancelled .calendar-agenda-title > a { text-decoration: line-through; }
@container calendar-agenda (width < 36rem) {
  .calendar-agenda-item > .cite-badges { grid-column: 1 / -1; }
}
.rb-week-grid { --bs-calendar-month-week-min-height: 14rem; }
.rb-empty { padding: 1.5rem 0; color: var(--bs-secondary-color); }

/* Cited values */
.rb-sep { margin: 0 .35em; color: var(--bs-secondary-color); }
.rb-qualifier { margin-left: .35em; }
.rb-period { margin-left: .35em; }
.rb-fields dd { margin-bottom: .6rem; }
.rb-history { display: block; font-size: .8125rem; }

/* Small conflict: an always-visible mark; the detail shows on hover, on keyboard focus and on tap (popover) */
.rb-minor { position: relative; display: inline-block; margin-left: .2em; vertical-align: baseline; }
.rb-minor-marker {
  min-width: 1.5rem; min-height: 1.5rem; padding: 0 .3rem; font-size: .75rem; font-weight: 700; line-height: 1.4;
  color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle);
  border: 1px solid var(--bs-warning-border-subtle); border-radius: 999px; cursor: pointer;
}
.rb-minor-marker:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.rb-minor-panel {
  display: none; width: min(22rem, 86vw); padding: .75rem; margin: 0; font-size: .8125rem; font-weight: 400;
  line-height: 1.4; text-align: left; text-transform: none; letter-spacing: normal; white-space: normal;
  color: var(--bs-body-color); background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-top: 3px solid var(--bs-warning); border-radius: var(--bs-border-radius); box-shadow: var(--bs-box-shadow);
}
.rb-minor:hover > .rb-minor-panel, .rb-minor:focus-within > .rb-minor-panel {
  display: block; position: absolute; z-index: 1050; top: 100%; left: 0; inset-inline-end: auto;
}
.rb-minor-panel:popover-open { display: block; position: fixed; inset: 0; height: fit-content; margin: auto; }
.rb-minor-title, .rb-minor-item { display: block; }
.rb-minor-title { margin-bottom: .4rem; font-weight: 600; }
.rb-minor-item + .rb-minor-item { margin-top: .3rem; }
.rb-minor-value { font-weight: 600; }
.rb-minor-sources { color: var(--bs-secondary-color); }

/* Roster and portraits */
.rb-portrait img { width: 100%; height: auto; border-radius: var(--bs-border-radius); }
.rb-roster-card { display: block; color: inherit; text-decoration: none; }
.rb-roster-card img, .rb-roster-noimg {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top;
  background: var(--bs-secondary-bg); border-radius: var(--bs-border-radius);
}
.rb-roster-name { display: block; margin-top: .35rem; font-weight: 600; line-height: 1.2; }
.rb-roster-card:hover .rb-roster-name, .rb-roster-card:focus-visible .rb-roster-name { text-decoration: underline; }
.rb-columns { columns: 16rem auto; column-gap: 2rem; }
.rb-columns li { break-inside: avoid; padding: .15rem 0; }
.rb-search { max-width: 40rem; }

/* Ads: progressive enhancement. Without scripts a slot is not shown at all; the script adds .rb-js to <html>. */
.rb-ad { display: none; }
.rb-js .rb-ad {
  display: block; min-height: 282px; margin: 1.5rem 0; padding: .25rem; text-align: center;
  background: repeating-linear-gradient(45deg, transparent 0 8px, var(--bs-tertiary-bg) 8px 16px);
  border: 1px dashed var(--bs-border-color);
}
.rb-ad-label { display: block; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-secondary-color); }
.rb-ad-body { min-height: 250px; }
@media (min-width: 768px) { .rb-js .rb-ad { min-height: 122px; } .rb-ad-body { min-height: 90px; } }

/* Tip jar: a small plain link in the bottom corner */
.rb-tip { position: fixed; z-index: 1030; right: calc(.75rem + env(safe-area-inset-right, 0px)); bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }

@media print { .rb-header, .rb-footer nav, .rb-ad, .rb-tip, .calendar-toolbar-group, .rb-filters { display: none !important; } }

/* The linked event's name beneath a broadcast's own name */
.rb-event-name { font-size: .8125rem; }
