/* Tripa de sumário - filtro de estudo (matéria → sub → tema) */

.pnv-st-search-wrap,
.training-refine-search-wrap {
  display: block;
  width: 100%;
}

.pnv-st-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.pnv-st-search:focus {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  outline-offset: 1px;
  border-color: rgba(13, 148, 136, 0.55);
}

.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;
}

.pnv-st-chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 4px;
  padding: 4px 2px;
}

.pnv-st-chips[hidden] {
  display: none !important;
}

.pnv-st-summary__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}

.pnv-st-summary__row--nav {
  justify-content: flex-end;
}

.pnv-st-summary__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  flex-shrink: 0;
}

.pnv-st-summary__count {
  font-size: 11px;
  font-weight: 700;
  color: #4338ca;
  line-height: 1.3;
}

.pnv-st-summary__clear,
.pnv-st-summary__collapse {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 2px 0;
  cursor: pointer;
  border-radius: 4px;
}

.pnv-st-summary__collapse {
  color: #4338ca;
  text-decoration: none;
  background: rgba(99, 102, 241, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

.pnv-st-summary__clear:hover,
.pnv-st-summary__collapse:hover {
  color: #3730a3;
}

.pnv-st-summary__collapse:hover {
  background: rgba(99, 102, 241, 0.14);
}

.pnv-st-summary__hint {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

.pnv-st-summary__hint--sel {
  font-weight: 500;
  color: #94a3b8;
}

.pnv-st {
  width: 100%;
  max-height: min(42vh, 260px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: #fff;
  padding: 4px 0;
  box-sizing: border-box;
}

.pnv-st--banca {
  max-height: none;
}

.pnv-st-empty {
  margin: 0;
  padding: 14px 10px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.pnv-st-empty--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 72px;
  color: #475569;
  font-weight: 600;
}

.pnv-st-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: pnv-st-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes pnv-st-spin {
  to {
    transform: rotate(360deg);
  }
}

.pnv-st-hint {
  padding: 6px 10px 6px 28px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.pnv-st-children {
  padding-left: 12px;
}

.pnv-st-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 2px 8px 2px 4px;
}

.pnv-st-row:hover {
  background: rgba(241, 245, 249, 0.9);
}

.pnv-st-row[aria-selected="true"] .pnv-st-name {
  color: #3730a3;
}

.pnv-st-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #6366f1;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  touch-action: manipulation;
}

.pnv-st-chevron:hover {
  background: rgba(99, 102, 241, 0.1);
}

.pnv-st-spacer {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.pnv-st-name {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  color: #334155;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1.3;
  touch-action: manipulation;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnv-st-name:hover {
  color: #4338ca;
}

.pnv-st-name--leaf {
  cursor: default;
  font-weight: 600;
  color: #475569;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pnv-st-name--pick {
  cursor: pointer;
}

.pnv-st-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  cursor: pointer;
}

.pnv-st-mark input[type="checkbox"],
.pnv-st-mark input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #6366f1;
  cursor: pointer;
}

.pnv-st-row--hit .pnv-st-name,
.pnv-st-row--hit .pnv-st-name--leaf {
  color: #4338ca;
  font-weight: 800;
}

@media (max-width: 640px) {
  .pnv-st:not(.pnv-st--banca) {
    max-height: min(48vh, 280px);
  }

  .pnv-st-row {
    min-height: 38px;
  }

  .pnv-st-chevron,
  .pnv-st-spacer {
    width: 32px;
    height: 32px;
  }

  .pnv-st-mark {
    width: 36px;
    height: 36px;
  }
}
