/*
 * PBB Online Pretest System
 * Readability Layer V2
 * --------------------------------------------------------------------------
 * Purpose:
 * - Increase text readability across User, Admin, Login and Register pages.
 * - Load last so legacy small font rules are normalized in one place.
 * - Preserve intentionally large page titles / hero headings.
 */

html {
  font-size: 18px;
}

body.user-v2,
body.admin-body,
body.login-body,
body.register-page {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   USER APPLICATION
   ========================================================================== */

body.user-v2 {
  font-size: 1rem;
  line-height: 1.52;
}

/* Body copy / helper copy */
body.user-v2 p,
body.user-v2 li,
body.user-v2 dd,
body.user-v2 dt,
body.user-v2 .empty,
body.user-v2 .muted,
body.user-v2 .text-muted,
body.user-v2 .help-text,
body.user-v2 .helper-text,
body.user-v2 .form-help,
body.user-v2 .field-help,
body.user-v2 .description,
body.user-v2 .card-description,
body.user-v2 .section-description,
body.user-v2 [class*="description"],
body.user-v2 [class*="-hint"],
body.user-v2 [class*="-helper"] {
  font-size: .78rem !important;
  line-height: 1.55 !important;
}

/* Small supporting copy */
body.user-v2 small,
body.user-v2 .small,
body.user-v2 [class*="-meta"],
body.user-v2 [class*="-caption"],
body.user-v2 [class*="-subtitle"],
body.user-v2 [class*="-subtext"],
body.user-v2 [class*="-kicker"],
body.user-v2 [class*="-eyebrow"] {
  font-size: .72rem !important;
  line-height: 1.45 !important;
}

/* Forms / controls */
body.user-v2 label,
body.user-v2 legend,
body.user-v2 .form-label,
body.user-v2 .field-label {
  font-size: .76rem !important;
  line-height: 1.4 !important;
  font-weight: 700;
}

body.user-v2 input,
body.user-v2 select,
body.user-v2 textarea,
body.user-v2 button,
body.user-v2 .btn,
body.user-v2 .button {
  font-size: .78rem !important;
}

body.user-v2 input::placeholder,
body.user-v2 textarea::placeholder {
  font-size: .74rem !important;
}

/* Tables */
body.user-v2 table,
body.user-v2 td,
body.user-v2 th,
body.user-v2 .table,
body.user-v2 .table-cell,
body.user-v2 [class*="table-cell"] {
  font-size: .74rem !important;
}

body.user-v2 th,
body.user-v2 .table-head,
body.user-v2 [class*="table-head"] {
  font-size: .72rem !important;
  font-weight: 800 !important;
}

/* Badges / pills / status */
body.user-v2 .badge,
body.user-v2 .pill,
body.user-v2 .chip,
body.user-v2 [class*="-badge"],
body.user-v2 [class*="-pill"],
body.user-v2 [class*="-chip"],
body.user-v2 [class*="-status"] {
  font-size: .68rem !important;
  line-height: 1.25 !important;
}

/* Card and section titles - enlarge only medium/small title text */
body.user-v2 .card h3,
body.user-v2 .card h4,
body.user-v2 .panel h3,
body.user-v2 .panel h4,
body.user-v2 .insight-panel h3,
body.user-v2 .insight-panel h4,
body.user-v2 [class*="-card"] > strong,
body.user-v2 [class*="-card-title"],
body.user-v2 [class*="-section-title"] strong {
  font-size: .86rem !important;
  line-height: 1.4 !important;
}

/* Shared topbar supporting text */
body.user-v2 .topbar-page-name {
  font-size: .70rem !important;
  line-height: 1.18 !important;
}

body.user-v2 .top-user-package,
body.user-v2 .top-user-days,
body.user-v2 .top-user-copy small {
  font-size: .64rem !important;
  line-height: 1.28 !important;
}

/* Desktop tool rail labels / flyout text */
body.user-v2 .tool-rail-flyout,
body.user-v2 .tool-rail-tooltip,
body.user-v2 .tool-rail-label,
body.user-v2 .nav-label {
  font-size: .72rem !important;
}

/* Dashboard / History - the area previously using many sub-0.7rem rules */
body.user-v2.user-page-insights .dashboard-filter-label,
body.user-v2.user-page-insights .dashboard-card-kicker,
body.user-v2.user-page-insights .dashboard-category-copy small,
body.user-v2.user-page-insights .dashboard-category-group-card-copy small,
body.user-v2.user-page-insights .dashboard-popup-subject-copy small,
body.user-v2.user-page-insights .dashboard-modal-inline-copy small,
body.user-v2.user-page-insights .history-table-cell,
body.user-v2.user-page-insights .history-table-answer,
body.user-v2.user-page-insights .history-table-points,
body.user-v2.user-page-insights .history-table-percent,
body.user-v2.user-page-insights .history-table-head {
  font-size: .72rem !important;
}

body.user-v2.user-page-insights .dashboard-category-copy strong,
body.user-v2.user-page-insights .dashboard-category-group-card-copy strong,
body.user-v2.user-page-insights .dashboard-popup-subject-copy strong,
body.user-v2.user-page-insights .history-table-exam strong,
body.user-v2.user-page-insights .dashboard-subject-chart-name {
  font-size: .78rem !important;
}

body.user-v2.user-page-insights .history-table-answer .badge {
  font-size: .64rem !important;
}

body.user-v2.user-page-insights .history-table-points strong,
body.user-v2.user-page-insights .history-table-percent strong,
body.user-v2.user-page-insights .dashboard-subject-chart-row > strong {
  font-size: .78rem !important;
}

/* Catalog / Home / Result / Live / Profile */
body.user-v2.user-page-home .home-card p,
body.user-v2.user-page-catalog .catalog-card p,
body.user-v2.user-page-history .result-card p,
body.user-v2.user-page-live p,
body.user-v2.user-page-profile p {
  font-size: .78rem !important;
}

body.user-v2.user-page-catalog .catalog-card small,
body.user-v2.user-page-history .result-card small,
body.user-v2.user-page-live small,
body.user-v2.user-page-profile small {
  font-size: .72rem !important;
}

/* Exam screen */
body.user-v2.user-page-exam .question-text,
body.user-v2.user-page-take_exam .question-text,
body.user-v2 [class*="question-text"] {
  font-size: .94rem !important;
  line-height: 1.7 !important;
}

body.user-v2 [class*="choice"],
body.user-v2 [class*="answer-option"] {
  font-size: .82rem !important;
  line-height: 1.55 !important;
}

/* ==========================================================================
   ADMIN APPLICATION
   ========================================================================== */

body.admin-body {
  font-size: 1rem;
  line-height: 1.52;
}

body.admin-body p,
body.admin-body li,
body.admin-body dd,
body.admin-body dt,
body.admin-body .muted,
body.admin-body .text-muted,
body.admin-body .description,
body.admin-body [class*="description"],
body.admin-body [class*="-hint"],
body.admin-body [class*="-helper"] {
  font-size: .78rem !important;
  line-height: 1.55 !important;
}

body.admin-body small,
body.admin-body .small,
body.admin-body [class*="-meta"],
body.admin-body [class*="-caption"],
body.admin-body [class*="-subtitle"],
body.admin-body [class*="-subtext"],
body.admin-body [class*="-kicker"],
body.admin-body [class*="-eyebrow"] {
  font-size: .72rem !important;
  line-height: 1.45 !important;
}

body.admin-body label,
body.admin-body legend,
body.admin-body .form-label,
body.admin-body .field-label {
  font-size: .76rem !important;
  line-height: 1.4 !important;
}

body.admin-body input,
body.admin-body select,
body.admin-body textarea,
body.admin-body button,
body.admin-body .btn,
body.admin-body .button {
  font-size: .78rem !important;
}

body.admin-body input::placeholder,
body.admin-body textarea::placeholder {
  font-size: .74rem !important;
}

body.admin-body table,
body.admin-body td,
body.admin-body th,
body.admin-body .table,
body.admin-body [class*="table-cell"] {
  font-size: .74rem !important;
}

body.admin-body th,
body.admin-body [class*="table-head"] {
  font-size: .72rem !important;
  font-weight: 800 !important;
}

body.admin-body .badge,
body.admin-body .pill,
body.admin-body .chip,
body.admin-body [class*="-badge"],
body.admin-body [class*="-pill"],
body.admin-body [class*="-chip"],
body.admin-body [class*="-status"] {
  font-size: .68rem !important;
  line-height: 1.25 !important;
}

body.admin-body .topbar-page-name {
  font-size: .70rem !important;
}

body.admin-body .sidebar,
body.admin-body .admin-tool-rail,
body.admin-body .sidebar-flyout,
body.admin-body .nav-label {
  font-size: .74rem !important;
}

/* Question management / import pages often contain dense small text */
body.admin-body .question-editor,
body.admin-body .question-editor p,
body.admin-body .question-editor label,
body.admin-body .import-preview,
body.admin-body .import-preview td,
body.admin-body .import-preview th {
  font-size: .76rem !important;
}

/* ==========================================================================
   LOGIN
   ========================================================================== */

body.login-body {
  font-size: 16px;
}

body.login-body .login-card p,
body.login-body .login-card label,
body.login-body .login-card .field-label {
  font-size: 14px !important;
  line-height: 1.5 !important;
}

body.login-body .login-card input,
body.login-body .login-card button,
body.login-body .login-card .btn,
body.login-body .login-card a {
  font-size: 15px !important;
}

body.login-body .login-card input::placeholder {
  font-size: 14px !important;
}

body.login-body .login-card small,
body.login-body .login-footer,
body.login-body [class*="login-"][class*="hint"],
body.login-body [class*="login-"][class*="meta"],
body.login-body [class*="login-"][class*="support"] {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* Keep hero title scale; enlarge only supporting hero copy */
body.login-body .login-promo p,
body.login-body .login-promo li,
body.login-body .login-confidence-pill,
body.login-body [class*="feature"] p,
body.login-body [class*="feature"] span {
  font-size: max(14px, .86rem) !important;
  line-height: 1.55 !important;
}

/* ==========================================================================
   REGISTER
   ========================================================================== */

body.register-page {
  font-size: 1rem;
}

body.register-page p,
body.register-page li,
body.register-page .description,
body.register-page [class*="-description"] {
  font-size: .82rem !important;
  line-height: 1.55 !important;
}

body.register-page small,
body.register-page [class*="-meta"],
body.register-page [class*="-hint"],
body.register-page [class*="-caption"] {
  font-size: .74rem !important;
  line-height: 1.45 !important;
}

body.register-page label,
body.register-page .form-label {
  font-size: .78rem !important;
}

body.register-page input,
body.register-page select,
body.register-page textarea,
body.register-page button,
body.register-page .btn {
  font-size: .82rem !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 760px) {
  html {
    font-size: 17px;
  }

  body.user-v2 p,
  body.user-v2 li,
  body.user-v2 label,
  body.user-v2 input,
  body.user-v2 select,
  body.user-v2 textarea,
  body.user-v2 button,
  body.user-v2 .btn,
  body.admin-body p,
  body.admin-body li,
  body.admin-body label,
  body.admin-body input,
  body.admin-body select,
  body.admin-body textarea,
  body.admin-body button,
  body.admin-body .btn {
    font-size: .80rem !important;
  }

  body.user-v2 small,
  body.admin-body small {
    font-size: .74rem !important;
  }

  body.user-v2 table,
  body.user-v2 td,
  body.user-v2 th,
  body.admin-body table,
  body.admin-body td,
  body.admin-body th {
    font-size: .74rem !important;
  }

  body.login-body .login-card label,
  body.login-body .login-card p {
    font-size: 14px !important;
  }

  body.login-body .login-card input,
  body.login-body .login-card button {
    font-size: 15px !important;
  }
}

@media (max-width: 430px) {
  html {
    font-size: 16.5px;
  }

  body.user-v2 .topbar-page-name,
  body.admin-body .topbar-page-name {
    font-size: .68rem !important;
  }

  body.user-v2 .badge,
  body.admin-body .badge {
    font-size: .67rem !important;
  }
}
