/* PLAYER.ID pre-launch convergence. Authenticated workspaces only. */

/* Phase I-B3: Parent is the visual reference; only canonical token adoption. */
.parent-dashboard-only #parentDashboardPanel.pid-parent-shell {
  font-family: var(--pid-font-family);
  font-size: var(--pid-text-body);
  line-height: var(--pid-leading-body);
}
.parent-dashboard-only .pid-parent-canvas > .pid-parent-content { gap: var(--pid-section-gap); }
.parent-dashboard-only :is(.pid-eyebrow, .parent-section-heading small) {
  font-size: var(--pid-text-xs);
  line-height: var(--pid-leading-ui);
}
.parent-dashboard-only .pid-content-card .parent-section-heading h4 {
  font-size: var(--pid-text-section);
  line-height: var(--pid-leading-tight);
}

/* Phase I-B4: Developer-only typography and rhythm. Academy mode is excluded. */
#adminPanel:not(.academy-workspace-shell) {
  font-family: var(--pid-font-family);
  font-size: var(--pid-text-body);
  line-height: var(--pid-leading-body);
}
#adminPanel:not(.academy-workspace-shell) :is(.admin-dashboard-head, .admin-pane) {
  gap: var(--pid-section-gap);
}
#adminPanel:not(.academy-workspace-shell) :is(.admin-dashboard-head, .dashboard-section-head, .pane-heading) .eyebrow {
  font-size: var(--pid-text-xs);
  line-height: var(--pid-leading-ui);
}
#adminPanel:not(.academy-workspace-shell) :is(.admin-dashboard-head h2, .admin-dashboard-head .title) {
  font-size: var(--pid-text-page) !important;
  line-height: var(--pid-leading-tight) !important;
}
#adminPanel:not(.academy-workspace-shell) :is(.dashboard-section-head h3, .admin-pane h2, .admin-pane > .title) {
  font-size: var(--pid-text-section) !important;
  line-height: var(--pid-leading-tight) !important;
}
#adminPanel:not(.academy-workspace-shell) :is(.dashboard-metric-card small, .admin-stat-card small, label, .dashboard-list-row small) {
  font-size: var(--pid-text-sm);
  line-height: var(--pid-leading-ui);
}
#adminPanel:not(.academy-workspace-shell) :is(.dashboard-metric-card span, .dashboard-list-row, .progress-empty, .admin-pane p) {
  font-size: var(--pid-text-body);
  line-height: var(--pid-leading-body);
}
#adminPanel:not(.academy-workspace-shell) :is(.dashboard-overview-grid, .admin-stat-grid, .dashboard-list) {
  gap: var(--pid-space-3) !important;
}
#adminPanel:not(.academy-workspace-shell) :is(.dashboard-welcome-card, .dashboard-activity-card, .dashboard-management-card, .admin-pane > .card) {
  padding: var(--pid-space-6) !important;
}

@media (max-width: 768px) {
  #adminPanel:not(.academy-workspace-shell) :is(.admin-dashboard-head h2, .admin-dashboard-head .title) {
    font-size: 1.625rem !important;
  }
  #adminPanel:not(.academy-workspace-shell) :is(.dashboard-welcome-card, .dashboard-activity-card, .dashboard-management-card, .admin-pane > .card) {
    padding: var(--pid-space-4) !important;
  }
}

/* Phase I-E/F: safe responsive containment and accessible interaction states. */
@media (max-width: 480px) {
  :is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel)
    :is(.grid, [class*="-grid"], [class*="-row"], [class*="-controls"], [class*="-filters"]) {
    min-width: 0;
    max-width: 100%;
  }
  :is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel)
    :is(input, select, textarea, button, .btn, .pid-btn) {
    max-width: 100%;
  }
  .pid-coach-workspace :is(.pid-coach-report-controls, .pid-coach-selector-heading),
  #coachDevelopmentPage .pid-development-controls,
  #adminPanel:not(.academy-workspace-shell) :is(.admin-tabs, .mini-actions) {
    align-items: stretch;
    flex-wrap: wrap;
  }
}

@media (max-width: 400px) {
  #matchAssessmentPage.pid-coach-tournament {
    width: calc(100% - (2 * var(--pid-page-gutter-mobile)));
    margin-block: var(--pid-space-4) var(--pid-space-7);
  }
  .pid-coach-workspace :is(.pid-coach-report-search, .pid-coach-report-search input),
  #coachDevelopmentPage :is(.pid-development-search, .pid-development-search input) {
    width: 100%;
  }
}

@media (max-width: 375px) {
  .parent-dashboard-only .pid-parent-canvas > .pid-parent-content,
  .pid-coach-workspace .pid-app-content,
  #coachDevelopmentPage,
  #adminPanel:not(.academy-workspace-shell) > .admin-pane {
    padding-inline: var(--pid-space-3) !important;
  }
}

/* Phase I-C: related component language without changing semantic jobs. */
:is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
  :is(button, .btn, .pid-btn, input, select, textarea) {
  font-family: var(--pid-font-family);
}
:is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
  :is(button, .btn, .pid-btn) {
  line-height: var(--pid-leading-ui);
}
:is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
  :is(input, select, textarea) {
  font-size: var(--pid-text-body);
  line-height: var(--pid-leading-ui);
}
:is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
  :is(button, .btn, .pid-btn, input, select, textarea):focus-visible {
  outline: 0;
  box-shadow: var(--pid-focus-ring);
}
:is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
  :is(button, .btn, .pid-btn, input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: .58;
}
:is(.parent-dashboard-only, .pid-coach-workspace, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
  :is(.status, .pid-badge, [class*="-badge"]) {
  font-size: var(--pid-text-xs);
  line-height: var(--pid-leading-ui);
}
:is(.parent-dashboard-only, .pid-coach-workspace, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
  :is(.progress-empty, .dashboard-empty, .pid-empty-state, [class*="-empty"]) {
  font-size: var(--pid-text-body);
  line-height: var(--pid-leading-body);
}

/* Phase I-D: shared shell rhythm; role-specific navigation remains intact. */
.parent-dashboard-only .pid-parent-canvas > .pid-parent-content,
.pid-coach-workspace .pid-app-content,
#coachDevelopmentPage,
#adminPanel:not(.academy-workspace-shell) > .admin-pane {
  min-width: 0;
}
.parent-dashboard-only .pid-parent-canvas > .pid-parent-content,
#adminPanel:not(.academy-workspace-shell) > .admin-pane {
  padding-inline: var(--pid-page-gutter-desktop) !important;
}
:is(.parent-dashboard-only .pid-sidebar-nav, .pid-coach-workspace .pid-app-nav, #adminPanel:not(.academy-workspace-shell) .admin-tabs)
  :is(a, button) {
  font-size: var(--pid-text-body);
  line-height: var(--pid-leading-ui);
}

@media (max-width: 768px) {
  .parent-dashboard-only .pid-parent-canvas > .pid-parent-content,
  #adminPanel:not(.academy-workspace-shell) > .admin-pane {
    padding-inline: var(--pid-page-gutter-mobile) !important;
  }
  :is(.parent-dashboard-only, .pid-coach-workspace, #matchAssessmentPage.pid-coach-tournament, #coachDevelopmentPage, #adminPanel:not(.academy-workspace-shell))
    :is(button, .btn, .pid-btn, [role="button"]) {
    min-height: var(--pid-touch-target-min);
  }
}
