/*
 * Beat Outlaws shared style-pack foundation.
 *
 * This is intentionally a small layout vocabulary, not a visual theme. Each
 * pack supplies its own palette, type, borders, surfaces and optional desktop
 * composition. Keeping the common DOM rules here lets individual packs stay
 * readable while still allowing a future pack to replace Twig completely.
 */

.bo-stylepack-user,
.bo-stylepack-performer {
  --bo-pack-bg: #f6f4ef;
  --bo-pack-surface: rgba(255, 255, 255, 0.86);
  --bo-pack-surface-2: rgba(247, 247, 247, 0.92);
  --bo-pack-text: #20242a;
  --bo-pack-muted: #66707a;
  --bo-pack-heading: #15191e;
  --bo-pack-accent: #315f97;
  --bo-pack-accent-2: #8a315f;
  --bo-pack-line: rgba(28, 35, 44, 0.16);
  --bo-pack-shadow: 0 14px 34px rgba(25, 30, 38, 0.12);
  --bo-pack-radius: 18px;
  --bo-pack-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bo-pack-heading-font: var(--bo-pack-font);
  --bo-pack-max: 1120px;
  --bo-pack-glow-x: 50%;
  --bo-pack-glow-y: 28%;
  --bo-pack-scroll-shift: 0px;
  --bo-pack-scroll-angle: 0deg;

  position: relative;
  width: 100%;
  max-width: var(--bo-pack-max);
  margin-inline: auto;
  color: var(--bo-pack-text);
  font-family: var(--bo-pack-font);
  isolation: isolate;
}

.bo-stylepack-user *,
.bo-stylepack-performer * {
  box-sizing: border-box;
}

.bo-stylepack-user a,
.bo-stylepack-performer a {
  color: var(--bo-pack-accent);
  text-underline-offset: 0.16em;
}

.bo-stylepack-user a:hover,
.bo-stylepack-user a:focus-visible,
.bo-stylepack-performer a:hover,
.bo-stylepack-performer a:focus-visible {
  color: var(--bo-pack-accent-2);
}

.bo-stylepack-user a:focus-visible,
.bo-stylepack-user button:focus-visible,
.bo-stylepack-performer a:focus-visible,
.bo-stylepack-performer button:focus-visible {
  outline: 2px solid var(--bo-pack-accent);
  outline-offset: 3px;
}

/* Personal profile ------------------------------------------------------- */
.bo-stylepack-user__header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(155px, 245px) minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: start;
  padding: clamp(1rem, 2.6vw, 1.75rem);
  border: 1px solid var(--bo-pack-line);
  border-radius: var(--bo-pack-radius);
  background: var(--bo-pack-surface);
  box-shadow: var(--bo-pack-shadow);
  overflow: visible;
}

.bo-stylepack-user__header--no-avatar {
  grid-template-columns: minmax(0, 1fr);
}

.bo-stylepack-user__avatar {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--bo-pack-line);
  border-radius: calc(var(--bo-pack-radius) * 0.82);
  background: var(--bo-pack-surface-2);
  box-shadow: var(--bo-pack-shadow);
}

.bo-stylepack-user__avatar .field,
.bo-stylepack-user__avatar .field__item,
.bo-stylepack-user__avatar a {
  display: block;
  margin: 0;
}

.bo-stylepack-user__avatar img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bo-stylepack-user__identity {
  min-width: 0;
}

.bo-stylepack-user__meta {
  display: grid;
  gap: 0.45rem;
}

.bo-stylepack-user__meta-item,
.bo-stylepack-user__meta-item .field,
.bo-stylepack-user__meta-item .form-item,
.bo-stylepack-user__meta-item p,
.bo-stylepack-user__meta-item address {
  margin-top: 0;
  margin-bottom: 0;
}

