/* Scoped styles for Crypto Card BIN Lookup & Sponsor Bank Inspector */
.page-heading p {
  max-width: 1100px;
}
.bin-tool {
  margin: 16px 0 44px;
}
.bin-search-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 4px 20px #192b290a;
}
.bin-input-wrap {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
}
.bin-search-input {
  width: 100%;
  font-size: 20px;
  font-family: monospace, var(--sans);
  letter-spacing: .08em;
  padding: 16px 20px;
  border: 2px solid #a3b899;
  border-radius: 6px;
  background: #fbfdf9;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.bin-search-input:focus {
  outline: none;
  border-color: #348262;
  box-shadow: 0 0 0 4px #34826224;
  background: white;
}
.bin-search-input::placeholder {
  font-size: 15px;
  font-family: var(--sans);
  letter-spacing: normal;
  color: #83928a;
}
.bin-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: #dce4da;
  border: none;
  color: var(--ink);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.bin-clear-btn.is-active {
  display: flex;
}
.bin-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
  font-size: 13px;
}
.bin-chips-label {
  color: var(--muted);
  font-weight: 600;
  margin-right: 4px;
}
.bin-chip {
  background: #f0f3ec;
  border: 1px solid #c7d2c3;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  color: #274533;
}
.bin-chip:hover {
  background: var(--deep);
  color: white;
  border-color: var(--deep);
}
.bin-chip-warning {
  background: #fff6e6;
  border-color: #f1cf88;
  color: #8c5b0d;
}
.bin-chip-danger {
  background: #feeceb;
  border-color: #f8b8b5;
  color: #9c2824;
}

/* Result Inspector Card */
.bin-inspector-card {
  margin-top: 28px;
  border: 2px solid #8ab451;
  background: #fcfdfa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 24px #192b2912;
  transition: border-color .2s;
}
.bin-inspector-card.status-warning {
  border-color: #d68910;
}
.bin-inspector-card.status-closed {
  border-color: #c0392b;
}
.bin-card-head {
  background: var(--deep);
  color: white;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.bin-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bin-number-badge {
  font-family: monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .08em;
  background: var(--green);
  color: var(--deep);
  padding: 4px 14px;
  border-radius: 4px;
}
.bin-product-name {
  font-size: 20px;
  font-weight: 700;
}
.bin-product-name a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.bin-product-name a:hover {
  color: var(--green);
}
.bin-head-side {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bin-copy-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
  font-family: inherit;
}
.bin-copy-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
}
.bin-copy-btn:active {
  transform: scale(0.97);
}
.bin-status-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: white;
  color: var(--deep);
}
.bin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}
.bin-cell {
  background: white;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bin-cell-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.bin-cell-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.bin-cell-note {
  font-size: 12px;
  color: #6a7971;
  line-height: 1.5;
}
.bin-cell-highlight {
  background: #f7faf3;
}
.bin-highlight-warning {
  background: #fffcf4;
}
.bin-highlight-danger {
  background: #fdf5f5;
}

.bin-radar-alert {
  padding: 18px 24px;
  background: #eaf1e3;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 14px;
  line-height: 1.7;
}
.bin-radar-alert.is-danger {
  background: #fbeee9;
  border-top-color: #f1b7a7;
  color: #792b1b;
}
.bin-radar-alert.is-warning {
  background: #fff7e4;
  border-top-color: #f7dfa6;
  color: #7c5108;
}
.bin-radar-alert a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Fallback card for unknown / generic BIN */
.bin-unknown-box {
  padding: 24px 28px;
  background: #f4f6f1;
  border-radius: 6px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.8;
  border-left: 4px solid #6b8655;
}
.bin-unknown-box h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.bin-empty-state {
  margin-top: 28px;
  padding: 32px 24px;
  background: #f7faf5;
  border: 2px dashed #b2c5ab;
  border-radius: 8px;
  text-align: center;
  color: #3b5344;
  font-size: 15px;
  line-height: 1.7;
}
.bin-counter-badge {
  display: inline-block;
  font-family: monospace, var(--sans);
  font-size: 13px;
  font-weight: 700;
  background: #e4eee0;
  color: #274533;
  padding: 2px 8px;
  border-radius: 12px;
  margin: 0 4px;
}
.bin-reset-filter {
  background: #23473b;
  color: white;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-left: 8px;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color .15s;
}
.bin-reset-filter:hover {
  background: #142c29;
}
tr[data-bin-row] {
  cursor: pointer;
  transition: background-color .15s;
}
tr[data-bin-row]:hover {
  background-color: #f6f9f3;
}
tr[data-bin-row].is-inspected {
  background-color: #eaf4e7 !important;
}
tr[data-bin-row].is-inspected td strong code {
  color: #1a5639;
  background: #d4e7cf;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Full Directory Table */
.bin-table-section {
  margin-top: 48px;
}
.bin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.bin-table-header h2 {
  font-size: 24px;
  margin: 0;
}
.bin-table-filter {
  display: flex;
  gap: 10px;
  align-items: center;
}
.bin-table-filter select {
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid #bcc9b8;
  border-radius: 4px;
  background: white;
}
.bin-download-links {
  font-size: 13px;
  color: var(--muted);
}
.bin-download-links a {
  color: #35683f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media(max-width: 900px) {
  .bin-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media(max-width: 640px) {
  .bin-search-box {
    padding: 20px;
  }
  .bin-card-head {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .bin-head-side {
    width: 100%;
    justify-content: space-between;
  }
  .bin-card-title {
    flex-wrap: wrap;
    gap: 10px;
  }
  .bin-number-badge {
    font-size: 20px;
    padding: 2px 10px;
  }
  .bin-product-name {
    font-size: 17px;
  }
  .bin-search-input {
    font-size: 16px;
    padding: 12px 16px;
  }
  .bin-grid {
    grid-template-columns: 1fr;
  }
  .bin-cell {
    padding: 14px 18px;
  }
  .bin-radar-alert {
    padding: 14px 18px;
  }
}

/* Winddown sits between warning (amber) and closed (red): the card still
   clears, but the program is being retired. Uses the same orange as the
   lifecycle stage of the same name in content/status-radar.mjs. */
.bin-inspector-card.status-winddown {
  border-color: #f97316;
}

.bin-radar-alert.is-winddown {
  background: #fff1e6;
  border-top-color: #f9c9a3;
  color: #7a3d0a;
}
