/* Shared ZCOURSE components. Loaded by the catalogue and product pages. */
@font-face {
  font-family: 'ZCOURSE Montserrat';
  src: url('/fonts/zcourse/montserrat-bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'ZCOURSE Montserrat';
  src: url('/fonts/zcourse/montserrat-extrabold.ttf') format('truetype');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

.design-system {
  --ds-brand-primary: #2cbdec;
  --ds-accent: var(--ds-brand-primary);
  --ds-on-brand: #10242c;
  --ds-primary-text: var(--ds-on-brand);
  --ds-link-text: var(--ds-text);
  --ds-link-decoration: var(--ds-brand-primary);
  --ds-focus-ring: #087b9d;
  --ds-yellow: #ffc12c;
  --ds-graphite: #1a2124;
  --ds-danger: #c63f48;
  --ds-success: #278a62;
  --ds-warning: #a86b00;
  --ds-info: #197ca1;
  --ds-school: #6d4ce8;
  --ds-meetings: #c6533f;
  --ds-product-brand-text: #ffffff;
  --ds-surface: #fbfcfd;
  --ds-surface-soft: #f3f6f7;
  --ds-surface-raised: #ffffff;
  --ds-border: #dbe4e8;
  --ds-text: #1a2124;
  --ds-muted: #63777f;
  --ds-shadow: 0 18px 44px rgba(26, 33, 36, 0.08);
  --type-marketing-display: 800 48px/50px 'ZCOURSE Montserrat', Montserrat, 'Segoe UI', sans-serif;
  --type-marketing-section: 800 36px/39px 'ZCOURSE Montserrat', Montserrat, 'Segoe UI', sans-serif;
  --type-marketing-subtitle: 700 24px/29px 'ZCOURSE Montserrat', Montserrat, 'Segoe UI', sans-serif;
  --type-marketing-lead: 400 20px/30px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-marketing-body: 400 16px/25px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-marketing-caption: 600 12px/16px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-marketing-cta: 600 16px/20px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-marketing-eyebrow: 600 12px/16px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-marketing-link: 600 16px/25px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-page-title: 700 28px/34px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-section-title: 600 20px/26px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-block-title: 600 16px/22px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-lead: 400 16px/24px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-body: 400 15px/22px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-dense: 400 14px/20px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-label: 600 13px/18px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-meta: 400 12px/16px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-action: 600 16px/20px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-input: 400 15px/20px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-link: 600 15px/22px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-metric: 700 24px/30px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  --type-ui-code: 400 13px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ds-text);
}

.ds-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}
.ds-button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.ds-button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}
.ds-button:focus-visible {
}
.ds-button--accent {
  min-height: 56px;
  padding-inline: 22px;
  color: #172025;
  background: var(--ds-yellow);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--ds-yellow) 26%, transparent);
}
.ds-button--primary {
  color: #10242c;
  background: var(--ds-accent);
}
.ds-button--school {
  color: var(--ds-product-brand-text);
  background: var(--ds-school);
}
.ds-button--meetings {
  color: var(--ds-product-brand-text);
  background: var(--ds-meetings);
}
.ds-button--marketing {
  min-height: 56px;
  padding-inline: 22px;
}
.ds-button--secondary {
  color: var(--ds-text);
  border-color: var(--ds-border);
  background: var(--ds-surface);
}
.ds-button--neutral {
  color: var(--ds-text);
  background: color-mix(in srgb, var(--ds-muted) 16%, var(--ds-surface));
}
.ds-button--ghost {
  color: var(--ds-link-text);
  background: transparent;
}
.ds-button--text {
  min-height: auto;
  padding: 4px 0;
  color: var(--ds-link-text);
  background: transparent;
}
.ds-button--danger {
  color: #fff;
  background: var(--ds-danger);
}
.ds-button--danger-outline {
  color: var(--ds-danger);
  border-color: currentColor;
  background: transparent;
}
.ds-button--small {
  min-height: 40px;
  padding-inline: 14px;
}
.ds-button--compact {
  min-height: 32px;
  padding-inline: 11px;
  border-radius: 9px;
}
.ds-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}
.ds-button--loading::before {
  content: '';
  width: 15px;
  height: 15px;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ds-spin 800ms linear infinite;
}
@keyframes ds-spin {
  to {
    transform: rotate(360deg);
  }
}
.ds-button svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.ds-ui-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ds-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  color: var(--ds-muted);
  background: var(--ds-surface);
  font-size: 12px;
  font-weight: 700;
}
.ds-status--info {
  color: var(--ds-info);
  border-color: color-mix(in srgb, var(--ds-info) 45%, var(--ds-border));
  background: color-mix(in srgb, var(--ds-info) 10%, var(--ds-surface));
}
.ds-status--success {
  color: var(--ds-success);
  border-color: color-mix(in srgb, var(--ds-success) 45%, var(--ds-border));
  background: color-mix(in srgb, var(--ds-success) 10%, var(--ds-surface));
}
.ds-status--warning {
  color: var(--ds-warning);
  border-color: color-mix(in srgb, var(--ds-warning) 45%, var(--ds-border));
  background: color-mix(in srgb, var(--ds-warning) 10%, var(--ds-surface));
}
.ds-status--danger {
  color: var(--ds-danger);
  border-color: color-mix(in srgb, var(--ds-danger) 45%, var(--ds-border));
  background: color-mix(in srgb, var(--ds-danger) 10%, var(--ds-surface));
}
@media (max-width: 720px) {
  .ds-button {
    max-width: 100%;
  }
}
.design-system .ds-button {
  min-height: var(--ds-control-height);
  border-radius: var(--ds-radius);
}
.design-system .ds-button:hover:not(:disabled),
.design-system .ds-button:active:not(:disabled) {
  transform: none;
}
.design-system .ds-button--primary {
  color: var(--ds-primary-text);
}
.design-system .ds-button--danger {
  color: var(--ds-danger-text);
}
.design-system .ds-button--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ds-accent) 88%, var(--ds-surface));
}
.design-system .ds-button--secondary {
  border-color: var(--ds-control-border);
}
.design-system .ds-button--secondary:hover:not(:disabled) {
  background: var(--ds-surface-soft);
  color: var(--ds-text);
}
.design-system .ds-button--ghost:hover:not(:disabled),
.design-system .ds-button--text:hover:not(:disabled) {
  background: var(--ds-surface-soft);
}
.design-system .ds-button--text {
  min-height: 32px;
}
.design-system .ds-button--small {
  min-height: 40px;
}
.design-system .ds-button--compact {
  min-height: 32px;
}
.design-system .ds-button--marketing,
.design-system .ds-button--accent {
  min-height: 56px;
}
.design-system .ds-button--loading {
  position: relative;
}
.design-system .ds-button--loading::before {
  position: absolute;
  inset-inline-start: 8px;
}
.design-system .ds-button--loading:has(svg)::before {
  position: static;
}
.design-system .ds-button--loading svg {
  display: none;
}
.design-system .ds-button--loading:disabled {
  opacity: 1;
  cursor: progress;
}
.design-system .ds-stack > .ds-button {
  justify-self: start;
}
.design-system .ds-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--ds-border);
  border-inline-start: 3px solid var(--ds-info);
  background: var(--ds-surface);
  border-radius: 8px;
}
.design-system .ds-banner > span {
  flex: 1 1 160px;
}
.design-system .ds-banner--error {
  border-inline-start-color: var(--ds-danger);
}
.design-system .ds-ui-icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.design-system .ds-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin-block: 16px;
}
.design-system .ds-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font: var(--type-ui-dense);
}
.design-system .ds-table td,
.design-system .ds-table th {
  padding: 12px;
  border-bottom: 1px solid var(--ds-border);
  vertical-align: middle;
}
.design-system .ds-table thead {
  background: var(--ds-surface);
}
.design-system .ds-table th {
  font-weight: 600;
}
@media (max-width: 720px) {
  .design-system .ds-button--compact,
  .design-system .ds-button--small,
  .design-system .ds-button--text {
    min-height: 44px;
  }
  .design-system .ds-table td,
  .design-system .ds-table th {
    padding: 10px 6px;
  }
}
@media (pointer: coarse) {
  .design-system .ds-button--small,
  .design-system .ds-button--compact,
  .design-system .ds-button--text {
    min-height: 44px;
    min-width: 44px;
  }
}
.design-system .ds-button--meetings {
  background: var(--ds-meetings-action);
}
.design-system .ds-button--primary:hover:not(:disabled) {
  background: var(--ds-action-hover);
}
.design-system .ds-button--primary:active:not(:disabled) {
  background: var(--ds-action-pressed);
}
.design-system .ds-button:disabled:not(.ds-button--loading) {
  background: var(--ds-disabled-bg);
  color: var(--ds-disabled-text);
  opacity: 1;
}

