/* Medihelp Evaluation custom styles */

body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* Evaluation matrix (public form) */
.eval-matrix-wrap { max-width: 100%; overflow-x: auto; }
.eval-matrix th, .eval-matrix td { vertical-align: middle; }
.eval-q-col { width: 130px; min-width: 130px; max-width: 130px; }
.eval-q-title {
  width: 130px; max-width: 130px;
  white-space: normal;
  word-break: break-word;
  font-size: .85rem;
  line-height: 1.3;
}
.eval-matrix .eval-sticky-col {
  position: sticky; left: 0; z-index: 2; min-width: 160px; white-space: normal;
  border-right: 2px solid #dee2e6;
}
.eval-matrix thead .eval-sticky-col { z-index: 3; }
.eval-counter { min-height: 1.2em; }

@media (max-width: 576px) {
  .eval-matrix .eval-sticky-col {
    min-width: 25vw !important;
    width: 25vw !important;
    max-width: 25vw !important;
    font-size: .78rem;
    word-break: break-word;
    white-space: normal;
  }
  .eval-matrix select { min-width: 90px; font-size: .78rem; }
}

.scroll-hint {
  font-size: .85rem; color: #6c757d; text-align: center; margin-bottom: .5rem;
}

/* ── Custom eval dropdown ─────────────────────────────── */
.eval-dropdown { position: relative; width: 100%; }

.eval-dd-btn {
  width: 100%; padding: .3rem .5rem;
  background: #fff; border: 1.5px solid #ced4da; border-radius: .375rem;
  font-size: .85rem; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .15s;
}
.eval-dd-btn:hover  { border-color: #86b7fe; }
.eval-dd-btn.selected { border-color: #0d6efd; background: #f0f5ff; font-weight: 600; }
.eval-dd-btn.invalid  { border-color: #dc3545 !important; background: #fff5f5; }

.eval-dd-menu {
  display: none; position: fixed;
  min-width: 180px; width: max-content;
  background: #fff; border: 1px solid #dee2e6; border-radius: .375rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); z-index: 1055; overflow: hidden;
}
.eval-dd-menu.open { display: block; }

.eval-dd-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem; font-size: .88rem; cursor: pointer;
  transition: background .1s;
}
.eval-dd-item:hover { background: #f0f5ff; }

/* Available — green check */
.eval-dd-item.avail .eval-dd-icon::before { content: '✓'; color: #198754; font-weight: 700; }
.eval-dd-item.avail { color: #198754; }

/* Unavailable — red cross, not clickable */
.eval-dd-item.unavail .eval-dd-icon::before { content: '✗'; color: #dc3545; font-weight: 700; }
.eval-dd-item.unavail { color: #adb5bd; cursor: not-allowed; }

/* Remaining count badge */
.eval-dd-remain {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 600;
  padding: .1rem .35rem;
  border-radius: .25rem;
  min-width: 3rem;
  text-align: center;
}
.eval-dd-item.avail   .eval-dd-remain { background: #d1e7dd; color: #0a3622; }
.eval-dd-item.unavail .eval-dd-remain { background: #f8d7da; color: #58151c; }

/* Clear selection row */
.eval-dd-clear {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem; font-size: .85rem; cursor: pointer;
  color: #dc3545; border-bottom: 1px solid #dee2e6;
}
.eval-dd-clear:hover { background: #fff5f5; }

/* Selected — blue highlight */
.eval-dd-item.chosen { background: #0d6efd; color: #fff; }
.eval-dd-item.chosen .eval-dd-icon::before { content: '✓'; color: #fff; font-weight: 700; }
.eval-dd-item.chosen:hover { background: #0b5ed7; }

/* Form builder token buttons */
.token-btns .btn { margin: 0 .25rem .25rem 0; }

/* Login card */
.login-card { max-width: 420px; margin: 6rem auto; }

/* Links table copy button */
.link-copy { cursor: pointer; }
