/* Shared styles for /training/ pages — Sound Equipment, Music Mixing Test,
   Online Live Sessions Assessment, Admin review.
   Matches the widget's brand aesthetic (iridescent gradient hero, glass cards,
   Archivo Black headings, Inter body). */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #2D2065;
  background: #fafaff;
  overscroll-behavior: none;
}

/* ── Hero (gradient header with brand marks + back link) ──────────────── */
.training-hero {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 180, 200, 0.55), transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(140, 165, 255, 0.65), transparent 55%),
    radial-gradient(circle at 60% 60%, rgba(200, 170, 255, 0.50), transparent 60%),
    linear-gradient(135deg, #a8a5ff 0%, #c4b8ff 40%, #e8b8d8 100%);
  color: #fff;
  /* Safe-area-inset-top so the "Back to Library" button sits BELOW the
     iPhone status bar / notch when the widget is opened as a PWA in
     standalone mode (Olga 2026-06-19 — the back button was overlapping
     the device clock at the top of the screen). Falls back to 28px on
     devices without a notch. Same treatment for left/right insets for
     landscape iOS. */
  padding:
    calc(28px + env(safe-area-inset-top))
    calc(32px + env(safe-area-inset-right))
    48px
    calc(32px + env(safe-area-inset-left));
}
.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  margin: 0 auto 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .15s ease;
}
.hero-back:hover { background: rgba(255, 255, 255, 0.32); }
.hero-back .arrow { font-size: 16px; line-height: 1; }

/* SOMA wordmark — uses the white logo asset (don't recreate in CSS).
   2026-06-19: bumped from 22px → 40px desktop / 32px mobile per Olga
   feedback (was too tiny for brand recognition). */
.hero-brand {
  height: 40px;
  display: inline-flex;
  align-items: center;
  opacity: 0.95;
}
.hero-brand img {
  height: 100%;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(45, 32, 101, 0.30));
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(45, 32, 101, 0.30);
  margin: 0 0 6px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}
.hero-title {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 32px;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(45, 32, 101, 0.40);
  margin: 0;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.hero-subtitle {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(45, 32, 101, 0.30);
  margin: 12px auto 0;
  max-width: 920px;
}

/* ── Content card (white, sits below hero, contains the body copy) ───── */
.training-content {
  max-width: 920px;
  margin: -24px auto 64px;
  padding: 0 20px;
}
.content-card {
  background: #fff;
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow: 0 14px 50px rgba(45, 32, 101, 0.12);
  font-size: 15.5px;
  line-height: 1.75;
  color: #2D2065;
}
.content-card h2 {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 22px;
  margin: 32px 0 12px;
  color: #2D2065;
  letter-spacing: -0.01em;
}
.content-card h2:first-child { margin-top: 0; }
.content-card h3 {
  font-family: 'Archivo Black', system-ui, sans-serif;
  font-size: 17px;
  margin: 24px 0 8px;
  color: #2D2065;
}
.content-card p { margin: 0 0 14px; }
.content-card a { color: #5B4DC9; font-weight: 600; }
.content-card a:hover { text-decoration: none; }
.content-card ol, .content-card ul { padding-left: 22px; margin: 0 0 18px; }
.content-card li { margin-bottom: 8px; }
.content-card strong { font-weight: 700; color: #2D2065; }

/* Callouts — for "Important things to remember" type blocks */
.callout {
  background: linear-gradient(135deg, #F4ECFC, #FBF8FE);
  border-left: 4px solid #6A2FA5;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 24px 0;
}
.callout h3 {
  margin-top: 0;
  color: #5B4DC9;
}

/* Download button (PDF, attachments) */
.download-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #F4ECFC;
  border: 1px solid #E8DCF7;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 22px 0;
  text-decoration: none;
  color: #2D2065;
  transition: background .15s, transform .1s;
}
.download-card:hover { background: #E8DCF7; }
.download-card:active { transform: scale(0.99); }
.download-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #6A2FA5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.download-meta {
  flex: 1;
  min-width: 0;
}
.download-title {
  font-weight: 700;
  font-size: 15px;
  color: #2D2065;
  margin: 0 0 2px;
}
.download-sub {
  font-size: 12.5px;
  color: #6F6691;
  margin: 0;
}

/* Equipment grid (Sound Equipment Guide) */
.equipment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 24px 0 8px;
}
.equipment-col {
  background: #FBF8FE;
  border: 1px solid #ECE6F4;
  border-radius: 14px;
  padding: 20px 22px;
}
.equipment-col h3 { margin-top: 0; }
.equipment-col ul { margin: 0; padding-left: 18px; }
.equipment-col .or-divider {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #948BAE;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 10px 0;
}
.equipment-image {
  width: 100%;
  border-radius: 14px;
  margin: 18px 0 6px;
  display: block;
  box-shadow: 0 6px 18px rgba(45, 32, 101, 0.10);
}

@media (max-width: 700px) {
  .training-hero {
    padding:
      calc(22px + env(safe-area-inset-top))
      calc(18px + env(safe-area-inset-right))
      40px
      calc(18px + env(safe-area-inset-left));
  }
  .hero-title { font-size: 26px; }
  .hero-brand { height: 32px; }
  .training-content { padding: 0 14px; margin-top: -18px; }
  .content-card { padding: 26px 22px; font-size: 15px; }
  .equipment-grid { grid-template-columns: 1fr; }
}

/* Branded Sound Equipment Guide infographic — replaces the text grid. */
.equipment-figure {
  margin: 24px 0 28px;
  background: #FBF8FE;
  border: 1px solid #ECE6F4;
  border-radius: 16px;
  padding: 12px;
  overflow: hidden;
}
.equipment-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ── Submission form (used by Mixing Test + Live Sessions) ──────────── */
.submission-block {
  background: linear-gradient(135deg, #F4ECFC 0%, #FBF8FE 100%);
  border-radius: 16px;
  padding: 28px 28px;
  margin: 32px 0 0;
}
.submission-block h2 {
  margin-top: 0;
  font-size: 20px;
}
.submission-block p { color: #5F5685; }

.form-group { margin: 18px 0 14px; }
.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6F6691;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid #E8DCF7;
  background: #fff;
  color: #2D2065;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s;
}
.form-input:focus {
  outline: none;
  border-color: #6A2FA5;
}
.form-input.has-error {
  border-color: #D63A8A;
  background: rgba(214, 58, 138, 0.06);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  border: none;
  background: #6A2FA5;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
  margin-top: 8px;
}
.btn-primary:hover { background: #5B2491; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.helper-text {
  font-size: 12.5px;
  color: #948BAE;
  margin: 8px 0 0;
}

/* Status pill — Pending / Approved / Needs revision */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.status-pill.pending {
  background: #FEF3C7;
  color: #92400E;
}
.status-pill.approved {
  background: #DCFCE7;
  color: #166534;
}
.status-pill.needs-revision {
  background: #FCE7F3;
  color: #9F1239;
}

/* Inline notification (success after submit, etc.) */
.inline-notice {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 6px 18px rgba(45, 32, 101, 0.10);
}
.inline-notice .notice-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.inline-notice.success .notice-icon { background: #16A34A; }
.inline-notice.error .notice-icon { background: #D63A8A; }
.inline-notice.info .notice-icon { background: #5B4DC9; }
.notice-text-primary { font-weight: 600; color: #2D2065; margin: 0; }
.notice-text-secondary { font-size: 13.5px; color: #5F5685; margin: 4px 0 0; }