/* Layout primitives share the same tokens and are usable outside the catalogue. */
.design-system .ds-surface {
  padding: 24px;
  border: 0;
  border-radius: 16px;
  background: var(--ds-surface);
  box-shadow: none;
  min-width: 0;
}

/* Shared loading placeholder. Keep its geometry close to the content it replaces. */
.design-system .ds-skeleton {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.design-system .ds-skeleton > span {
  display: block;
  width: 72%;
  height: 13px;
  border-radius: var(--ds-radius, 8px);
  background: linear-gradient(90deg, var(--ds-surface-soft), var(--ds-surface), var(--ds-surface-soft));
  background-size: 200% 100%;
  animation: ds-shimmer 1.25s ease-in-out infinite;
}
.design-system .ds-skeleton > span:first-child {
  width: 42%;
  height: 18px;
}
.design-system .ds-skeleton > span:nth-child(2) {
  width: 90%;
}
.design-system .ds-skeleton--rows > span {
  width: 100%;
  height: 58px;
  border-radius: var(--ds-radius, 8px);
}
.design-system .ds-skeleton--rows > span:first-child,
.design-system .ds-skeleton--rows > span:nth-child(2) {
  width: 100%;
  height: 58px;
}
.design-system .ds-skeleton--metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 12px;
  width: 100%;
}
.design-system .ds-skeleton--metrics > span,
.design-system .ds-skeleton--metrics > span:first-child,
.design-system .ds-skeleton--metrics > span:nth-child(2) {
  width: 100%;
  height: 86px;
  border-radius: var(--ds-radius-surface, 12px);
}
.design-system .ds-skeleton-value {
  width: 64px;
  height: 28px;
  overflow: hidden;
  border-radius: var(--ds-radius, 8px);
  color: transparent !important;
  background: linear-gradient(90deg, var(--ds-surface-soft), var(--ds-surface), var(--ds-surface-soft));
  background-size: 200% 100%;
  animation: ds-shimmer 1.25s ease-in-out infinite;
}
@keyframes ds-shimmer {
  to {
    background-position: -200% 0;
  }
}
.design-system .ds-muted,
.design-system .ds-metric-label {
  color: var(--ds-muted);
}
.design-system .ds-metric-label {
  font: var(--type-ui-label);
  margin-bottom: 6px;
}
.design-system .ds-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 24px;
}
.design-system .ds-section-title ~ .ds-metric-grid {
  margin-top: 20px;
}
.design-system .ds-metric {
  min-width: 0;
}
.design-system .ds-metric-value {
  margin-top: 6px;
  font: var(--type-ui-metric);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.design-system .ds-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: var(--type-ui-section-title);
}
.design-system .ds-section-icon {
  display: inline-flex;
  color: var(--ds-brand-primary);
}
.design-system .ds-section-icon svg {
  width: 22px;
  height: 22px;
}
.design-system .ds-detail {
  margin-top: 16px;
}
.design-system .ds-key-value-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font: var(--type-ui-dense);
}
.design-system .ds-key-value-list > li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  overflow-wrap: anywhere;
}
.design-system .ds-key-value-list > li > * {
  min-width: 0;
}
.design-system .ds-key-value-list b {
  font-weight: 600;
}