.bo-stylepack-user__meta-item .field__label,
.bo-stylepack-user__meta-item .label,
.bo-stylepack-user__meta-item h4,
.bo-stylepack-user .bo-profile-member-for__label {
  margin: 0 0 0.08rem;
  color: var(--bo-pack-heading);
  font-family: var(--bo-pack-heading-font);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.bo-stylepack-user__owner-actions,
.bo-stylepack-user .bo-profile-account-links,
.bo-stylepack-user__utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  align-items: center;
  margin: 0.7rem 0 0;
}

.bo-stylepack-user .bo-profile-account-links {
  margin: 0;
}

.bo-stylepack-user .bo-profile-account-link,
.bo-stylepack-user__utility-action a,
.bo-stylepack-user__utility-action button,
.bo-stylepack-user__utility-action input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid var(--bo-pack-line);
  border-radius: 999px;
  background: var(--bo-pack-surface-2);
  color: var(--bo-pack-accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.bo-stylepack-user .bo-profile-account-link:hover,
.bo-stylepack-user .bo-profile-account-link:focus-visible,
.bo-stylepack-user__utility-action a:hover,
.bo-stylepack-user__utility-action a:focus-visible {
  border-color: var(--bo-pack-accent);
  color: var(--bo-pack-accent-2);
  text-decoration: none;
}

.bo-stylepack-user__utility-action:empty,
.bo-stylepack-user__utility-actions:empty {
  display: none;
}

/* Beat Outlaws' legacy profile SCSS loads after module CSS. These deliberately
 * higher-specificity rules let pack variables win without resorting to
 * !important, while leaving user-authored custom CSS free to opt in later. */
.path-user article.user.bo-stylepack-user .bo-profile-member-for__label,
.path-user article.user.bo-stylepack-user .field__label {
  color: var(--bo-pack-heading);
  font-family: var(--bo-pack-heading-font);
}

.path-user article.user.bo-stylepack-user .bo-profile-account-link,
.path-user article.user.bo-stylepack-user .bo-profile-quick-action,
.path-user article.user.bo-stylepack-user .bo-profile-more-actions__toggle {
  border-color: var(--bo-pack-line);
  background: var(--bo-pack-surface-2);
  color: var(--bo-pack-accent);
}

.path-user article.user.bo-stylepack-user .bo-profile-more-actions__menu {
  border-color: var(--bo-pack-line);
  background: var(--bo-pack-surface);
  color: var(--bo-pack-text);
}

.path-user article.user.bo-stylepack-user .bo-profile-more-actions__link {
  color: var(--bo-pack-accent);
}

.bo-stylepack-user__profiles {
  margin-top: 0.9rem;
}

.bo-stylepack-user__profiles h2 {
  margin: 0 0 0.35rem;
  color: var(--bo-pack-heading);
  font-family: var(--bo-pack-heading-font);
  font-size: 1.08rem;
  font-weight: 800;
}

.bo-stylepack-user__profiles ul {
  margin: 0;
  padding-left: 1.2rem;
}

.bo-stylepack-user__social {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--bo-pack-line);
  border-radius: calc(var(--bo-pack-radius) * 0.72);
  background: var(--bo-pack-surface);
}

.bo-stylepack-user__social .bo-follow-link,
.bo-stylepack-user__social .beat-social-profile-controls {
  margin: 0;
}

.bo-stylepack-user__social .beat-social-profile-controls {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  top: 0;
}

.bo-stylepack-user__social .beat-social-wall-composer-toggle {
  margin-right: auto;
}

.bo-stylepack-user__wall,
.bo-stylepack-performer__wall {
  position: relative;
  z-index: 2;
  margin-top: 0.85rem;
  padding: clamp(0.7rem, 1.8vw, 1.1rem);
  border: 1px solid var(--bo-pack-line);
  border-radius: var(--bo-pack-radius);
  background: var(--bo-pack-surface);
}

.bo-stylepack-user__wall > .bo-comments,
.bo-stylepack-performer__wall > .bo-comments {
  margin-top: 0;
}

