/*
   Site-wide typography floor: minimum 12px on all screens and routes.
   Component-specific styles and heading hierarchy are preserved.
*/
:root {
    --app-font-floor: 12px;
    --app-body-font-size: 12px;
    --app-control-font-size: 12px;
    --app-secondary-font-size: 12px;
    --app-label-font-size: 12px;
    --app-caption-font-size: 12px;
}

/* Keep the site's original root sizing so rem-based spacing and controls do not shrink. */

body { font-size: 12px; }

/* Consistent minimum for normal text, metadata, forms, nav, buttons and tables. */
body :where(
    p, span, a, li, td, th, label, input, select, textarea, button,
    small, strong, em, b, i, time, summary, legend, dt, dd, figcaption,
    kbd, code, pre, blockquote, caption, option,
    .text-muted, .form-text, .form-label, .field-note, .helper-text, .meta,
    .metadata, .description, .subtitle, .nav-link, .sidebar-link, .topbar,
    .btn, .badge, .form-control, .form-select, .dropdown-item, .breadcrumb,
    .breadcrumb-item, .pagination, .page-link, .table, .table th, .table td,
    .card-text, .card-header, .card-footer, .modal-body, .modal-header,
    .modal-footer, .toast, .toast-body, .alert, .list-group-item,
    .progress-label, .stat-label, .chart-label, .notification-title,
    .notification-message, .task-title, .task-description, .project-title
) {
    font-size: max(12px, 1em);
}

/* Explicit floor for compact typography used in UI components. */
body :where(
    small, kbd, .text-muted, .form-text, .form-label, .field-note,
    .helper-text, .meta, .metadata, .subtitle, .badge, .btn, button,
    input, select, textarea, label, .nav-link, .sidebar-link,
    .dropdown-item, .table, .table th, .table td, .form-control,
    .form-select, .breadcrumb, .breadcrumb-item, .page-link
) {
    font-size: max(12px, 1em) !important;
}

/* Preserve the established Task Review readability. */
.admin-review-page .review-card-head p,
.admin-review-page .review-hero p,
.admin-review-page .review-grid strong,
.admin-review-page .review-scenario p,
.admin-review-page .review-repository a,
.admin-review-page .section-heading p,
.admin-review-page .pending-payment-card h3,
.admin-review-page .pending-payment-card > strong,
.admin-review-page .pending-pay-btn,
.admin-review-page .review-actions .btn,
.admin-review-page .review-hero span,
.admin-review-page .review-card-head span,
.admin-review-page .review-scenario > span,
.admin-review-page .review-repository > span,
.admin-review-page .review-grid span,
.admin-review-page .section-heading > div > span,
.admin-review-page .pending-payment-card > div > span,
#allReviewsModal .all-review-item-main .review-task-id,
#allReviewsModal .all-review-item-main strong,
#allReviewsModal .all-review-item-main > small,
#allReviewsModal .all-review-item-meta,
#allReviewsModal .all-review-item-meta > span,
#allReviewsModal .all-review-item-meta > span > small,
#allReviewsModal .scenario-open-btn-small,
#allReviewsModal .all-review-repo,
#allReviewsModal .all-review-action,
#allReviewsModal .all-review-toolbar input,
#allReviewsModal .all-review-toolbar select {
    font-size: max(12px, 1em) !important;
}

.admin-notification-panel,
.admin-notification-list {
    font-size: 12px !important;
}

.admin-notification-panel .admin-notification-panel-header strong,
.admin-notification-panel .admin-notification-panel-header h1,
.admin-notification-panel .admin-notification-panel-header h2,
.admin-notification-panel .admin-notification-panel-header h3 {
    font-size: max(12px, 1em) !important;
}

/* Badges must remain readable in both admin and user interfaces. */
.admin-review-page .badge,
.admin-dashboard .badge,
.admin-users .badge,
.admin-tasks .badge,
.admin-projects .badge,
.user-dashboard .badge,
.user-profile .badge,
.user-tasks .badge {
    font-size: max(12px, 1em) !important;
}

/* Keep the 12px floor on narrow/mobile layouts too. */
@media (max-width: 767.98px) {
    :root {
        --app-body-font-size: 12px;
        --app-control-font-size: 12px;
        --app-secondary-font-size: 12px;
        --app-label-font-size: 12px;
        --app-caption-font-size: 12px;
    }

    body,
    body input,
    body select,
    body textarea,
    body button,
    body label,
    body small {
        font-size: max(12px, 1em);
    }
}


/*
   Final site-wide typography setting: 13.5px text across Admin and User pages.
   Preserve root sizing, component dimensions, spacing and layout.
*/
:is(#__typography_lock__, body),
:is(#__typography_lock__, body) * {
    font-size: 13.5px !important;
}
