/* OAIT Design System 2.1.0 · reference/css/panel.css
   Panels and the inverse band (unit c-containers).

   Components
   - Panel (.oa-panel): a section-sized surface on the 32px hero radius, inside the page gutter, in
     one of three tones: tonal (the default), primary (one highlight per page), and inverse (the dark
     band, one per page); feature padding by default, hero padding with --hero.

   Implements canonical §10.11, §2.6, §2.8, §5.2, §6.1, §9 (decoration inside panels) and D-CSN-08,
   D-ARC-07, D-ARC-25, D-COL-12, D-COL-20, D-BCP-06, D-BCP-37, D-SEM-10.

   Tokens read: --color-surface-container-low, --color-on-surface, --color-on-surface-variant,
   --color-primary-container, --color-on-primary-container, --color-inverse-surface,
   --color-inverse-on-surface, --color-inverse-on-surface-variant, --color-inverse-primary,
   --color-on-card-art; --radius-hero; --space-5, --space-10, --space-12, --space-16, --space-20.
   Context properties set: --color-focus-ring (inverse-primary in the inverse band), --oa-link
   (inverse-primary in the inverse band), --color-mark-ink (on-card-art in the inverse band: the
   mark ink follows the ground, not the page theme).

   Classes: .oa-panel (+ --tonal, --primary, --inverse; --feature, the default padding, and --hero;
   __supporting).

   Breakpoints are literal: sm 40rem (640px), lg 64rem (1024px). */


/* ---------------------------------------------------------------------------------------------
   1. Panel. 32px corners, no shadow, a transparent 1px border for forced colors. It clips its
   decoration (shapes and glows are aria-hidden children placed with logical properties at
   z-index: var(--z-behind)), so it is positioned and isolated. Feature padding by default:
   40px 20px, 40px from 640px, 64px from 1024px (D-CSN-08, D-ARC-25).
   --------------------------------------------------------------------------------------------- */

.oa-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0;
  padding: var(--space-10) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-hero);
  background-color: var(--color-surface-container-low);
  color: var(--color-on-surface);
}

@media (min-width: 40rem) {
  .oa-panel {
    padding-inline: var(--space-10);
  }
}

@media (min-width: 64rem) {
  .oa-panel {
    padding: var(--space-16);
  }
}

/* Feature padding is the default; --feature states it: 40px block, 64px from 1024px. */
.oa-panel--feature {
  padding-block: var(--space-10);
}

@media (min-width: 64rem) {
  .oa-panel--feature {
    padding-block: var(--space-16);
  }
}

/* Hero padding: 48px block below 1024px, 80px from 1024px; the inline padding stays the panel's. */
.oa-panel--hero {
  padding-block: var(--space-12);
}

@media (min-width: 64rem) {
  .oa-panel--hero {
    padding-block: var(--space-20);
  }
}



/* ---------------------------------------------------------------------------------------------
   2. Tones (D-CSN-08, D-ARC-07, D-COL-12).
   tonal: surface-container-low with on-surface (hero, how it works, the auth frame). It is the
   default; --tonal states it.
   primary: primary-container with on-primary-container; at most one per page.
   inverse: inverse-surface with inverse-on-surface, dark in both themes; one per page. It
   re-points the context colors on the container, never per element: the ring and links to
   inverse-primary (7.73:1 or more), the mark ink to on-card-art. The filled button inside keeps
   primary with on-primary. Components inside write the inverse roles themselves; there is no
   subtree theme.
   --------------------------------------------------------------------------------------------- */

.oa-panel--tonal {
  background-color: var(--color-surface-container-low);
  color: var(--color-on-surface);
}

.oa-panel--primary {
  background-color: var(--color-primary-container);
  color: var(--color-on-primary-container);
}

.oa-panel--inverse {
  --color-focus-ring: var(--color-inverse-primary);
  --oa-link: var(--color-inverse-primary);
  --color-mark-ink: var(--color-on-card-art);
  background-color: var(--color-inverse-surface);
  color: var(--color-inverse-on-surface);
}


/* ---------------------------------------------------------------------------------------------
   3. Supporting text: a panel's secondary text (a lead, a note) in the tone's secondary role:
   on-surface-variant on the tonal and primary panels, inverse-on-surface-variant on the inverse
   band (canonical §2.6, §10.11).
   --------------------------------------------------------------------------------------------- */

.oa-panel__supporting {
  color: var(--color-on-surface-variant);
}

.oa-panel--inverse .oa-panel__supporting {
  color: var(--color-inverse-on-surface-variant);
}
