/* Styles for Interactive 209-Variant 27-Exon & 4-Structure Cryo-EM Coordinate Atlas Explorer (/cf/cftr/) */

.atlas-search-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

.atlas-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  color: #f1f5f9;
  font-size: 0.86rem;
  box-sizing: border-box;
}

.atlas-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.atlas-select {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  color: #f1f5f9;
  font-size: 0.86rem;
  cursor: pointer;
}

.atlas-svg-dom-rect {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
}

.atlas-dom-lasso { fill: rgba(148, 163, 184, 0.28); }
.atlas-dom-tmd1 { fill: rgba(56, 189, 248, 0.25); }
.atlas-dom-nbd1 { fill: rgba(244, 63, 94, 0.28); }
.atlas-dom-r { fill: rgba(168, 85, 247, 0.24); }
.atlas-dom-tmd2 { fill: rgba(20, 184, 166, 0.25); }
.atlas-dom-nbd2 { fill: rgba(245, 158, 11, 0.26); }

.atlas-svg-dom-text {
  fill: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  pointer-events: none;
}

.atlas-svg-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.atlas-svg-idr-line {
  stroke: rgba(168, 85, 247, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.atlas-svg-f508-line {
  stroke: rgba(244, 63, 94, 0.65);
  stroke-width: 1.5;
  stroke-dasharray: 2 2;
}

.atlas-svg-f508-label {
  fill: #fda4af;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.atlas-svg-axis-text {
  fill: #94a3b8;
  font-size: 10px;
  font-family: var(--font-mono, monospace);
}

.atlas-svg-node {
  cursor: pointer;
  outline: none;
}

.atlas-svg-dot-placed {
  fill: #38bdf8;
  stroke: #0b1120;
  stroke-width: 1;
  opacity: 0.85;
  transition: r 0.15s ease, opacity 0.15s ease;
}

.atlas-svg-dot-unplaced {
  fill: #c084fc;
  stroke: #0b1120;
  stroke-width: 1;
  opacity: 0.9;
}

.atlas-svg-dot-splice {
  fill: #fbbf24;
  stroke: #0b1120;
  stroke-width: 1;
  opacity: 0.95;
}

.atlas-svg-splice-ring {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 1.5;
  opacity: 0.85;
}

.atlas-svg-node:hover circle,
.atlas-svg-node:focus-visible circle,
.atlas-svg-node.selected circle {
  opacity: 1;
  stroke: #ffffff;
  stroke-width: 1.8;
}

.atlas-svg-selected-label {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  paint-order: stroke;
  stroke: #050505;
  stroke-width: 3px;
}

.atlas-svg-caption {
  fill: #94a3b8;
  font-size: 10.5px;
  font-family: var(--font-mono, monospace);
}

.atlas-jump-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.85rem 0 1.15rem;
}

.atlas-jump-btn {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.5rem 1.05rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.atlas-jump-btn:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #ffffff;
}

.atlas-legend-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: #cbd5e1;
  font-family: var(--font-mono, monospace);
}

.atlas-legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.atlas-legend-dot.dot-placed { background: #38bdf8; }
.atlas-legend-dot.dot-splice { background: #fbbf24; }
.atlas-legend-dot.dot-unplaced { background: #c084fc; }

.atlas-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  margin-bottom: 1rem;
}

.atlas-variants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.atlas-variants-table th {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.atlas-variants-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-family: var(--font-mono, monospace);
}

.atlas-table-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.atlas-table-row:hover {
  background: rgba(56, 189, 248, 0.08);
}

.atlas-table-row.active {
  background: rgba(56, 189, 248, 0.18);
}

.atlas-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 1rem;
}
/* Curative Equity Census Styles (T-0437) */
.equity-table-btn {
  background: transparent;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 4px;
  color: #38bdf8;
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  min-height: 32px;
}
.equity-table-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #ffffff;
}
.equity-table-empty {
  text-align: center;
  padding: 1.5rem !important;
  color: #94a3b8;
  font-style: italic;
}


@media (max-width: 768px) {
  .atlas-search-row {
    grid-template-columns: 1fr;
  }
}