.design-system .ds-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.design-system .ds-banner--success {
  border-inline-start-color: var(--ds-success);
}
.design-system .ds-button:focus-visible {
  outline: 2px solid var(--ds-focus-ring);
  outline-offset: -2px;
  box-shadow: none;
}
.design-system .ds-table {
  overflow-wrap: anywhere;
}
.design-system .ds-table code {
  font: var(--type-ui-code);
}
@media (max-width: 700px) {
  .design-system .ds-surface {
    padding: 16px;
    border-radius: 12px;
  }
  .design-system .ds-metric-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .design-system .ds-table--stacked,
  .design-system .ds-table--stacked tbody,
  .design-system .ds-table--stacked tr,
  .design-system .ds-table--stacked th,
  .design-system .ds-table--stacked td {
    display: block;
    width: 100%;
  }
  .design-system .ds-table--stacked tr {
    padding-block: 10px;
  }
  .design-system .ds-table--stacked th,
  .design-system .ds-table--stacked td {
    border: 0;
    padding: 4px 0;
    text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  .design-system .ds-skeleton > span {
    animation: none;
  }
  .design-system .ds-skeleton-value {
    animation: none;
  }
  .design-system .ds-button {
    transition: none;
  }
  .design-system .ds-button--loading::before {
    animation: none;
  }
  .design-system .ds-button--loading svg {
    animation: none;
  }
}

@media (max-width: 760px) {
  .design-system .ds-skeleton--metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .design-system .ds-skeleton--metrics {
    grid-template-columns: 1fr;
  }
}

.design-system progress {
  width: 100%;
  height: 8px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ds-border);
  accent-color: var(--ds-brand-primary);
}
.design-system progress::-webkit-progress-bar {
  background: var(--ds-border);
  border-radius: inherit;
}
.design-system progress::-webkit-progress-value {
  background: var(--ds-brand-primary);
  border-radius: inherit;
}
.design-system progress::-moz-progress-bar {
  background: var(--ds-brand-primary);
  border-radius: inherit;
}
.design-system button {
  font: var(--type-ui-action);
}

