/* Scoped styles for genetic-condition-lookup (prefix: gcl-) */

.gcl-main-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text, #1f2937);
}

.gcl-hero {
  margin-bottom: 2rem;
  text-align: center;
}

.gcl-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.gcl-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 780px;
  margin: 0 auto 1.25rem auto;
  line-height: 1.5;
}

.gcl-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 0.85rem 1.2rem;
  border-radius: 6px;
  text-align: left;
  max-width: 820px;
  margin: 0 auto 2rem auto;
}

.gcl-disclaimer-icon {
  font-size: 1.3rem;
  color: #b45309;
  line-height: 1;
  flex-shrink: 0;
}

.gcl-disclaimer-text {
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.45;
}

/* Simulator Section */
.gcl-sim-section {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.gcl-sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.gcl-sim-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.gcl-sim-toggle {
  font-size: 0.825rem;
  padding: 0.4rem 0.8rem;
}

.gcl-sim-body {
  display: block;
}

.gcl-sim-desc {
  color: #64748b;
  font-size: 0.925rem;
  margin-bottom: 1.25rem;
}

.gcl-sim-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  background-color: #f8fafc;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid #edf2f7;
}

.gcl-sim-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gcl-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
}

.gcl-select, .gcl-input {
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gcl-select:focus, .gcl-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.gcl-sim-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .gcl-sim-results-grid {
    grid-template-columns: 1fr;
  }
}

.gcl-punnett-container, .gcl-prob-container {
  display: block;
}

.gcl-subheading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.gcl-punnett-grid {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: 4px;
  background-color: #cbd5e1;
  padding: 4px;
  border-radius: 8px;
  text-align: center;
}

.gcl-p-cell {
  background-color: #ffffff;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
}

.gcl-p-header {
  background-color: #f1f5f9;
  font-size: 0.85rem;
  color: #475569;
}

.gcl-p-col-header, .gcl-p-row-header {
  background-color: #f8fafc;
  color: #334155;
}

.gcl-p-val {
  font-size: 1.15rem;
}

.gcl-p-sub {
  font-size: 0.72rem;
  font-weight: normal;
  display: block;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gcl-res-unaffected {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.gcl-res-carrier {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.gcl-res-affected {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.gcl-prob-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gcl-prob-card {
  padding: 1rem 0.75rem;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gcl-prob-affected {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.gcl-prob-carrier {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.gcl-prob-unaffected {
  background-color: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.gcl-prob-percent {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.gcl-prob-name {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.gcl-prob-desc {
  font-size: 0.72rem;
  opacity: 0.85;
}

.gcl-sim-note {
  font-size: 0.825rem;
  color: #64748b;
  background-color: #f8fafc;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  border-left: 3px solid #94a3b8;
}

/* Ad Slots */
.gcl-ad-slot {
  min-height: 280px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
}

/* Catalog Section */
.gcl-catalog-section {
  margin-bottom: 2.5rem;
}

.gcl-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gcl-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.gcl-section-sub {
  color: #64748b;
  font-size: 0.925rem;
  margin: 0;
}

.gcl-count-badge {
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
  background-color: #f1f5f9;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

.gcl-filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.gcl-search-wrapper {
  width: 100%;
}

.gcl-search-wrapper input {
  width: 100%;
}

.gcl-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.gcl-filter-selects {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.gcl-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 180px;
}

.gcl-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.gcl-quick-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.gcl-quick-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: #64748b;
}

.gcl-chip {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
}

.gcl-chip:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.gcl-chip-active {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* Conditions Grid */
.gcl-conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.gcl-condition-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
}

.gcl-condition-card:hover, .gcl-condition-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  border-color: #93c5fd;
  outline: none;
}

.gcl-card-header {
  margin-bottom: 0.75rem;
}

.gcl-card-title-wrap {
  display: block;
}

.gcl-condition-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
}

.gcl-gene-badge {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.gcl-locus {
  color: #64748b;
  font-size: 0.8rem;
}

.gcl-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.gcl-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.gcl-tag-pattern {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.gcl-tag-system {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.gcl-card-summary {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 0.85rem 0;
  flex-grow: 1;
}

.gcl-card-quick-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.gcl-meta-label {
  font-weight: 600;
  color: #334155;
}

.gcl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.gcl-btn-secondary {
  background-color: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.gcl-btn-secondary:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.gcl-btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
}

.gcl-view-btn {
  width: 100%;
}

.gcl-no-results {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
}

/* Modal View */
.gcl-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.gcl-modal-content {
  background-color: #ffffff;
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.gcl-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background-color: #f8fafc;
}

.gcl-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.gcl-modal-subtitle {
  font-size: 0.9rem;
  color: #64748b;
}

.gcl-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
}

.gcl-modal-close:hover {
  color: #0f172a;
}

.gcl-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.925rem;
  line-height: 1.55;
  color: #334155;
}

.gcl-detail-row {
  margin-bottom: 1rem;
}

.gcl-detail-label {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.gcl-detail-value {
  color: #475569;
}

.gcl-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  background-color: #f8fafc;
  display: flex;
  justify-content: flex-end;
}

.gcl-modal-open {
  overflow: hidden;
}
