@font-face {
  font-family: 'Playball';
  font-style: normal;
  font-weight: 400;
  src: local('Playball'), local('Playball-Regular'), url(../fonts/playball-regular.woff2) format('woff2'), url(../fonts/playball-regular.woff) format('woff');
}

@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  src: local('Merriweather'), url(../fonts/merriweather.woff2) format('woff2'), url(../fonts/merriweather.woff) format('woff');
}

/* Global spacing variables */
:root {
  /* Aumentado para dar mais respiro visual entre conteúdo e rodapé */
  --footer-margin-top: 64px; /* ~4rem em base 16px */
}

/* Evidentia Review base */

/* --- Legacy global structure (scoped) ---------------------------------- */
.ui-legacy html, .ui-legacy body {
  height: 100%;
}

.ui-legacy body {
  color: var(--color-text);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

a { color: var(--link-color); }
a:hover, a:focus { color: var(--link-hover-color); }

/* Accessible focus outlines (H04 groundwork) */
:where(a, button, [role="button"], input, select, textarea, summary, .btn):focus-visible {
  outline: 3px solid var(--focus-outline-color, #1a73e8);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.35);
}

/* Remove default focus outline only if custom visible style applied */
:where(a, button, [role="button"], input, select, textarea, summary, .btn):focus {
  outline: none; /* fallback suppressed; rely on focus-visible above */
}

/* High contrast mode support */
@media (forced-colors: active) {
  :where(a, button, [role="button"], input, select, textarea, summary, .btn):focus-visible {
    outline: 2px solid Highlight;
    box-shadow: none;
  }
}

/* Utility: visually hidden (if not already defined elsewhere) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Brand utilities */
.bg-brand-soft { background-color: var(--color-bg-soft); }
.text-secondary { color: var(--color-text-secondary); }

.ui-legacy .wrapper {
  position: relative;
  min-height: 100%;
  height: auto !important;
  height: 100%;
  margin: 0 auto -50px;
}

.ui-legacy .push {
  height: 50px;
}

.ui-legacy header .navbar {
  margin-bottom: 0;
  border-radius: 0;
}

.ui-legacy header .navbar .username-divider {
  display: inline-block;
  border-right: 1px solid #ccc;
  height: 20px;
  margin: 15px 10px 0 10px; /* vertically center within 50px navbar */
  vertical-align: middle;
}

/* Keep top navigation items aligned vertically */
.ui-legacy header .navbar .nav > li > a,
.ui-legacy header .navbar .navbar-brand {
  line-height: 20px;
}

/* Align language selector form inside navbar when used as a nav item */
.ui-legacy header .navbar .nav > li > form.navbar-form {
  padding-top: 8px;
  padding-bottom: 8px;
  margin: 0 10px;
}

/* Ensure small control height matches navbar rhythm */
.ui-legacy header .navbar .nav > li > form.navbar-form .form-control.input-sm {
  height: 30px;
  padding-top: 5px;
  padding-bottom: 5px;
}

/* Normalize navbar buttons (e.g., logout) */
.ui-legacy header .navbar .navbar-btn {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Slight tweak to icon vertical position */
.ui-legacy header .navbar .nav > li > a .glyphicon,
.ui-legacy header .navbar .nav > li > a i.bi {
  position: relative;
  top: 2px;
}

.ui-legacy .masthead {
  background-color: #fafafa;
  border-bottom: 1px solid #e7e7e7;
  text-align: center;
  color: #777;
  padding: 70px 0;
}

.ui-legacy .masthead h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-family: 'Merriweather', serif;
  font-size: 42px;
}

.ui-legacy .masthead p {
  margin: 0;
  font-size: 18px;
  font-weight: 300;
}

.ui-legacy main {
  margin-top: 20px;
}

.ui-legacy footer {
  border-top: 1px solid #E7E7E7;
  height: 50px;
  background-color: #fff;
  /* Espaço extra para afastar o rodapé do conteúdo principal */
  margin-top: var(--footer-margin-top, 48px); /* ajuste se precisar mais/menos espaço */
}

/* Footer genérico quando incluído fora do escopo .ui-legacy */
footer.site-footer {
  border-top: 1px solid #E7E7E7;
  background-color: #fff;
  margin-top: var(--footer-margin-top, 48px);
  min-height: 50px;
}

/* Ajuste responsivo: em telas muito pequenas reduzir o espaço superior */
@media (max-width: 576px) {
  /* Em telas pequenas, ligeiramente menor mas ainda com boa separação */
  :root { --footer-margin-top: 44px; }
}

/* App layout (ui-v2) – account for fixed navbar */
body.ui-v2 {
  padding-top: 64px;
}

/* Fallback: if body is missing the ui-v2 class in some deployments, still reserve space for fixed navbar */
body[data-page-layout="app"]:not(.ui-v2) {
  padding-top: 64px;
}

@media (max-width: 767.98px) {
  body.ui-v2 {
    padding-top: 56px;
  }
  body[data-page-layout="app"]:not(.ui-v2) {
    padding-top: 56px;
  }
}

.ui-legacy footer .legal {
  padding-top: 14px;
}
/* Workbench: make mini summary (Fleiss κ · Conflitos) smaller next to the title */
#wb-toggle-host [data-role="wb-mini-summary"],
.wb-mini-summary {
  font-size: 0.8rem;
}

.ui-legacy footer ul li {
  display: inline;
  margin-right: 15px;
}

.ui-legacy footer .social {
  padding-top: 10px;
  font-size: 20px;
  text-align: right;
}

.ui-legacy footer .social a {
  color: #777;
  margin-left: 10px;
  transition: all 0.2s ease 0s;
}

.ui-legacy footer .social a:hover {
  color: #333;
}

.ui-legacy article {
  font-size: 16px;
  margin-bottom: 20px;
}

.ui-legacy article .table, .ui-legacy article .alert {
  font-size: 14px;
}

.ui-legacy .references {
  font-size: 14px;
}

.ui-legacy .no-scroll {
  overflow: hidden;
}

.ui-legacy .page-loading {
  top: 0;
  left: 0;
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: none;
}

.ui-legacy .page-loading .spinner {
  width: 70px;
  top: 50%;
  left: 50%;
  margin-top: -9px;
  margin-left: -35px;
  position: fixed;
  text-align: center;
  z-index: 9001;
}

.ui-legacy .page-loading .spinner > div {
  width: 18px;
  height: 18px;
  background-color: rgba(0, 0, 0, .3);
  border-radius: 100%;
  display: inline-block;
  -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
  animation: bouncedelay 1.4s infinite ease-in-out;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

/* -------------------------------------------------------------
   CSP-safe helpers used by Conducting/Planning/Reporting screens
   (avoid inline styles)
   ------------------------------------------------------------- */

/* Ensure dynamic selection content keeps minimum height */
.min-h-200 { min-height: 200px; }

/* Make horizontal scrolling safe for wide tables inside wrappers */
.source-tab-content-wrapper { overflow-x: auto; }
.source-tab-content-wrapper table { width: 100%; }

/* Sticky detail panels for QA and Data Extraction (similar to protocol sidebar) */
#qa-detail .qa-assessment-card,
#data-extraction-detail .data-extraction-panel {
  position: sticky;
  top: 80px; /* below fixed navbar */
}

.ui-legacy .page-loading .spinner .bounce1 {
  -webkit-animation-delay: -0.32s;
  animation-delay: -0.32s;
}

.ui-legacy .page-loading .spinner .bounce2 {
  -webkit-animation-delay: -0.16s;
  animation-delay: -0.16s;
}

@-webkit-keyframes bouncedelay {
  0%, 80%, 100% { -webkit-transform: scale(0.0) }
  40% { -webkit-transform: scale(1.0) }
}

@keyframes bouncedelay {
  0%, 80%, 100% {
    transform: scale(0.0);
    -webkit-transform: scale(0.0);
  } 40% {
    transform: scale(1.0);
    -webkit-transform: scale(1.0);
  }
}

.ui-legacy .block-spinner {
  width: 40px;
  height: 40px;
  margin-left: auto;
  margin-right: auto;
  background-color: #333;
  border-radius: 100%;
  -webkit-animation: scaleout 1.0s infinite ease-in-out;
  animation: scaleout 1.0s infinite ease-in-out;
}

@-webkit-keyframes scaleout {
  0% { -webkit-transform: scale(0.0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

@keyframes scaleout {
  0% {
    transform: scale(0.0);
    -webkit-transform: scale(0.0);
  } 100% {
    transform: scale(1.0);
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

.ui-legacy .spin {
  -webkit-animation: spin 2s infinite linear;
  animation: spin 2s infinite linear;
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
@keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}

.ui-legacy .not-allowed {
  cursor: not-allowed;
}

.ui-legacy #library-documents {
  font-size: 12px;
  margin-bottom: 0;
}

.ui-legacy #library-documents .bg-warning:hover {
  background-color: #fcf8e3;
}

.ui-legacy div.list-group a.list-group-item.active {
  background-color: transparent;
  color: #555;
  border-color: #ddd;
  border-left: 2px solid #df5e00;
  padding-left: 13px;
  cursor: default;
}

.ui-legacy #library-toolbar .dropdown-menu {
  font-size: 12px;
}

.ui-legacy #library-documents tbody tr td.empty-library {
  background-color: #f5f5f5;
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: center;
}

.ui-legacy #library-documents tbody tr td.empty-library > .glyphicon,
.ui-legacy #library-documents tbody tr td.empty-library > i.bi {
  color: #aaa;
  font-size: 28px;
}

.ui-legacy a.library-documents-indexes,
.ui-legacy a.library-documents-indexes:hover,
.ui-legacy a.library-documents-indexes:active  {
  color: #333;
}

/* Evidentia Review cover */

.ui-legacy .cover {
  padding-top: 60px;
  padding-bottom: 80px;
}

.ui-legacy .cover h1 {
  font-size: 64px;
  margin-bottom: 30px;
}

.ui-legacy section.features {
  background-color: #e7e7e7;
  text-align: center;
}

.ui-legacy section.features article {
  padding: 20px 0;
  border-bottom: 1px solid #f8f8f8;
}

.ui-legacy section.features article:last-child {
  border-bottom: none;
}

.ui-legacy section.features article span.glyphicon,
.ui-legacy section.features article i.bi {
  font-size: 44px;
  /* Increased contrast color (WCAG AA on #e7e7e7 background) */
  color: #666;
  margin: 10px 0;
}

/* Evidentia Review reviews app */

/* Token-based button colors (non-breaking overrides) */
.ui-legacy .btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.ui-legacy .btn-primary:hover, .ui-legacy .btn-primary:focus {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
.ui-legacy .btn-success {
  background-color: var(--color-success);
  border-color: var(--color-success);
}
.ui-legacy .btn-success:hover, .ui-legacy .btn-success:focus {
  background-color: #255d29;
  border-color: #255d29;
}
.ui-legacy .btn-danger {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
}
.ui-legacy .btn-danger:hover, .ui-legacy .btn-danger:focus {
  background-color: #a31f1f;
  border-color: #a31f1f;
}

/* Inputs focus */
.ui-legacy .form-control:focus {
  border-color: var(--focus-outline-color);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* Navbar theming to brand */
.ui-legacy .navbar-default .navbar-brand,
.ui-legacy .navbar-default .navbar-nav>li>a { color: var(--color-primary); }
.ui-legacy .navbar-default .navbar-brand:hover,
.ui-legacy .navbar-default .navbar-nav>li>a:hover,
.ui-legacy .navbar-default .navbar-nav>li>a:focus { color: var(--color-primary-hover); }
.ui-legacy .navbar-default .navbar-nav>.active>a,
.ui-legacy .navbar-default .navbar-nav>.active>a:hover,
.ui-legacy .navbar-default .navbar-nav>.active>a:focus {
  color: var(--color-primary);
  background-color: var(--color-bg-soft);
}

/* Legacy panel heading rule removed */

/* Alerts contrast */
.ui-legacy .alert-info { background-color: #e8f0ff; color: #1b3a7a; border-color: #cdddfd; }
.ui-legacy .alert-success { background-color: #e7f3ea; color: #1b5e20; border-color: #c9e8d0; }
.ui-legacy .alert-danger { background-color: #fdecea; color: #7f1d1d; border-color: #f5c2c0; }

/* Badges/labels */
.ui-legacy .label-primary, .ui-legacy .badge-primary { background-color: var(--color-primary); }
.ui-legacy .label-default, .ui-legacy .badge { background-color: #6b7280; }

/* Tabs active state contrast */
.ui-legacy .nav-tabs>li.active>a, .ui-legacy .nav-tabs>li.active>a:focus, .ui-legacy .nav-tabs>li.active>a:hover {
  color: var(--color-primary);
  background-color: var(--color-bg-soft);
  border-color: #e6ecff #e6ecff transparent;
}

/* Review header icons spacing */
.ui-legacy .review-menu .glyphicon,
.ui-legacy .review-menu i.bi { margin-right: 4px; }

.ui-legacy .review-title {
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.42857;
}

.ui-legacy .review-title span.text-muted {
  font-weight: normal;
}

.ui-legacy .review-title-user {
  font-weight: 300;
}

.ui-legacy ul.review-menu {
  width: 100%;
  margin: 0;
  margin-bottom: 20px;
  padding: 0;
  border: 1px solid #C2C2C2;
  background: #F5F5F5;
  border-radius: 5px;
  background: -moz-linear-gradient(top, #F5F5F5 0%, #D9D9D9 100%);
  background: -webkit-linear-gradient(top, #F5F5F5 0%, #D9D9D9 100%);
  background: -o-linear-gradient(top, #F5F5F5 0%, #D9D9D9 100%);
  font-size: 0;
}

.ui-legacy ul.review-menu li {
  display: inline-block;
  list-style: none;
  padding: 0;
  font-size: 14px;
  border-bottom: 3px solid #CCCCCC;
  border-right: 1px solid #C2C2C2;
}

.ui-legacy ul.review-menu li:first-child {
  border-bottom-left-radius: 5px;
}

.ui-legacy ul.review-menu li a {
  display: block;
  padding: .8em 1.6em;
  font-weight: 600;
  color: #3A3D40;
}

.ui-legacy ul.review-menu li a:hover {
  text-decoration: none;
}

.ui-legacy ul.review-menu li:first-child {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.ui-legacy ul.review-menu li:hover {
  background: #F5F5F5;
}

.ui-legacy ul.review-menu li.active {
  background: #F5F5F5;
  color: #666B71;
  border-bottom: 3px solid #AC4539;
}

.ui-legacy #protocol.affix-top {
  position: relative;
}

.ui-legacy #protocol.affix {
  top: 20px;
}

.ui-legacy #protocol.affix,
.ui-legacy #protocol.affix-bottom {
  width: 213px;
}

.ui-legacy #protocol.affix-bottom {
  position: absolute;
}

@media (min-width:992px) {
  .ui-legacy #protocol.affix,
  .ui-legacy #protocol.affix-bottom {
    width: 293px;
  }
}

@media (min-width:1200px) {
  .ui-legacy #protocol.affix,
  .ui-legacy #protocol.affix-bottom {
    width: 263px;
  }
}

#tbl-quality td.answer {
  cursor: pointer;
  text-align: center;
  width: 100px;
  transition: all 0.2s ease 0s;
}

#tbl-quality td.answer:hover {
  background-color: #f5f5f5;
}

#tbl-quality td.selected-answer {
  background-color: #337ab7!important;
  color: #fff;
}

/* Remote search container (card-based) */
.ui-legacy #remote-search-panels .remote-search-body {
  max-height: 400px;
  overflow-y: auto;
}

.ui-legacy #remote-search-panels .remote-search-body .table {
  font-size: 12px;
}

.ui-legacy .btn-ajax-loading, .ui-legacy .btn-ajax-error, .ui-legacy .btn-ajax-complete {
  display: none;
}

/* Spacing adjustments */
.ui-legacy .data-extraction-panel .form-row:last-child {
  margin-bottom: 0;
}

/* Bootstrap overrides */

.ui-legacy .navbar-default .navbar-brand {
  font-family: 'Playball', cursive;
  font-weight: 400;
  font-size: 2.4em;
}

/* Page heading adjustments */
.ui-legacy .page-heading-adjust {
  margin-top: 0;
}

.ui-legacy .nav-tabs {
  margin-bottom: 20px;
}

.ui-legacy .table-hover tbody tr td {
  cursor: pointer;
}

/* Bootstrap extension */

.ui-legacy table.table-v-align-middle thead tr th,
.ui-legacy table.table-v-align-middle tbody tr td {
  vertical-align: middle;
}

/* Table sorter overrides */
.ui-legacy th.header {
  cursor: pointer;
}

.ui-legacy th.header:after {
  font-family: "Glyphicons Halflings";
  float: right;
  content: "\e150";
  font-weight: 300;
}

.ui-legacy th.headerSortDown:after {
  font-family: "Glyphicons Halflings";
  float: right;
  content: "\e155";
  font-weight: 300;
}

.ui-legacy th.headerSortUp:after {
  font-family: "Glyphicons Halflings";
  float: right;
  content: "\e156";
  font-weight: 300;
}

/* Table sorter indicators (New UI) */
.ui-v2 th.header {
  cursor: pointer;
  user-select: none;
}

.ui-v2 th .sort-indicator {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.45;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.ui-v2 th .sort-indicator.active {
  opacity: 1;
  color: var(--color-primary, #1f4f7b);
}

.ui-v2 th .sort-indicator.asc {
  transform: translateY(-1px);
}

.ui-v2 th .sort-indicator.desc {
  transform: translateY(1px);
}

/* Fallback pseudo-element arrows (shown only if no inline indicator was injected) */
.ui-v2 th.header:not(.has-indicator)::after {
  content: "↕";
  display: inline-block;
  font-size: 0.7rem;
  margin-left: 0.4rem;
  opacity: 0.45;
}

.ui-v2 th.headerSortUp:not(.has-indicator)::after {
  content: "▲";
  color: var(--color-primary, #1f4f7b);
  opacity: 1;
}

.ui-v2 th.headerSortDown:not(.has-indicator)::after {
  content: "▼";
  color: var(--color-primary, #1f4f7b);
  opacity: 1;
}

.ui-legacy select optgroup {
  font-family: inherit;
  font-size: inherit;
  margin-left: 4px;
}

.ui-legacy .announcement {
  background-color: #fcf8e3;
  border-top: 1px solid #faebcc;
  border-bottom: 1px solid #faebcc;
  color: #8a6d3b;
  padding: 10px;
}
.avatar-100 { width: 100px; height: 100px; }
.avatar-90 { width: 90px; height: 90px; }
.w-200 { width: 200px; }
.w-180 { width: 180px; }
.w-150 { width: 150px; }
.w-70 { width: 70px; }
.minw-220 { min-width: 220px; }
.overflow-x-auto { overflow-x: auto; }
.pos-relative { position: relative; }
.h-240 { height: 240px; }
.h-280 { height: 280px; }
.w-35 { width: 35px; }
.w-45 { width: 45px; }
.w-300 { width: 300px; }
.w-240 { width: 240px; }
.w-250 { width: 250px; }
.w-40p { width: 40%; }
.mt--6 { margin-top: -6px; }
/* Height utilities for images/icons (CSP-friendly, no inline style) */
.h-22 { height: 22px; }
.h-28 { height: 28px; }
.h-56 { height: 56px; }
/* Width constraints */
.max-w-16rem { max-width: 16rem; }

/* PRISMA Flow diagram sizing: constrain width for readability */
#prisma-flow-diagram {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
#prisma-flow-diagram svg {
  width: 100% !important;
  height: auto !important;
}