.design-system[data-ds-theme='dark'] { --ds-focus-ring: var(--ds-brand-primary); }
.design-system a:not(.step-tab):not(.pc-nav-link):not(.ds-button), .design-system .ds-button--text { text-decoration-color: var(--ds-link-decoration); text-underline-offset: 3px; }
.design-system .ds-button--text { text-decoration-line: underline; }

/* Status strip shared by the demo product pages and the component catalogue. */
.ds-demo-notice {
  position: fixed;
  z-index: 9998;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--ds-text, #f4f8fa);
  background: var(--ds-surface-raised, #273236);
  box-shadow: var(--ds-shadow, 0 8px 30px rgba(0, 0, 0, .2));
  font: 600 13px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
}
.ds-demo-notice form { margin: 0; }
.ds-demo-notice button {
  border: 0;
  border-radius: 8px;
  background: var(--ds-brand-primary, #2cbdec);
  color: var(--ds-on-brand, #10242c);
  padding: 7px 10px;
  font: 700 12px 'ZCOURSE Segoe UI', 'Segoe UI', sans-serif;
  cursor: pointer;
}
.ds-demo-notice a { color: var(--ds-text, #f4f8fa); text-decoration: underline; text-underline-offset: 2px; }
.ds-demo-notice--preview { position: static; max-width: 100%; width: max-content; }
@media (max-width: 600px) {
  .ds-demo-notice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 5px 10px;
  }
  .ds-demo-notice > span { grid-column: 1 / -1; }
  .ds-demo-notice > form, .ds-demo-notice > button { grid-column: 2; }
  .ds-demo-notice > a { grid-column: 3; white-space: nowrap; }
  .ds-demo-notice:not(.ds-demo-notice--preview) {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    max-width: none;
  }
}