/* Organoid FIS Explorer Styles (T-0442) */
.fis-controls-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.5rem;
  margin: 1.25rem auto;
  align-items: start;
}
.fis-variants-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fis-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  display: block;
}
.fis-slider-group {
  background: var(--surface-2, rgba(15, 23, 42, 0.6));
  border: 1px solid var(--border-color, rgba(56, 189, 248, 0.2));
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.fis-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.fis-slider-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.05rem;
  font-weight: 700;
  color: #38bdf8;
}
.fis-slider {
  width: 100%;
  accent-color: #38bdf8;
  cursor: pointer;
}
.fis-slider-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.25rem;
}
.fis-visual-panel {
  background: var(--surface-2, rgba(15, 23, 42, 0.6));
  border: 1px solid var(--border-color, rgba(56, 189, 248, 0.2));
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fis-panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #f1f5f9;
}
.fis-svg-wrapper {
  margin: 0.5rem auto;
}
.fis-svg-bg {
  fill: rgba(30, 41, 59, 0.7);
  stroke: rgba(148, 163, 184, 0.2);
  stroke-width: 1;
}
.fis-svg-epithelium {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2.5;
  stroke-dasharray: 4 2;
}
.fis-svg-lumen {
  fill: rgba(56, 189, 248, 0.25);
  stroke: #0284c7;
  stroke-width: 2;
  transition: r 0.2s ease-out;
}
.fis-svg-text {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  fill: #e2e8f0;
  pointer-events: none;
}
.fis-svg-caption {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.5rem 0 0;
  line-height: 1.35;
}
.fis-readouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem auto;
}
.fis-readout-card {
  background: var(--surface-2, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-color, rgba(56, 189, 248, 0.2));
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.fis-card-highlight {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.05);
}
.fis-card-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fis-card-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}
.fis-card-sub {
  font-size: 0.75rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}
.fis-delta-green {
  color: #4ade80 !important;
}
.fis-tier-badge {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.tier-high {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.tier-moderate {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.tier-low {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
}
.tier-nonresponsive {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
}
.fis-guidance-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 4px solid #38bdf8;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.25rem auto;
}
.fis-guidance-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #38bdf8;
  margin: 0 0 0.4rem;
}
.fis-guidance-text {
  font-size: 0.88rem;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.45;
}
@media (max-width: 860px) {
  .fis-controls-grid {
    grid-template-columns: 1fr;
  }
}

/* Styles for Interactive CFTR TMD POPC Bilayer Insertion & Trikafta Allosteric Remodeling Simulator (#tmd-insertion-explorer) */
#tmd-insertion-explorer {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.tmd-header {
  margin-bottom: 1.25rem;
}

.tmd-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0.5rem 0 0.4rem;
  line-height: 1.3;
}

.tmd-plain {
  font-size: 0.94rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0.5rem 0;
}

.tmd-sub {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #94a3b8;
  margin: 0.25rem 0 0;
}

.tmd-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  margin: 1.25rem auto;
  padding: 1rem 1.2rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.tmd-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tmd-control-group label {
  font-size: 0.82rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.tmd-control-group label span.val {
  color: #38bdf8;
  font-weight: 600;
}

.tmd-slider {
  width: 100%;
  accent-color: #38bdf8;
  cursor: pointer;
}

.tmd-select {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  color: #f1f5f9;
  font-size: 0.84rem;
  cursor: pointer;
}

.tmd-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tmd-presets-label {
  font-size: 0.82rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

.tmd-preset-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #bae6fd;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tmd-preset-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.tmd-stage-box {
  position: relative;
  margin: 1.25rem auto;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: #090d16;
}

.tmd-stage-box svg {
  display: block;
  width: 100%;
  height: auto;
}

.tmd-stage-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0.4rem 0.6rem;
  background: rgba(15, 23, 42, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tmd-readouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1.25rem auto;
}

.tmd-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tmd-card-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tmd-card-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}

.tmd-card-sub {
  font-size: 0.76rem;
  color: #64748b;
  font-family: var(--font-mono, monospace);
}

.tmd-status-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.2rem;
}

.badge-curative {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-subthreshold {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.tmd-variant-status {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.status-rescued {
  color: #4ade80;
}

.status-degraded {
  color: #f87171;
}

@media (max-width: 860px) {
  .tmd-controls-grid {
    grid-template-columns: 1fr;
  }
  .tmd-readouts-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .tmd-readouts-grid {
    grid-template-columns: 1fr;
  }
}
