/* main_one_sample_test.css — One-Sample Hypothesis Testing Lab */

:root {
  --ost-primary: var(--primary, #2563eb);
  --ost-accent: #06b6d4;
  --ost-success: #10b981;
  --ost-warning: #f59e0b;
  --ost-danger: #ef4444;
  --ost-bg-card: var(--card-bg, #ffffff);
  --ost-border: var(--border-color, #e2e8f0);
}

/* Big Data Mode Banner */
.big-data-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.12) 100%);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--border-radius-lg, 12px);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.08);
  transition: all 0.3s ease;
}

.big-data-banner.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(239, 68, 68, 0.12) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.big-data-info h3 {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color, #1e293b);
}

.big-data-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  line-height: 1.45;
}

.big-data-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

/* Segmented Control / Tab Switcher */
.test-type-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.test-tab-btn {
  border: none;
  background: transparent;
  padding: 0.6rem 1.4rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: #475569;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.test-tab-btn:hover {
  color: #1e293b;
}

.test-tab-btn.active {
  background: #ffffff;
  color: var(--ost-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Control Grid */
.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.control-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-field .field-hint {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: normal;
}

.control-field input[type="number"],
.control-field select {
  padding: 0.6rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.control-field input[type="number"]:focus,
.control-field select:focus {
  outline: none;
  border-color: var(--ost-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.slider-with-number {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-with-number input[type="range"] {
  flex: 1;
}

.slider-with-number input[type="number"] {
  width: 90px;
}

/* Hypothesis Direction Selector */
.direction-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.direction-btn {
  padding: 0.55rem 0.5rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
  transition: all 0.2s;
}

.direction-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.direction-btn.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--ost-primary);
  color: var(--ost-primary);
}

/* Visual Distribution Plot Canvas */
.dist-plot-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dist-plot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.dist-plot-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.dist-svg-wrapper {
  width: 100%;
  height: 280px;
  position: relative;
}

.dist-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.plot-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Stat Cards & Results Summary */
.stat-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.stat-metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-metric-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.35rem 0 0.15rem 0;
  letter-spacing: -0.02em;
}

.stat-metric-subtext {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Decision Verdict Banner */
.verdict-banner {
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.verdict-banner.reject {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.verdict-banner.fail-to-reject {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.verdict-banner.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.verdict-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.verdict-text h4 {
  margin: 0 0 0.3rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.verdict-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.5;
}

/* Practical vs Statistical Warning Callout */
.effect-size-callout {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.5;
}

.effect-size-callout strong {
  color: #78350f;
}

/* Upload & Scenario Dropzones */
.data-source-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.source-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: #475569;
}

.source-tab-btn.active {
  background: var(--ost-primary);
  color: #ffffff;
  border-color: var(--ost-primary);
}

.dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}

.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--ost-primary);
  background: rgba(37, 99, 235, 0.04);
}

/* Import Receipt */
.import-receipt {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #166534;
}

/* Responsive */
@media (max-width: 768px) {
  .big-data-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .dist-svg-wrapper {
    height: 220px;
  }
}