/* Performer profile ------------------------------------------------------ */
.bo-stylepack-performer__content {
  position: relative;
  z-index: 2;
  padding: clamp(0.9rem, 2vw, 1.4rem);
  border: 1px solid var(--bo-pack-line);
  border-radius: var(--bo-pack-radius);
  background: var(--bo-pack-surface);
  box-shadow: var(--bo-pack-shadow);
}

.bo-stylepack-performer .node__content::after {
  display: block;
  clear: both;
  content: "";
}

.bo-stylepack-performer .field {
  margin-bottom: 0.62rem;
}

.bo-stylepack-performer .field__label {
  color: var(--bo-pack-heading);
  font-family: var(--bo-pack-heading-font);
  font-weight: 800;
}

.node-type--hot-performer .bo-stylepack-performer .field--name-field-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0.75rem;
  max-width: none;
  margin: 0 0 1rem;
  position: static;
  left: auto;
}

.node-type--hot-performer .bo-stylepack-performer .field--name-field-images .field__item {
  float: none;
  width: auto;
  margin: 0;
  overflow: hidden;
  border-radius: calc(var(--bo-pack-radius) * 0.72);
}

.bo-stylepack-performer .field--name-field-images img {
  box-shadow: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.bo-stylepack-performer .field--name-field-images a:hover img,
.bo-stylepack-performer .field--name-field-images a:focus-visible img {
  transform: scale(1.012);
}

.bo-stylepack-performer .field--name-field-genres .field__items,
.bo-stylepack-performer .field--name-field-social-network-pages .field__items,
.bo-stylepack-performer .field--name-field-music-links .field__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
}

.bo-stylepack-performer__added-by,
.bo-stylepack-performer__social {
  position: relative;
  z-index: 3;
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--bo-pack-line);
  border-radius: calc(var(--bo-pack-radius) * 0.72);
  background: var(--bo-pack-surface-2);
}

/* Shared ambient hooks --------------------------------------------------- */
.bo-stylepack-user::before,
.bo-stylepack-performer::before,
.bo-stylepack-user::after,
.bo-stylepack-performer::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}

@media (min-width: 992px) {
  .bo-stylepack-user[data-bo-pack-layout="offset"] .bo-stylepack-user__header {
    grid-template-columns: minmax(190px, 30%) minmax(0, 1fr);
  }

  .bo-stylepack-performer[data-bo-pack-layout="split"] .field--name-field-images {
    float: left;
    width: min(48%, 540px);
    margin: 0 1.6rem 1rem 0;
  }
}

