:root {
    --bindome-dark-blue: #2b25d9;
    --bindome-light-blue: #D7F3FF;
    --bindome-section-blue: #5e66f2;
    --bindome-orange: #f28322;
    --bindome-dark-orange: #d93d04;
    --bindome-bg: #f6f8fa;
    --bindome-text: #111827;
    --bindome-muted: #6b7280;
    --bindome-border: #d9e1ec
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background-color: var(--bindome-bg);
    color: var(--bindome-text);
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.site-header,
.site-footer {
    background: var(--bindome-dark-blue);
    color: var(--bindome-light-blue);
}

.navbar-brand,
.navbar .nav-link {
    color: var(--bindome-light-blue);
}

.navbar-brand:hover,
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
    color: #ffffff;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.navbar-toggler-icon {
    filter: invert(1);
}

.navbar-logo {
    height: 2rem;
    width: auto;
}

.btn-api {
    color: var(--bindome-dark-blue);
    background: var(--bindome-light-blue);
    border-color: var(--bindome-light-blue);
}

.btn-api:hover,
.btn-api:focus {
    color: #ffffff;
    background: var(--bindome-section-blue);
    border-color: var(--bindome-section-blue);
}

.btn-bindome {
    color: #ffffff;
    background: var(--bindome-dark-blue);
    border-color: var(--bindome-dark-blue);
}

.btn-bindome:hover,
.btn-bindome:focus {
    color: #ffffff;
    background: var(--bindome-section-blue);
    border-color: var(--bindome-section-blue);
}

.btn-orange {
    color: #ffffff;
    background: var(--bindome-orange);
    border-color: var(--bindome-orange);
}

.btn-orange:hover,
.btn-orange:focus {
    color: #ffffff;
    background: var(--bindome-dark-orange);
    border-color: var(--bindome-dark-orange);
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

.hero {
    background:
        radial-gradient(circle at top right, rgba(215, 243, 255, 0.42), transparent 34rem),
        linear-gradient(135deg, var(--bindome-dark-blue), var(--bindome-section-blue));
    color: #ffffff;
    padding: 4.5rem 0;
}

.hero .lead,
.hero .form-text {
    color: rgba(255, 255, 255, 0.9);
}

.hero-search {
    max-width: 860px;
}

.search-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.search-examples-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 500;
}

.search-example-btn {
    background: var(--bindome-light-blue);
    border: none;
    border-radius: 0.4rem;
    color: var(--bindome-dark-blue);
    cursor: pointer;
    font-family: var(--bs-font-monospace);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    transition: background 0.15s, color 0.15s;
}

.search-example-btn:hover,
.search-example-btn:focus {
    background: #ffffff;
    color: var(--bindome-dark-blue);
    outline: none;
}

