/* Science Codons U.S. Cancer Profiles Map - Extended CSS (v1.0.0) */

/* Methodology & Benchmark Grid */
.sc-cancer-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .sc-cancer-context-grid {
    grid-template-columns: 1fr;
  }
}

.sc-cancer-context-card {
  background: #f8fafc;
  border: 1px solid var(--sc-cancer-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.sc-cancer-context-card h4 {
  margin: 0 0 8px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #103e51;
}

.sc-cancer-def-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #334155;
  margin: 0 0 12px;
}

.sc-cancer-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sc-cancer-meta-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475467;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.sc-cancer-note-small {
  font-size: 0.75rem;
  color: var(--sc-cancer-muted);
  line-height: 1.45;
  margin: 0;
}

.sc-cancer-note-small a {
  color: var(--sc-cancer-primary);
  text-decoration: underline;
}

.sc-cancer-benchmark-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.sc-cancer-benchmark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--sc-cancer-border);
  border-radius: 8px;
  font-size: 0.88rem;
}

.sc-cancer-benchmark-label {
  font-weight: 600;
  color: #334155;
}

.sc-cancer-benchmark-val {
  font-weight: 800;
  color: #103e51;
}

/* Table Controls & Search */
.sc-cancer-table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sc-cancer-search-box {
  position: relative;
  flex: 1;
  max-width: 480px;
  min-width: 240px;
}

.sc-cancer-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sc-cancer-muted);
  pointer-events: none;
}

.sc-cancer-search-box input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--sc-cancer-border);
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sc-cancer-search-box input[type="search"]:focus {
  border-color: var(--sc-cancer-primary);
  box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.15);
}

/* Table Layout */
.sc-cancer-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--sc-cancer-border);
  border-radius: 8px;
}

.sc-cancer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.sc-cancer-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sc-cancer-border);
  white-space: nowrap;
}

.sc-cancer-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.sc-cancer-table tr:hover {
  background-color: #f8fafc;
}

.sc-cancer-rate-cell {
  font-weight: 800;
  color: #103e51;
}

/* Trend Badges / Pills */
.sc-cancer-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.sc-cancer-trend--rising {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sc-cancer-trend--falling {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.sc-cancer-trend--stable {
  background: #f1f5f9;
  color: #475467;
  border: 1px solid #e2e8f0;
}

.sc-cancer-area-type {
  font-size: 0.76rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
}

.sc-cancer-no-data {
  text-align: center;
  padding: 24px;
  color: var(--sc-cancer-muted);
  font-style: italic;
}

/* Pagination */
.sc-cancer-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--sc-cancer-muted);
}

.sc-cancer-pagination-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sc-cancer-page-size-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--sc-cancer-text);
  font-weight: 500;
}

.sc-cancer-page-size-select {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--sc-cancer-border);
  background: #ffffff;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sc-cancer-text);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.sc-cancer-page-size-select:focus {
  border-color: var(--sc-cancer-primary);
}

.sc-cancer-pagination-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-cancer-btn-page {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--sc-cancer-border);
  background: #ffffff;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sc-cancer-text);
  cursor: pointer;
}

.sc-cancer-btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Progress bar & Skeleton shimmer */
.sc-cancer-progress-bar-wrap {
  width: 100%;
  margin-bottom: 12px;
}

.sc-cancer-progress-bar {
  height: 4px;
  background: linear-gradient(90deg, #176b87 0%, #2997ac 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.sc-cancer-progress-text {
  display: block;
  font-size: 0.75rem;
  color: var(--sc-cancer-muted);
  margin-top: 4px;
}

/* Shimmer Loading Cells */
.sc-cancer-shimmer-cell {
  display: inline-block;
  height: 14px;
  width: 80%;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: sc-cancer-shimmer 1.5s infinite ease-in-out;
}

@keyframes sc-cancer-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Modals */
.sc-cancer-modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sc-cancer-modal-overlay[hidden] {
  display: none !important;
}

.sc-cancer-modal-content {
  background: #ffffff;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.sc-cancer-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sc-cancer-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #103e51;
}

.sc-cancer-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--sc-cancer-muted);
  cursor: pointer;
}

/* In-Map Floating Reset View Widget */
.sc-cancer-inmap-reset-btn {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #475569 !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sc-cancer-inmap-reset-btn:hover {
  background: #ffffff !important;
  color: var(--sc-cancer-primary) !important;
  border-color: var(--sc-cancer-primary) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18) !important;
  transform: translateY(-1px);
}

.sc-cancer-inmap-reset-btn:active {
  transform: translateY(0);
}

.sc-cancer-inmap-reset-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  transition: transform 0.2s;
}

.sc-cancer-inmap-reset-btn:hover svg {
  transform: scale(1.1);
}