@media (max-width: 767.98px) {
  .bo-stylepack-user,
  .bo-stylepack-performer {
    --bo-pack-radius: 15px;
  }

  .bo-stylepack-user__header {
    display: flow-root;
    padding: 0.82rem;
  }

  .bo-stylepack-user__avatar {
    float: left;
    width: clamp(92px, 29vw, 138px);
    margin: 0 0.8rem 0.55rem 0;
  }

  .bo-stylepack-user__identity,
  .bo-stylepack-user__meta {
    display: contents;
  }

  .bo-stylepack-user__meta-item {
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
  }

  .bo-stylepack-user__owner-actions,
  .bo-stylepack-user .bo-profile-account-links,
  .bo-stylepack-user__utility-actions {
    gap: 0.32rem;
  }

  .bo-stylepack-user .bo-profile-account-link,
  .bo-stylepack-user__utility-action a,
  .bo-stylepack-user__utility-action button,
  .bo-stylepack-user__utility-action input[type="submit"] {
    min-height: 1.9rem;
    padding: 0.3rem 0.56rem;
    font-size: 0.82rem;
  }

  .bo-stylepack-performer__content,
  .bo-stylepack-user__wall,
  .bo-stylepack-performer__wall {
    padding: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bo-stylepack-user *,
  .bo-stylepack-performer * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Page chrome ------------------------------------------------------------
 *
 * A profile style pack should feel like a page, not a card dropped into the
 * default Beat Outlaws shell. The site-wide blue utility/preheader bar lives
 * outside .page and is intentionally left alone. Everything below it can pick
 * up the active profile's palette: primary navbar, page title area, mobile
 * menu, and footer.
 *
 * :has() keeps the active pack tied to the profile already rendered on this
 * page, so there is no extra request, body-class JS, or cache-sensitive PHP
 * state just to theme the surrounding chrome.
 */
body:has(.bo-stylepack-profile) {
  --bo-pack-chrome-nav-bg: rgba(255, 255, 255, 0.96);
  --bo-pack-chrome-header-bg: #ffffff;
  --bo-pack-chrome-nav-text: #20242a;
  --bo-pack-chrome-footer-bg: rgba(255, 255, 255, 0.96);
  --bo-pack-chrome-footer-text: #20242a;
  --bo-pack-chrome-surface: rgba(255, 255, 255, 0.88);
  --bo-pack-chrome-title: #15191e;
  --bo-pack-chrome-muted: #66707a;
  --bo-pack-chrome-accent: #315f97;
  --bo-pack-chrome-accent-2: #8a315f;
  --bo-pack-chrome-line: rgba(28, 35, 44, 0.16);
  --bo-pack-chrome-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bo-pack-chrome-heading-font: var(--bo-pack-chrome-font);
  --bo-pack-chrome-radius: 12px;
  --bo-pack-chrome-shadow: 0 10px 28px rgba(25, 30, 38, 0.12);
  --bo-pack-chrome-toggler-filter: none;

  /* Mobile navigation resolves from the active pack's actual navbar palette.
   * Premium packs use --bo-pack-nav-* while the original packs use the
   * --bo-pack-chrome-nav-* variables. Keeping the fallback here prevents the
   * Bootstrap collapse panel from reverting to a white surface on dark packs. */
  --bo-pack-mobile-menu-bg: var(--bo-pack-nav-bg, var(--bo-pack-chrome-nav-bg));
  --bo-pack-mobile-menu-text: var(--bo-pack-nav-text, var(--bo-pack-chrome-nav-text));
  --bo-pack-mobile-menu-accent: var(--bo-pack-accent, var(--bo-pack-chrome-accent));
}


/* Let the style-pack page background actually reach the center column. The
 * base theme paints these containers translucent white on user/performer
 * pages, which otherwise leaves a Beat Outlaws-colored rectangle around the
 * themed profile. */
body:has(.bo-stylepack-profile) .page__header {
  position: relative;
  z-index: 1;
  background: var(--bo-pack-chrome-header-bg);
  border-bottom: 1px solid var(--bo-pack-chrome-line);
  color: var(--bo-pack-chrome-title);
  font-family: var(--bo-pack-chrome-font);
}

body:has(.bo-stylepack-profile) .page__header > .container,
body:has(.bo-stylepack-profile) .page__content > .container {
  background: transparent;
}

/* Primary navigation. This is .page > nav.navbar in the Radix page template.
 * The blue utility bar above it is intentionally not selected. */
body:has(.bo-stylepack-profile) .page > nav.navbar {
  background: var(--bo-pack-chrome-nav-bg);
  border-bottom: 1px solid var(--bo-pack-chrome-line);
  /* Premium packs expose --bo-pack-nav-text on the body. The original/free
   * packs use --bo-pack-chrome-nav-text. Keep one safe fallback chain. */
  color: var(--bo-pack-nav-text, var(--bo-pack-chrome-nav-text));
  box-shadow: var(--bo-pack-chrome-shadow);
  font-family: var(--bo-pack-chrome-font);
}

body:has(.bo-stylepack-profile) .page > nav.navbar > .container,
body:has(.bo-stylepack-profile) .page > nav.navbar .container {
  background: transparent;
}

/* Keep this fallback intentionally weaker than an individual pack's chrome
 * rules. The earlier selector was specific enough to pin dark fallback text
 * over premium nav colors on dark themes. */
body:has(.bo-stylepack-profile) .page :where(
  nav.navbar .nav-link,
  nav.navbar .navbar-brand,
  nav.navbar .bo-mobile-nav-title
) {
  color: var(--bo-pack-nav-text, var(--bo-pack-chrome-nav-text));
  font-family: var(--bo-pack-chrome-font);
}

body:has(.bo-stylepack-profile) .page > nav.navbar .nav-link {
  border-radius: calc(var(--bo-pack-chrome-radius) * 0.55);
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

body:has(.bo-stylepack-profile) .page > nav.navbar .nav-link:hover,
body:has(.bo-stylepack-profile) .page > nav.navbar .nav-link:focus-visible,
body:has(.bo-stylepack-profile) .page > nav.navbar .nav-link.is-active {
  background: var(--bo-pack-chrome-surface);
  color: var(--bo-pack-chrome-accent);
}

body:has(.bo-stylepack-profile) .page > nav.navbar .nav-link:focus-visible {
  outline: 2px solid var(--bo-pack-chrome-accent);
  outline-offset: 2px;
}

body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-toggler {
  border: 1px solid var(--bo-pack-chrome-line);
  background: var(--bo-pack-chrome-surface);
  box-shadow: none;
}

body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-toggler-icon {
  filter: var(--bo-pack-chrome-toggler-filter);
}

/* Desktop navbar title (including My Space), body H1, username subtitle and
 * mobile title slot all use the pack's own title language. The specificity is
 * intentionally higher than the site's branded Dancing Script rules. */
body:has(.bo-stylepack-profile) .page > nav.navbar .block--laws-pagetitle .title.page-title,
body:has(.bo-stylepack-profile) .page > nav.navbar .bo-mobile-nav-title,
body:has(.bo-stylepack-profile) main .page__header h1.page-title,
body:has(.bo-stylepack-profile) main .block-page-title-block h1.page-title,
body:has(.bo-stylepack-profile) .bo-my-space-profile-subtitle {
  /* Premium packs call this --bo-pack-nav-text; the free packs have their
   * own --bo-pack-chrome-title. This fixes the dark-gray mobile/page title
   * fallback without requiring every pack to duplicate a rule. */
  color: var(--bo-pack-nav-text, var(--bo-pack-chrome-title));
  font-family: var(--bo-pack-heading-font, var(--bo-pack-chrome-heading-font));
  text-shadow: none;
}

body:has(.bo-stylepack-profile) .bo-my-space-profile-subtitle {
  color: var(--bo-pack-chrome-muted);
}

/* Mobile menu is a Bootstrap collapse overlay in the Beat Outlaws theme.
 * Resolve its surface and text from the *active navbar palette*, not from the
 * generic chrome defaults. This matters especially for premium dark packs,
 * where --bo-pack-nav-bg/text are intentionally different from the fallback. */
@media (max-width: 767.99px) {
  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse,
  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse.collapse.show,
  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse.collapsing {
    background: var(--bo-pack-mobile-menu-bg);
    border-color: var(--bo-pack-line, var(--bo-pack-chrome-line));
    color: var(--bo-pack-mobile-menu-text);
    box-shadow: var(--bo-pack-chrome-shadow);
  }

  /* Bootstrap/base-theme link rules are surprisingly assertive here. Keep the
   * menu's normal state tied to the pack, while still allowing a particular
   * pack to override these variables if it wants a bespoke mobile treatment. */
  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse .nav-link {
    color: var(--bo-pack-mobile-menu-text);
    text-shadow: none;
  }

  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse .nav-link:hover,
  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse .nav-link:focus-visible,
  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse .nav-link.is-active,
  body:has(.bo-stylepack-profile) .page > nav.navbar .navbar-collapse .nav-link.active {
    background: color-mix(in srgb, var(--bo-pack-mobile-menu-text) 11%, transparent);
    color: var(--bo-pack-mobile-menu-accent);
  }
}

/* Footer ---------------------------------------------------------------- */
body:has(.bo-stylepack-profile) .page__footer {
  background: var(--bo-pack-chrome-footer-bg);
  border-top: 1px solid var(--bo-pack-chrome-line);
  color: var(--bo-pack-chrome-footer-text);
  font-family: var(--bo-pack-chrome-font);
}

body:has(.bo-stylepack-profile) .page__footer > .container,
body:has(.bo-stylepack-profile) .page__footer .container {
  background: var(--bo-pack-chrome-footer-bg);
  color: var(--bo-pack-chrome-footer-text);
  border-radius: var(--bo-pack-chrome-radius) var(--bo-pack-chrome-radius) 0 0;
}

body:has(.bo-stylepack-profile) .page__footer a,
body:has(.bo-stylepack-profile) .page__footer .nav-link,
body:has(.bo-stylepack-profile) .page__footer .bo-user-nav__link {
  color: var(--bo-pack-chrome-accent);
  text-decoration-color: color-mix(in srgb, var(--bo-pack-chrome-accent) 48%, transparent);
  text-underline-offset: 0.16em;
}

body:has(.bo-stylepack-profile) .page__footer a:hover,
body:has(.bo-stylepack-profile) .page__footer a:focus-visible,
body:has(.bo-stylepack-profile) .page__footer .nav-link.is-active {
  color: var(--bo-pack-chrome-accent-2);
}

body:has(.bo-stylepack-profile) .page__footer a:focus-visible {
  outline: 2px solid var(--bo-pack-chrome-accent);
  outline-offset: 2px;
}

body:has(.bo-stylepack-profile) .page__footer .block--beatoutlaws-useraccountmenu {
  padding: 0.45rem;
  border: 1px solid var(--bo-pack-chrome-line);
  border-radius: calc(var(--bo-pack-chrome-radius) * 0.72);
  background: var(--bo-pack-chrome-surface);
}

body:has(.bo-stylepack-profile) .page__footer .bo-user-nav__svg {
  fill: currentColor;
}

body:has(.bo-stylepack-profile) .page__footer .block--beatoutlaws-footercopyright,
body:has(.bo-stylepack-profile) .page__footer .bo-online {
  color: var(--bo-pack-chrome-footer-text);
}

/* Public profile intro -------------------------------------------------- */
.bo-stylepack-user__intro {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 0.8rem;
  padding: clamp(0.85rem, 1.8vw, 1.15rem) clamp(0.9rem, 2vw, 1.25rem);
  border: 1px solid var(--bo-pack-line);
  border-left: 4px solid var(--bo-pack-accent);
  border-radius: calc(var(--bo-pack-radius) * 0.72);
  background: var(--bo-pack-surface);
  color: var(--bo-pack-text);
  box-shadow: var(--bo-pack-shadow);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.bo-stylepack-user__intro .field,
.bo-stylepack-user__intro .field__item {
  margin: 0;
}

.bo-stylepack-user__intro :where(p,ul,ol,blockquote) {
  margin-top: 0;
}

.bo-stylepack-user__intro :where(p,ul,ol,blockquote):last-child {
  margin-bottom: 0;
}

.bo-stylepack-user__intro blockquote {
  margin-inline: 0;
  padding-left: 0.9rem;
  border-left: 3px solid color-mix(in srgb, var(--bo-pack-accent) 55%, var(--bo-pack-line));
  color: var(--bo-pack-text);
  font-style: italic;
}

.bo-stylepack-user__intro cite {
  color: var(--bo-pack-muted);
  font-size: 0.94em;
}


/* Profile section grouping ------------------------------------------------
 * The wrapper elements use display:contents by default so adventurous desktop
 * layouts keep their independent header/intro/social/wall placement. For
 * single-column packs we switch the wrappers on and visually join intro with
 * identity, and follow controls with the wall. */
.bo-stylepack-user__identity-group,
.bo-stylepack-user__wall-group {
  display: contents;
}

@media (min-width: 1100px) {
  .bo-stylepack-user.bo-stylepack-user--grouped-stacked .bo-stylepack-user__identity-group,
  .bo-stylepack-user.bo-stylepack-user--grouped-stacked .bo-stylepack-user__wall-group {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .bo-stylepack-user.bo-stylepack-user--grouped-stacked .bo-stylepack-user__identity-group--has-intro > .bo-stylepack-user__header {
    margin-bottom: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }

  .bo-stylepack-user.bo-stylepack-user--grouped-stacked .bo-stylepack-user__identity-group--has-intro > .bo-stylepack-user__intro {
    width: 100%;
    margin-top: 0;
    border-top-width: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
  }

  .bo-stylepack-user.bo-stylepack-user--grouped-stacked .bo-stylepack-user__wall-group {
    margin-top: 0.85rem;
  }

  .bo-stylepack-user.bo-stylepack-user--grouped-stacked .bo-stylepack-user__wall-group--has-social > .bo-stylepack-user__social {
    width: 100%;
    margin: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }

  .bo-stylepack-user.bo-stylepack-user--grouped-stacked .bo-stylepack-user__wall-group--has-social > .bo-stylepack-user__wall {
    width: 100%;
    margin-top: 0;
    border-top-width: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
  }
}

/* My Space desktop masthead ------------------------------------------------
 * The highlighted navigation item already supplies the My Space joke/context.
 * On an owner's desktop profile, keep the page-title h1 available to assistive
 * technology but remove the decorative tilted duplicate from sight. The
 * username remains the visual identity and stays vertically centered between
 * the header rules. Mobile keeps its existing compact title behavior. */
@media (min-width: 768px) {
  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header {
    overflow: visible;
  }

  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header > .container,
  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header .block-page-title-block,
  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header .block-page-title-block > .block__content {
    width: 100%;
  }

  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header > .container {
    min-height: clamp(4rem, 4.8vw, 4.8rem);
  }

  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header .block-page-title-block > .block__content {
    position: relative;
    display: flex;
    min-height: clamp(4rem, 4.8vw, 4.8rem);
    align-items: center;
    padding-right: 0;
  }

  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header h1.page-title,
  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .block-page-title-block h1.page-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  body.bo-title-my-space-own-profile:has(.bo-stylepack-profile) main .page__header .bo-my-space-profile-subtitle {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: clamp(4rem, 4.8vw, 4.8rem);
    align-items: center;
    align-self: stretch;
    max-width: 100%;
    margin: -5px 0 0 !important;
    padding: 0 !important;
    line-height: 1.08;
  }
}

/* ========================================================================
 * Standard four-slot artwork placement.
 *
 * Conventional highlighted themes expose four reusable art targets:
 *   header_art   -> .bo-stylepack-user__header
 *   backdrop     -> .page__content
 *   featured_art -> .page__header
 *   intro_art    -> .bo-stylepack-user__intro (when present)
 *
 * The actual slot nodes are rendered by Twig inside .bo-stylepack-art-layer.
 * stylepack-art-targets.js moves those nodes into their target elements. We
 * hide the staging layer so there is no pre-JS flash of unpositioned artwork.
 * ======================================================================== */
.bo-stylepack-profile:has(.bo-stylepack-art-slot--intro-art) > .bo-stylepack-art-layer {
  display: none;
}

.bo-stylepack-art-target {
  position: relative;
  isolation: isolate;
}

.bo-stylepack-art-target > .bo-stylepack-applied-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.bo-stylepack-art-target > .bo-stylepack-applied-art img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  object-fit: cover;
  object-position: center;
  filter: none;
}

.bo-stylepack-art-target > .bo-stylepack-applied-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(0,0,0,.08));
}

.bo-stylepack-art-target > :not(.bo-stylepack-applied-art) {
  position: relative;
  z-index: 1;
}

/* 1. Identity/profile header art. */
.bo-stylepack-art-target--profile-header > .bo-stylepack-applied-art img {
  opacity: .42;
}

/* 2. Page-content atmosphere. This intentionally sits behind the theme's
 * cards/surfaces, so opaque themes may reveal it mainly around their edges. */
.page__content.bo-stylepack-art-target--page-content {
  overflow: hidden;
}

.bo-stylepack-art-target--page-content > .bo-stylepack-applied-art {
  border-radius: 0;
}

.bo-stylepack-art-target--page-content > .bo-stylepack-applied-art img {
  opacity: .34;
}

/* 3. Page-title/header-band art. */
.page__header.bo-stylepack-art-target--page-header {
  overflow: hidden;
}

.bo-stylepack-art-target--page-header > .bo-stylepack-applied-art {
  border-radius: 0;
}

.bo-stylepack-art-target--page-header > .bo-stylepack-applied-art img {
  opacity: .42;
}

/* 4. Intro artwork. Kept subtle so a quote/bio stays readable. */
.bo-stylepack-art-target--intro > .bo-stylepack-applied-art img {
  opacity: .28;
}

.bo-stylepack-art-target--intro > .bo-stylepack-applied-art::after,
.bo-stylepack-art-target--profile-header > .bo-stylepack-applied-art::after {
  background: linear-gradient(90deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
}

@media (max-width: 900px) {
  .bo-stylepack-art-target--page-content > .bo-stylepack-applied-art img {
    opacity: .22;
  }

  .bo-stylepack-art-target--page-header > .bo-stylepack-applied-art img,
  .bo-stylepack-art-target--profile-header > .bo-stylepack-applied-art img {
    opacity: .32;
  }

  .bo-stylepack-art-target--intro > .bo-stylepack-applied-art img {
    opacity: .2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bo-stylepack-applied-art,
  .bo-stylepack-applied-art img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* V3 artwork routed into an inner page-content .container. */
.bo-stylepack-art-target--page-container {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.bo-stylepack-art-target--page-container > .bo-stylepack-applied-art {
  border-radius: inherit;
}
.bo-stylepack-art-target--page-container > .bo-stylepack-applied-art img {
  opacity: .3;
}


/* ==========================================================================
 * Fleeting status toast v2.
 *
 * JS moves status/success messages into this fixed region so they never
 * reserve layout space. Error/warning messages stay in Drupal's normal
 * message region and remain persistent.
 * ========================================================================== */
.bo-status-toast-region {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 5.25rem);
  right: 1rem;
  z-index: 11050;
  display: grid;
  gap: .55rem;
  width: min(26rem, calc(100vw - 2rem));
  pointer-events: none;
}

.bo-status-toast-region .bo-status-toast {
  position: relative !important;
  inset: auto !important;
  width: 100%;
  margin: 0 !important;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: .8rem;
  background: rgba(20, 92, 61, .97);
  color: #fff;
  box-shadow: 0 .75rem 2rem rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translate3d(0, -.65rem, 0) scale(.985);
  transition:
    opacity .5s ease,
    transform .5s ease;
  pointer-events: auto;
}

.bo-status-toast-region .bo-status-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.bo-status-toast-region .bo-status-toast.is-leaving {
  opacity: 0;
  transform: translate3d(0, -.45rem, 0) scale(.985);
  pointer-events: none;
}

.bo-status-toast-region .bo-status-toast a {
  color: #fff;
}

[data-drupal-messages]:empty,
.messages-list:empty {
  display: none !important;
}

@media (max-width: 700px) {
  .bo-status-toast-region {
    top: calc(env(safe-area-inset-top, 0px) + 4.75rem);
    right: .65rem;
    width: calc(100vw - 1.3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bo-status-toast-region .bo-status-toast {
    transform: none !important;
    transition: opacity .35s linear;
  }
}
