/* Responsive overrides for portal.css, which this file is loaded AFTER (see
   app.html). Media queries add no specificity, so a bare `.foo` here ties with
   `.foo` in portal.css and wins on order alone — while a `.parent .foo` there
   still beats it at every width. Keep this file to @media blocks only: an
   unconditional rule here silently overrides portal.css at ALL widths, which
   is not what a file named "breakpoints" reads as. Base values belong in
   portal.css. Prefer matching the portal.css selector's specificity over
   relying on load order. */

@media (max-width: 991px) {
  .nested-panel {
    flex-direction: column;
  }

  .side-panel {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    flex-direction: column;
    justify-content: flex-start;
    flex-wrap: nowrap;
    border-right-style: none;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-color: var(--border);
  }

  .panel-title-bold {
    padding: 0;
    font-size: 1rem;
  }

  .live-hero {
    display: grid;
  }

  .panel-main {
    display: flex;
    flex-direction: column;
  }

  .nav-link-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .panel-title {
    padding: 0;
  }
}

@media (max-width: 767px) {
  .live-class-row {
    flex-direction: column;
    text-align: center;
  }

  .live-hero {
    display: flex;
    flex-direction: column-reverse;
    gap: 0;
  }

  .section-hdr {
    flex-direction: column;
  }

  .side-panel {
    flex-wrap: wrap;
  }

  .mc-layout {
    display: flex;
    flex-direction: column;
  }

  .nav-link-container {
    justify-content: center;
  }

  .live-hero-img {
    display: block;
    min-height: 0;
  }

  .netflix-row-lbl {
    text-align: center;
  }

  .course-cards-row {
    justify-content: center;
  }

  /* Stacks the card. `align-items: center` (already on
     `.profile-hybrid .profile-id-card`, 0-2-0) does the horizontal centering,
     and that selector's `text-align: left` also survives this rule — hence
     `.profile-id-text` centering its own text below. */
  .profile-id-card {
    flex-direction: column;
  }

  /* Undo the desktop right-rail treatment: `margin-left: auto` + `padding-left`
     push it to the far edge, which reads as misalignment once stacked. */
  .profile-id-plan {
    padding: 0;
    margin: 0;
    align-items: center;
  }

  .profile-id-text {
    text-align: center;
  }
}

@media (max-width: 479px) {
  /* Two columns instead of the base `auto-fit, minmax(200px, 1fr)`, which
     collapses to one this narrow. Two 1fr tracks ignore that 200px floor, so
     the card has to give the width back: on a 360px screen the page gutter
     (.maincontent, 2rem a side) and this gap leave ~142px per track, and
     the desktop 1.5rem card padding would spend 48px of it. The card rules
     below are scoped under .dash-stats (0-2-0) so they outrank portal.css on
     specificity rather than load order, and so they can't leak if .stat-card
     is ever reused off the dashboard. */
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .dash-stats .stat-card {
    padding: 0.875rem 0.75rem;
  }

  /* 0.1em of tracking on a 10.5px uppercase label costs a full character of
     width per 10 characters — enough to wrap "Active Courses" here. */
  .dash-stats .stat-label {
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
  }

  .dash-stats .stat-val {
    font-size: 1.25rem;
  }
}
