/* Structural, mobile-first layout. Larger breakpoints live in responsive.css. */

.shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 24px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.04));
  mask-image: linear-gradient(#fff, transparent 85%);
}

/* Hero ------------------------------------------------------------------- */
/* overflow must stay visible so the absolutely-positioned More menu is never
   clipped by the panel's rounded corners; nothing else in the hero overflows. */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 24px;
  overflow: visible;
}

/* Panels create stacking contexts (backdrop-filter), so a later sibling panel
   would normally paint over the hero's open More menu. Lift the hero only
   while the menu is open. */
.hero:has(.more-menu[open]) {
  z-index: 40;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* Toolbar ---------------------------------------------------------------- */
.toolbar {
  padding: 16px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  flex: 1 1 150px;
  min-width: 140px;
}

.field-search {
  flex: 2 1 240px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 100%;
}

/* Schedule --------------------------------------------------------------- */
.schedule {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.launch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.reveal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

/* When both pagination buttons are hidden, collapse the row so it leaves no
   empty gap above the footer. */
.reveal-actions:not(:has(.btn:not([hidden]))) {
  display: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}