.eyebrow {
    color: var(--bindome-dark-orange);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero .eyebrow {
    color: var(--bindome-light-blue);
}

.content-block {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.summary-card,
.content-card,
.bindome-card,
.under-construction {
    background: #ffffff;
    color: var(--bindome-text);
    border: 1px solid var(--bindome-border);
    border-radius: 1rem;
    box-shadow: 0 0.35rem 1.25rem rgba(17, 24, 39, 0.05);
}

.summary-card {
    display: block;
    height: 100%;
    padding: 1.2rem;
    text-decoration: none;
    color: var(--bindome-text);
    border-top: 0.35rem solid var(--bindome-section-blue);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.summary-card:hover,
.summary-card:focus {
    color: var(--bindome-text);
    transform: translateY(-2px);
    box-shadow: 0 0.7rem 1.7rem rgba(17, 24, 39, 0.1);
}

.summary-card .icon {
    color: var(--bindome-orange);
    font-size: 1.5rem;
}

.content-card {
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.section-heading {
    background: #ffffff;
    border: 1px solid var(--bindome-border);
    border-left: 0.45rem solid var(--bindome-section-blue);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

#molstar-viewer {
    position: relative;
    width: 100%;
    height: 650px;
    background: #1a1a2e;
    border-radius: 0.5rem;
    overflow: hidden;
}

#molstar-viewer .msp-plugin {
    position: absolute;
    inset: 0;
}

.model-row.selected {
    background-color: rgba(215, 243, 255, 0.8);
}

.swatch {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0.15rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    margin-right: 0.25rem;
    vertical-align: text-bottom;
}

.min-w-nowrap {
    white-space: nowrap;
}

.under-construction {
    text-align: center;
    padding: 4rem 1rem;
}

.under-construction i {
    font-size: 3rem;
    color: var(--bindome-orange);
}

.accordion-button:not(.collapsed) {
    color: #ffffff;
    background: var(--bindome-section-blue);
}

.downloads-table th {
    white-space: nowrap;
}

.site-footer {
    flex-shrink: 0;
    padding: 1.2rem 0;
    font-size: 0.95rem;
}

.site-footer a {
    color: #ffffff;
}



.result-uniprot-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    background: var(--bindome-light-blue);
    color: var(--bindome-dark-blue);
    font-weight: 700;
    font-family: var(--bs-font-monospace);
}

.result-gene-name {
    color: var(--bindome-light-blue);
    font-weight: 600;
}

.accordion-button.collapsed .result-gene-name {
    color: var(--bindome-text);
    font-weight: 500;
}

.model-row.selected {
    background-color: rgba(242, 131, 34, 0.16);
}

.model-id-code {
    color: var(--bindome-dark-orange);
    font-weight: 600;
}

.metric-column-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.35rem 0.85rem;
}

.metric-column-controls .form-check-label {
    font-size: 0.9rem;
}

/* ============================================
   Filter trigger button
   ============================================ */
.filter-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #9ca3af;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.filter-trigger-btn:hover {
  color: var(--bindome-dark-blue);
  border-color: var(--bindome-dark-blue);
  background: rgba(43, 37, 217, 0.05);
}

.filter-trigger-btn.filter-active {
  color: var(--bindome-dark-blue);
  border-color: var(--bindome-dark-blue);
  background: rgba(43, 37, 217, 0.08);
}

/* ============================================
   Metric filter popover
   ============================================ */
.metric-filter-popover {
  position: fixed;
  z-index: 1080;
  width: 260px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14), 0 1px 6px rgba(0, 0, 0, 0.08);
  display: none;
  animation: popoverIn 0.12s ease-out;
}

.metric-filter-popover.open {
  display: block;
}

@keyframes popoverIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.filter-popover-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #f0f2f5;
}

.filter-popover-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bindome-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-popover-clear {
  font-size: 0.78rem !important;
  color: var(--bindome-muted) !important;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-popover-clear:hover {
  color: var(--bindome-dark-orange) !important;
}

.filter-popover-close {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 0.6rem;
}

.filter-popover-body {
  padding: 14px 14px 12px;
}

/* ============================================
   Dual range slider
   ============================================ */
.range-slider-wrapper {
  position: relative;
  height: 38px;
  margin-bottom: 12px;
}

.range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  transform: translateY(-50%);
  background: #e5e7eb;
  border-radius: 2px;
  pointer-events: none;
}

.range-track-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--bindome-dark-blue);
  border-radius: 2px;
}

.range-thumb {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 4px;
  margin: 0;
  padding: 0;
  background: transparent;
  outline: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
}

.range-thumb::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
}

.range-thumb::-moz-range-track {
  background: transparent;
  height: 4px;
  border: none;
}

.range-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bindome-dark-blue);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  pointer-events: all;
  transition: box-shadow 0.12s;
}

.range-thumb::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bindome-dark-blue);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  pointer-events: all;
}

.range-thumb:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(43, 37, 217, 0.2), 0 1px 5px rgba(0, 0, 0, 0.22);
}

.range-thumb:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(43, 37, 217, 0.2), 0 1px 5px rgba(0, 0, 0, 0.22);
}

