/* A group's own page needs the same "main column + sidebar of cards"
   shape shows.css already built for the concert-page redesign — same
   widths, same .show-layout-style grid, just under a .pg- prefix since
   this page has its own header shape (logo + hero side by side, tags,
   tagline) that shows.css's hero doesn't. Every card in both columns
   reuses .sidebar-card from dashboard.css directly. */
.pg-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.pg-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.pg-header__identity {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.pg-avatar,
.pg-avatar--placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
}

.pg-avatar--placeholder {
  background: var(--secondary);
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 600;
}

.pg-tagline {
  font-style: italic;
  color: var(--muted);
  margin: 0.35rem 0 0.75rem;
}

.pg-hero {
  width: 340px;
  max-width: 45%;
  border-radius: 16px;
  object-fit: cover;
  height: 220px;
}

.pg-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pg-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-text);
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .pg-header {
    flex-direction: column;
  }

  .pg-hero {
    width: 100%;
    max-width: 100%;
  }
}

.pg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pg-main,
.pg-aside {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.pg-aside .sidebar-card + p {
  margin-top: 0;
}

@media (max-width: 960px) {
  .pg-shell {
    padding: 1.25rem;
  }

  .pg-layout {
    grid-template-columns: 1fr;
  }
}

/* About card's truncated description — read_more_controller.js swaps
   which of the two <p> blocks is hidden; this just styles the "Show
   more"/"Show less" button sitting at the end of whichever one is
   showing, as an inline text link rather than a full-width button
   (button/application.css's own default). */
.read-more__toggle {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.15rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.sidebar-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.sidebar-card__header h2 {
  margin: 0;
}

/* .secondary-link is styled as a full-width stacked auth-form button by
   default (application.css) — wrong for a card header's small trailing
   link, same fix dashboard's own "View full calendar" link already
   needed (see dashboard/_upcoming_schedule.html.erb). */
.sidebar-card__header .secondary-link {
  width: auto;
  flex: 0 0 auto;
}

/* Members card's avatar grid — same circular-avatar-with-placeholder
   idea as .avatar-stack (shows.css)/.profile-avatar (profile.css), just
   laid out as a wrapping grid with a name/role caption under each,
   rather than an overlapping stack. */
.pg-member-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.pg-member {
  width: 84px;
  text-align: center;
}

.pg-member__avatar,
.pg-member__avatar--placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.4rem;
}

.pg-member__avatar--placeholder {
  background: var(--secondary);
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.pg-member__name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.pg-member__role {
  font-size: 0.75rem;
  color: var(--muted);
}

.pg-member-more {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  margin: 0 auto 0.4rem;
}

/* Season card */
.pg-season {
  display: flex;
  gap: 1rem;
}

.pg-season__cover {
  width: 130px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
}

/* Contact card's social-link row. */
.pg-social-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.pg-social-links a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

/* The logo pan/zoom editor -- see logo_crop_controller.js. Both
   .logo-crop-frame (the outer hit area) and .logo-crop-frame__clip (the
   actual circular clip) deliberately layer onto .pg-avatar, rather than
   restating its 110px/circle rule, so the editor is WYSIWYG with the
   real avatar by construction, not by keeping a duplicated size in sync
   by hand. */
.logo-crop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

/* Same specificity as the rule above, so source order alone would decide
   which wins -- pinned explicitly rather than relying on this file
   staying below the [hidden] UA rule, which the browser's own [hidden] {
   display: none } can't out-specificity on its own. */
.logo-crop-overlay[hidden] {
  display: none;
}

/* .secondary-link sets its own display: inline-flex the same way
   .logo-crop-overlay's display: flex above did -- same fix, scoped to
   just this button rather than every .secondary-link in the app. */
[data-logo-crop-target="editButton"][hidden] {
  display: none;
}

.logo-crop-dialog {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.logo-crop-dialog h3 {
  margin: 0 0 0.35rem;
}

.logo-crop-frame {
  position: relative;
  margin: 1rem auto;
  cursor: grab;
  touch-action: none;
  background: var(--secondary);
}

.logo-crop-frame:active {
  cursor: grabbing;
}

/* .logo-crop-frame__clip is the actual circle -- positioned to exactly
   cover .logo-crop-frame (inset: 0 onto the same 110px box, both from
   .pg-avatar), clipping its own full-opacity image. .logo-crop-frame__dim
   is a second, identical copy of that same image sitting behind it at
   30% opacity and *not* clipped, so panning/zooming past the circle
   shows what the crop leaves out instead of hiding it outright -- see
   #render, which always gives both images the same size and transform. */
.logo-crop-frame__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.logo-crop-frame__dim {
  opacity: 0.3;
}

.logo-crop-frame__dim,
.logo-crop-frame__clip img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  user-select: none;
}

.logo-crop-zoom {
  display: block;
  width: 100%;
  margin: 0.5rem 0 1rem;
}

.logo-crop-dialog__actions {
  display: flex;
  gap: 0.6rem;
}

.logo-crop-dialog__actions .primary-button,
.logo-crop-dialog__actions .secondary-link {
  width: auto;
  flex: 1 1 0;
}

/* Rehearsals tab -- one .sidebar-card per upcoming concert (see
   RehearsalOverview), stacked plainly rather than in the grid
   .sidebar-card normally sits in (that grid's own `gap` is what
   normally spaces cards apart, so a bare margin-free stack needs its
   own gap here instead). */
.rehearsal-concert-cards {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rehearsal-concert-cards summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* The Past rehearsals card nests its own grid of concert cards (this
   season's own, plus one per previous season) inside a <details> that's
   already padded by its parent .sidebar-card, so it skips that outer
   grid's bottom margin -- nothing follows it that needs the space. */
.rehearsal-concert-cards--nested {
  margin-bottom: 0;
  margin-top: 0.75rem;
}

/* Every collapsible <summary> on this tab -- each concert card, the
   Past rehearsals wrapper, and each previous season's own group --
   gets the same custom right/down disclosure triangle .cast-section
   uses elsewhere on the site, in place of the browser's own
   inconsistent default marker, so "this is expandable" reads the same
   way everywhere on the page. */
.rehearsal-toggle {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rehearsal-toggle::-webkit-details-marker {
  display: none;
}

.rehearsal-toggle::before {
  content: "▸";
  display: inline-block;
  color: var(--muted);
  transition: transform 0.15s ease;
}

details[open] > .rehearsal-toggle::before {
  transform: rotate(90deg);
}
