/* S24 Kalkulator p-wartości — v1.0.0 */

.s24pv-wrap {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Nagłówek ─────────────────────────────────────────── */
.s24pv-header { text-align: center; margin-bottom: 24px; }
.s24pv-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -.03em;
  color: #0f172a;
  margin: 0 0 8px;
}
.s24pv-subtitle { color: #64748b; font-size: .88rem; margin: 0; line-height: 1.6; }

/* ── Zakładki ─────────────────────────────────────────── */
.s24pv-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 5px;
}
.s24pv-tab {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
  white-space: nowrap;
}
.s24pv-tab:hover { color: #475569; }
.s24pv-tab.active {
  background: #fff;
  color: #6366f1;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ── Panel ────────────────────────────────────────────── */
.s24pv-panel { display: none; animation: s24pv-in .25s ease; }
.s24pv-panel.active { display: block; }
@keyframes s24pv-in {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}
.s24pv-panel-desc {
  font-size: .84rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 3px solid #6366f1;
}

/* ── Formularz ────────────────────────────────────────── */
.s24pv-form {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.s24pv-field { display: flex; flex-direction: column; gap: 5px; }
.s24pv-label {
  font-size: .8rem;
  font-weight: 700;
  color: #374151;
}
.s24pv-input {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  font-size: .95rem;
  font-family: 'Courier New', monospace;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
  box-sizing: border-box;
}
.s24pv-input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.s24pv-input::placeholder { color: #94a3b8; font-family: inherit; }
.s24pv-hint { font-size: .72rem; color: #94a3b8; }

/* Radio */
.s24pv-radio-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.s24pv-radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .84rem;
  color: #475569;
  cursor: pointer;
  font-weight: 500;
}
.s24pv-radio input { accent-color: #6366f1; width: 16px; height: 16px; cursor: pointer; }

/* Przycisk */
.s24pv-btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #2563eb);
  color: #fff;
  font-size: .92rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
  box-shadow: 0 4px 14px rgba(99,102,241,.3);
  align-self: flex-start;
}
.s24pv-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99,102,241,.4);
}
.s24pv-btn:active { transform: translateY(0); }

/* ── Wynik ────────────────────────────────────────────── */
.s24pv-result {
  margin-top: 16px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid;
  animation: s24pv-in .3s ease;
}
.s24pv-result.sig {
  border-color: rgba(16,185,129,.35);
  background: rgba(16,185,129,.04);
}
.s24pv-result.nosig {
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.04);
}
.s24pv-result.error {
  border-color: rgba(239,68,68,.3);
  background: rgba(239,68,68,.04);
}

.s24pv-result-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  flex-wrap: wrap;
}
.s24pv-result-verdict {
  font-size: 1rem;
  font-weight: 800;
  flex: 1;
}
.s24pv-result.sig   .s24pv-result-verdict { color: #059669; }
.s24pv-result.nosig .s24pv-result-verdict { color: #d97706; }
.s24pv-result.error .s24pv-result-verdict { color: #dc2626; }

.s24pv-p-value {
  font-size: 1.6rem;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  color: #0f172a;
}
.s24pv-result.sig   .s24pv-p-value { color: #059669; }
.s24pv-result.nosig .s24pv-p-value { color: #d97706; }

.s24pv-result-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }

.s24pv-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.s24pv-stat-chip {
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .8rem;
  color: #374151;
  font-family: 'Courier New', monospace;
}
.s24pv-stat-chip strong { font-weight: 700; color: #0f172a; }

.s24pv-apa {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 10px 14px;
}
.s24pv-apa-label { font-size: .68rem; color: #6366f1; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.s24pv-apa-text  { font-size: .82rem; color: #4338ca; font-family: 'Courier New', monospace; line-height: 1.5; }

.s24pv-interp {
  font-size: .82rem;
  color: #475569;
  line-height: 1.6;
  padding: 10px 14px;
  background: rgba(0,0,0,.02);
  border-radius: 8px;
}

.s24pv-effect { display: flex; flex-wrap: wrap; gap: 8px; }
.s24pv-effect-item {
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.s24pv-effect-item.current {
  background: #6366f1;
  color: #fff;
}
.s24pv-effect-item.other {
  background: #f1f5f9;
  color: #64748b;
}

/* ── Stopka CTA ───────────────────────────────────────── */
.s24pv-footer-cta {
  margin-top: 28px;
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}
.s24pv-footer-cta p { font-size: .84rem; color: #64748b; margin: 0 0 12px; }
.s24pv-cta-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  background: #6366f1;
  color: #fff;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .15s;
}
.s24pv-cta-btn:hover { background: #4f46e5; color: #fff; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 520px) {
  .s24pv-form { padding: 16px; }
  .s24pv-tab  { font-size: .72rem; padding: 6px 8px; }
  .s24pv-p-value { font-size: 1.3rem; }
}
