/* ErgScreen shared report surfaces v42.
   Canonical report-family hero treatment. Report-specific body styles remain
   in their owning templates during this visual-preservation cleanup pass. */

:is(
  .movement-analysis-view-hero,
  .stroke-evidence-view-hero,
  .session-details-view-hero,
  .athlete-profile-view-hero,
  .coach-brief-view-hero,
  .coach-next-step-view-hero,
  .coach-profile-view-hero
) {
  position: relative !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 20px !important;
  min-height: auto !important;
  margin: 0 0 18px !important;
  padding: clamp(30px, 4.4vw, 48px) !important;
  border: 0 !important;
  border-radius: 34px !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 90% 8%, rgba(20,184,166,.34), transparent 31%),
    radial-gradient(circle at 8% 96%, rgba(49,95,159,.20), transparent 30%),
    linear-gradient(135deg, #050b20 0%, #071331 58%, #064657 100%) !important;
  box-shadow: 0 34px 90px rgba(7,19,49,.22) !important;
}

:is(
  .movement-analysis-view-hero,
  .stroke-evidence-view-hero,
  .session-details-view-hero,
  .athlete-profile-view-hero,
  .coach-brief-view-hero,
  .coach-next-step-view-hero,
  .coach-profile-view-hero
)::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.042) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.030) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5,11,32,.74), rgba(5,11,32,.13) 60%, rgba(6,70,87,.10));
  background-size: 46px 46px, 46px 46px, auto;
  pointer-events: none;
}

:is(
  .movement-analysis-view-hero,
  .stroke-evidence-view-hero,
  .session-details-view-hero,
  .athlete-profile-view-hero,
  .coach-brief-view-hero,
  .coach-next-step-view-hero,
  .coach-profile-view-hero
) > * {
  position: relative !important;
  z-index: 1 !important;
}

:is(
  .movement-analysis-view-hero,
  .stroke-evidence-view-hero,
  .session-details-view-hero,
  .athlete-profile-view-hero,
  .coach-brief-view-hero,
  .coach-next-step-view-hero,
  .coach-profile-view-hero
) .eyebrow {
  margin: 0 0 8px !important;
  color: #60f0e8 !important;
}

:is(
  .movement-analysis-view-hero,
  .stroke-evidence-view-hero,
  .session-details-view-hero,
  .athlete-profile-view-hero,
  .coach-brief-view-hero,
  .coach-next-step-view-hero,
  .coach-profile-view-hero
) h1 {
  max-width: 980px !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: clamp(2.75rem, 6.2vw, 5.65rem) !important;
  line-height: .88 !important;
  letter-spacing: -.078em !important;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(0,0,0,.24);
}

@media (max-width: 1050px) {
  :is(
    .movement-analysis-view-hero,
    .stroke-evidence-view-hero,
    .session-details-view-hero,
    .athlete-profile-view-hero,
    .coach-brief-view-hero,
    .coach-next-step-view-hero,
    .coach-profile-view-hero
  ) {
    grid-template-columns: 1fr !important;
    align-items: start !important;
  }
}

@media (max-width: 720px) {
  :is(
    .movement-analysis-view-hero,
    .stroke-evidence-view-hero,
    .session-details-view-hero,
    .athlete-profile-view-hero,
    .coach-brief-view-hero,
    .coach-next-step-view-hero,
    .coach-profile-view-hero
  ) {
    padding: clamp(24px, 8vw, 34px) !important;
    border-radius: 28px !important;
  }

  :is(
    .movement-analysis-view-hero,
    .stroke-evidence-view-hero,
    .session-details-view-hero,
    .athlete-profile-view-hero,
    .coach-brief-view-hero,
    .coach-next-step-view-hero,
    .coach-profile-view-hero
  ) h1 {
    font-size: clamp(2.25rem, 14vw, 3.4rem) !important;
  }
}

/* Shared report navigation and export surfaces v43. */

/* --- ErgScreen report viewer navigation hierarchy v1 --- */
.report-view-utility-actions {
  margin: 0;
  align-self: end;
  justify-content: flex-end;
}

.report-view-back-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--teal, #007a80);
  border-color: rgba(203, 213, 225, 0.92);
}

.report-surface-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -6px 0 22px;
  padding: 12px 14px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(8px);
}

.report-surface-tabs-label,
.report-card-toolbar-label {
  display: block;
  margin: 0;
  color: var(--muted, #64748b);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.report-surface-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.report-surface-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 999px;
  background: #ffffff;
  color: var(--teal, #007a80);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.report-surface-tab:hover {
  transform: translateY(-1px);
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.report-surface-tab-active {
  background: var(--navy, #071331);
  border-color: var(--navy, #071331);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(7, 19, 49, 0.18);
}

.report-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.report-card-toolbar h2 {
  margin: 3px 0 0;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  letter-spacing: -0.035em;
}

.report-card-pdf-button {
  flex: 0 0 auto;
  background: #ffffff;
  color: var(--teal, #007a80);
  border-color: rgba(203, 213, 225, 0.92);
}

.coach-brief-vm-card .report-card-toolbar {
  margin-bottom: 18px;
}

.stroke-evidence-vm-card .report-card-toolbar {
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .report-view-utility-actions {
    justify-content: flex-start;
  }

  .report-surface-tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .report-surface-tab-row {
    justify-content: flex-start;
  }

  .report-card-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-card-pdf-button {
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .report-view-utility-actions,
  .report-surface-tab-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .report-view-utility-actions .button,
  .report-surface-tab,
  .report-card-pdf-button {
    width: 100%;
  }
}
/* --- End ErgScreen report viewer navigation hierarchy v1 --- */

/* --- ErgScreen unified report shell alignment v6 --- */
.report-download-card {
  margin-top: 0;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-color: rgba(203, 213, 225, 0.78);
  background:
    radial-gradient(circle at 88% 0%, rgba(15, 139, 141, 0.055), transparent 30%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(7, 19, 49, 0.055);
}

.report-download-card .report-card-toolbar {
  margin: 0;
}

.report-download-copy {
  margin: 2px 0 0;
  color: var(--muted2, #475569);
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 800;
}

.group-read-download-card {
  margin-bottom: 18px;
}

.group-read-page-hero .group-read-utility-actions {
  align-items: center;
  justify-content: flex-end;
}

.group-read-page-hero .report-view-back-button {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(203, 213, 225, 0.84) !important;
  color: var(--teal, #007a80) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.055) !important;
}

/* The download action now lives in the standard report download bubble. */
.group-read-pdf-button {
  background: initial;
}

.movement-analysis-download-card {
  margin-bottom: 18px;
}

@media print {
  .report-download-card {
    display: none !important;
  }
}
/* --- End ErgScreen unified report shell alignment v6 --- */
