@charset "utf-8";

/* Live-page-only responsive layout refinements.
   Next Gig card internals deliberately stay in next-gig.css so Home and Live
   use the same component. Only the Live page's surrounding rhythm is adjusted. */
@media (max-width: 760px) {
  .page-hero {
    padding-top: calc(
      var(--nightshift-header-mobile, 60px) + env(safe-area-inset-top, 0px) +
        38px
    ) !important;
    padding-bottom: 30px !important;
  }
  .page-hero .wrap {
    width: min(calc(100% - 32px), 440px) !important;
    margin-inline: auto !important;
  }
  .page-hero h1 {
    margin-bottom: 9px !important;
    line-height: 1.02 !important;
    text-wrap: balance;
  }
  .page-hero .hero-copy {
    max-width: 32ch;
    margin-inline: auto !important;
    line-height: 1.5 !important;
  }
  .page-guide {
    display: flex !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px 14px !important;
    margin-top: 18px !important;
  }
  .page-guide a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
  }

  .gigs-split,
  #upcoming,
  #past,
  #gallery {
    min-width: 0 !important;
  }
  #upcoming {
    padding-top: 26px !important;
    padding-bottom: 38px !important;
  }
  #gallery,
  #past {
    padding-top: 42px !important;
    padding-bottom: 42px !important;
  }
  /* The gig feed, gallery and archive use the shared content rail from
     assets/scss/layout/_rails.scss. They used to carry their own
     `min(calc(100% - 28px), 440px)` override, but 440px only ever bound above
     ~468px: on a 320-430px phone the rail is already narrower, so the cap did
     nothing useful and simply held those three sections up to 264px inside the
     rest of the page across 480-760px. */
  #upcoming .section-head,
  #gallery .section-head,
  #past .section-head {
    margin-bottom: 20px !important;
  }
  #upcoming .section-head h2,
  #gallery .section-head h2,
  #past .section-head h2 {
    line-height: 1.05 !important;
    text-wrap: balance;
  }
  .section-head .label {
    margin-top: 7px !important;
  }

  .feed-wrapper {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }
  .gig-list,
  .past-list,
  .past-year-scroll,
  .upcoming-more-box {
    width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
  }
  .gig-row {
    width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    grid-template-areas: "date main" "date action" !important;
    column-gap: 12px !important;
    row-gap: 7px !important;
    padding: 14px 12px !important;
    border-radius: 13px !important;
    overflow: hidden !important;
  }
  .gig-row .gig-date {
    padding-right: 10px !important;
  }
  .gig-row .gig-day {
    font-size: 1.75rem !important;
  }
  .gig-row .gig-main {
    min-width: 0 !important;
    gap: 4px !important;
  }
  .gig-row .gig-venue {
    font-size: 1.13rem !important;
    line-height: 1.17 !important;
    overflow-wrap: anywhere !important;
  }
  .gig-row .gig-loc {
    font-size: 0.83rem !important;
    line-height: 1.38 !important;
    overflow-wrap: anywhere !important;
  }
  .gig-row .gig-action {
    min-width: 0 !important;
    gap: 8px !important;
    margin-top: 1px !important;
    padding-top: 8px !important;
  }
  .gig-row .gig-time {
    font-size: 0.88rem !important;
    line-height: 1.3 !important;
  }
  .gig-row .gig-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 7px !important;
  }
  .gig-row .gig-links a {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .upcoming-more {
    margin-top: 14px !important;
  }
  .upcoming-more-btn,
  .past-year-btn {
    min-height: 48px !important;
    padding: 12px 13px !important;
    font-size: 0.92rem !important;
    line-height: 1.15 !important;
    letter-spacing: 0.12em !important;
  }
  .page-note {
    margin-top: 18px !important;
    padding: 16px !important;
    line-height: 1.55 !important;
  }
  .section-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-top: 16px !important;
    text-align: center !important;
  }
  .section-actions .button {
    width: 100% !important;
    min-height: 44px !important;
  }
  .section-actions .small {
    align-self: center !important;
  }

  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .gallery-grid figure {
    margin: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }
  .gallery-grid img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4/3 !important;
    object-fit: cover !important;
  }
  .gallery-more {
    margin-top: 14px !important;
  }
  .gallery-more summary {
    display: flex !important;
    min-height: 48px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .past-intro {
    margin-bottom: 18px !important;
    line-height: 1.55 !important;
  }
  .past-year + .past-year {
    margin-top: 14px !important;
  }
}

@media (max-width: 360px) {
  .feed-wrapper {
    padding: 8px !important;
  }
  .gig-row {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    column-gap: 9px !important;
    padding: 13px 10px !important;
  }
  .gig-row .gig-date {
    padding-right: 8px !important;
  }
  .gig-row .gig-day {
    font-size: 1.62rem !important;
  }
  .gig-row .gig-links {
    grid-template-columns: 1fr !important;
  }
}

/* Tablet/desktop rhythm: keep the calendar sections related without the large
   double-section gaps that made the page feel disconnected. */
@media (min-width: 761px) {
  #upcoming {
    padding-top: 44px;
    padding-bottom: 42px;
  }
  #gallery,
  #past {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  #upcoming .section-head,
  #gallery .section-head,
  #past .section-head {
    margin-bottom: 26px;
  }
  .feed-wrapper {
    padding: 18px;
    border-radius: 18px;
  }
}

@media (min-width: 1200px) {
  #upcoming {
    padding-top: 48px;
  }
  #gallery,
  #past {
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

/* Keep Live section labels on the same centre axis as their white headings. */
@media (max-width: 880px) {
  .live-page :is(#upcoming, #gallery, #past) .section-head {
    width: 100%;
    align-items: center !important;
    text-align: center !important;
  }

  .live-page :is(#upcoming, #gallery, #past) .section-head .label {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    align-self: stretch !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    text-align: center !important;
  }
}

/* ---- Gig badge and action fit across every viewport ---- */
.gig-row .gig-loc-row {
  min-width: 0;
}
.gig-row .gig-loc {
  min-width: 0;
  max-width: 100%;
}
.gig-row .gig-badges {
  flex: 0 0 auto;
  max-width: 100%;
  align-items: center;
}
.gig-row .gig-badge {
  box-sizing: border-box;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .gig-row .gig-loc-row {
    align-items: center;
  }
  .gig-row .gig-badges {
    gap: 5px;
  }
  .gig-row .gig-links a {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 761px) and (max-width: 1099px) {
  #upcoming .gig-row .gig-links {
    min-width: 0;
  }
  #upcoming .gig-row .gig-links a {
    min-width: 0;
  }
}

@media (min-width: 1100px) {
  #upcoming .gig-row .gig-action {
    min-width: 0;
  }
  #upcoming .gig-row .gig-time {
    min-width: 0;
  }
  #upcoming .gig-row .gig-links {
    min-width: 0;
  }
  #upcoming .gig-row .gig-links a {
    min-width: 0;
  }
}