.range-value-display {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-value-display .form-control {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  text-align: center;
  padding: 4px 6px;
}

.range-sep {
  color: var(--bindome-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }

    #molstar-viewer {
        height: 480px;
    }
}

/* Search result accordion header readability */
#results-container .accordion-button:not(.collapsed) {
    color: #ffffff;
    background: var(--bindome-section-blue);
}

#results-container .result-uniprot-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    background: var(--bindome-light-blue);
    color: var(--bindome-dark-blue) !important;
    font-weight: 800;
    font-family: var(--bs-font-monospace);
}

#results-container .result-gene-name {
    font-weight: 600;
}

#results-container .accordion-button:not(.collapsed) .result-gene-name {
    color: var(--bindome-light-blue) !important;
}

#results-container .accordion-button.collapsed .result-gene-name {
    color: var(--bindome-text) !important;
}

#results-container .result-count-badge {
    color: #ffffff;
    background: var(--bindome-muted);
}
/* Binder detail page */
#binder-molstar-viewer {
  position: relative;
  width: 100%;
  height: 620px;
  background: #1a1a2e;
  border-radius: 0.5rem;
  overflow: hidden;
}

#binder-molstar-viewer .msp-plugin {
  position: absolute;
  inset: 0;
}

.pae-canvas {
  display: block;
  width: 100%;
  max-width: 780px;
  aspect-ratio: 1.09 / 1;
  margin: 0 auto;
  border: 1px solid var(--bindome-border);
  border-radius: 0.5rem;
  background: #ffffff;
}

.model-id-button:hover .model-id-code,
.model-id-button:focus .model-id-code {
  color: var(--bindome-orange);
  text-decoration: underline;
}

@media (max-width: 768px) {
  #binder-molstar-viewer {
    height: 480px;
  }
}


/* Larger PAE matrix area with horizontal colorbar support */
.pae-canvas {
  max-width: 780px;
  aspect-ratio: 1.09 / 1;
}

#page-binder .section-heading .btn {
  min-width: 0;
}


.pae-plot-card,
.pae-panel,
.pae-canvas-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}


.download-links-heading,
.download-links-cell {
  min-width: 42rem;
}

.download-link-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(6.4rem, 1fr));
  gap: 0.35rem;
  width: 100%;
}

.download-link-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
  min-height: 3.05rem;
  padding: 0.32rem 0.45rem;
  border: 1px solid var(--bindome-border);
  border-radius: 0.55rem;
  background: #ffffff;
  color: var(--bindome-dark-blue);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: normal;
}

.download-link-main {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  line-height: 1.1;
}

.download-link-pill:hover,
.download-link-pill:focus {
  color: #ffffff;
  background: var(--bindome-dark-blue);
  border-color: var(--bindome-dark-blue);
  text-decoration: none;
}

.download-link-pill i {
  color: var(--bindome-orange);
}

.download-link-pill:hover i,
.download-link-pill:focus i,
.download-link-pill:hover .download-file-size,
.download-link-pill:focus .download-file-size {
  color: #ffffff;
}

.download-file-size {
  display: block;
  margin-left: 1.1rem;
  color: var(--bindome-muted);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.1;
}

.download-file-size-missing {
  font-style: italic;
}

.download-subset-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
  background: var(--bindome-light-blue);
  color: var(--bindome-dark-blue);
  font-weight: 700;
  white-space: nowrap;
}

.downloads-table td,
.downloads-table th {
  vertical-align: middle;
}


@media (max-width: 1200px) {
  .download-links-heading,
  .download-links-cell {
    min-width: 36rem;
  }

  .download-link-list {
    grid-template-columns: repeat(3, minmax(7rem, 1fr));
  }
}

@media (max-width: 768px) {
  .download-links-heading,
  .download-links-cell {
    min-width: 24rem;
  }

  .download-link-list {
    grid-template-columns: repeat(2, minmax(8rem, 1fr));
  }
}

