/* ================================
   IQ FORM — dwa bloki obok siebie
   ================================ */

.iq-form {
  width: 100%;
}

.iq-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

/* karta bloku — BEZ hovera, BEZ cienia */
.iq-block-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: none;
  cursor: default;
}

.iq-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
}

/* ================================
   IQ CHIPS
   ================================ */

.iq-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.iq-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: white;
  cursor: pointer;
  transition: background 0.13s ease, border-color 0.13s ease;
  user-select: none;
}

.iq-chip:hover {
  border-color: var(--accent, #1976d2);
  background: #eef3ff;
}

.iq-chip:active {
  transform: scale(0.97);
}

.iq-chip.active {
  background: var(--accent, #1976d2);
  border-color: var(--accent, #1976d2);
}

.iq-chip-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  transition: color 0.13s;
}

.iq-chip.active .iq-chip-label {
  color: white;
  font-weight: 600;
}

.iq-chip-sub {
  font-size: 11px;
  color: #9ca3af;
  transition: color 0.13s;
}

.iq-chip.active .iq-chip-sub {
  color: rgba(255,255,255,0.65);
}

/* ================================
   CHECKBOXY
   ================================ */

.iq-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.iq-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: white;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: background 0.13s ease, border-color 0.13s ease;
  user-select: none;
}

.iq-check-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent, #1976d2);
  cursor: pointer;
  flex-shrink: 0;
}

.iq-check-row:hover {
  border-color: var(--accent, #1976d2);
  background: #eef3ff;
}

.iq-check-row.active {
  background: color-mix(in srgb, var(--accent, #1976d2) 10%, white);
  border-color: var(--accent, #1976d2);
  color: #1e3a6e;
  font-weight: 500;
}

/* ================================
   WYNIK
   ================================ */

.iq-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 7px;
}

.iq-result:empty { display: none; }
.iq-result.ok    { background: #e8f5e9; color: #2e7d32; }
.iq-result.error { background: #fdecea; color: #c62828; }
.iq-result.warn  { background: #fff8e1; color: #8a6500; }

/* ================================
   WRAPPER — BEZ cienia
   ================================ */

.diff-card.iq-block {
  padding: 18px 20px;
  background: white;
  border-radius: 14px;
  border: 1px solid #e7ebf3;
  box-shadow: none;
  margin-bottom: 12px;
}

/* nagłówek sekcji diff */
.diff-clinical-block h3,
#diff-medium > h3 {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 14px 0;
}

#diff-medium,
#diff-low {
  margin-top: 18px;
}

/* ================================
   OVERRIDE — brak hovera na bloku
   iq-block (wyższy priorytet)
   ================================ */

.diff-card.iq-block,
.diff-card.iq-block:hover {
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
}

/* ================================
   CURSOR FIX
   ================================ */

.diff-card.iq-block,
.iq-block-card,
.iq-form,
.iq-two-col {
  cursor: default;
}

.iq-chip {
  cursor: pointer;
}

.iq-check-row,
.iq-check-row input[type="checkbox"] {
  cursor: pointer;
}

/* ================================
   CHILD CARDS — wyszarzone domyślnie
   ================================ */

.diff-card.child {
  opacity: 0.38;
  filter: grayscale(0.4);
  transition: opacity 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.diff-card.child.dim-unlocked {
  opacity: 1;
  filter: none;
  cursor: pointer;
  pointer-events: auto;
}

.diff-card.child.active {
  opacity: 1;
  filter: none;
  border: 2px solid var(--accent, #1976d2);
  background: color-mix(in srgb, var(--accent, #1976d2) 6%, white);
  box-shadow: 0 4px 14px rgba(25,118,210,0.15);
}


/* ================================
   GŁĘBOKIE / CIĘŻKIE — BLOK (uproszczony)
   ================================ */

.deep-id-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deep-id-note {
  font-size: 12.5px;
  color: #7a5c00;
  background: #fff8e1;
  border: 1.5px solid #ffe082;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.deep-id-criteria {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* każde kryterium — jeden wiersz: label | TAK | NIE */
.deep-crit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: default;
}

.deep-crit-label {
  flex: 1;
  font-size: 13px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.deep-crit-optional {
  font-size: 10px;
  background: #f3f4f6;
  color: #9ca3af;
  border-radius: 5px;
  padding: 1px 6px;
  font-weight: 600;
}

.deep-crit-btns {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.deep-btn {
  width: 52px;
  padding: 5px 0;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  background: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.deep-btn.yes:hover  { border-color: #4caf50; background: #f1f8f2; color: #2e7d32; }
.deep-btn.no:hover   { border-color: #ef5350; background: #fdf3f3; color: #c62828; }
.deep-btn.yes.active { background: #4caf50; border-color: #4caf50; color: white; }
.deep-btn.no.active  { background: #ef5350; border-color: #ef5350; color: white; }

.deep-id-result {
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 13px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.deep-id-result:empty { display: none; }
.deep-id-result.ok    { background: #e8f5e9; color: #2e7d32; }
.deep-id-result.warn  { background: #fff8e1; color: #8a6500; }

/* deep ID header */
.deep-id-header-title {
  margin-bottom: 2px;
}
.deep-id-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.deep-id-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 3px;
}

.deep-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}

/* ================================
   CLOSE BUTTON NA BLOKACH
   ================================ */

.diff-block-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  z-index: 2;
  padding: 0;
}

.diff-block-close:hover {
  background: rgba(0,0,0,0.06);
  color: #374151;
}


.deep-crit-tooltip {
  font-size: 12px;
  opacity: 0.5;
  cursor: help;
  margin-left: 4px;
  transition: opacity 0.15s;
}

.deep-crit-tooltip:hover {
  opacity: 1;
}

/* subtitle pod tytułem bloku */
.iq-block-sub {
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.45;
  margin-top: -4px;
}

/* ikona tooltip w checkboxach */
.iq-tooltip-icon {
  font-size: 11px;
  opacity: 0.4;
  cursor: help;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.iq-tooltip-icon:hover {
  opacity: 1;
}

/* żeby label zajmował całą szerokość z ikoną po prawej */
.iq-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
