/* Campus ribbon in the website header (partials/campus-ribbon.blade.php).
   Sizes in rem so they scale with the header like the rest of it (the site's root
   font-size follows the screen width). Colours come from the instance settings
   through --rb-bg (ribbon) and --rb-fg (text + border).
   The ".logo-main a .logotext1 span" rules in siteview.css also match these spans,
   so the selectors here are made more specific to override them. */

/* When the name line holds a ribbon, lay it out as a row so the ribbon is centred
   on the height of the name (older browsers without :has() keep the inline layout). */
.logo-main a .logotext1:has(> .campus-ribbon) {
  display: flex;
  align-items: center;
}
.logo-main a .logotext1 span.campus-ribbon {
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  margin: 0 0 0 0.9rem;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--rb-fg, #f5cf5b);
}
.logo-main a .logotext1 span.campus-ribbon .campus-ribbon__inner {
  display: block;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  padding: 0.42em 1.2em;
}

/* Rounded and square ends: a single fine gold border. Fixed pixel width so it
   stays fine on large screens (rem would thicken it with the screen). */
.logo-main a .logotext1 span.campus-ribbon--rounded,
.logo-main a .logotext1 span.campus-ribbon--square {
  background: var(--rb-bg, #1a4d8f);
  border: 1.5px solid var(--rb-fg, #f5cf5b);
}
.logo-main a .logotext1 span.campus-ribbon--rounded { border-radius: 999px; }
.logo-main a .logotext1 span.campus-ribbon--square { border-radius: 0; }

/* Notched ends: the outer span (text colour) shows as the border around the inner one */
.logo-main a .logotext1 span.campus-ribbon--notched {
  background: var(--rb-fg, #f5cf5b);
  padding: 1.5px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.75rem) 50%, 100% 100%, 0 100%, 0.75rem 50%);
}
.logo-main a .logotext1 span.campus-ribbon--notched .campus-ribbon__inner {
  background: var(--rb-bg, #1a4d8f);
  padding-left: 1.5em;
  padding-right: 1.5em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.68rem) 50%, 100% 100%, 0 100%, 0.68rem 50%);
}

/* Phones: the ribbon sits on its own line under the name */
@media only screen and (max-width: 767px) and (orientation: portrait) {
  .logo-main a .logotext1:has(> .campus-ribbon) {
    display: block;
  }
  .logo-main a .logotext1 span.campus-ribbon {
    display: table;
    vertical-align: baseline;
    margin: 0.5rem 0 0.2rem 0;
    font-size: 1rem;
    letter-spacing: 0.04em;
  }
}
