/* ============================================================
   BIOHACKER Protocol Card Generator — card-generator.css
   ============================================================ */

/* ----------------------------------------------------------
   Modal overlay
   ---------------------------------------------------------- */
.bh-card-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.bh-card-modal[hidden] { display: none; }

.bh-card-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, .75);
  cursor: pointer;
}

.bh-card-modal__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 640px;
  width: 100%;
}

/* ----------------------------------------------------------
   Design switcher buttons
   ---------------------------------------------------------- */
.bh-card-design-switcher {
  display: flex;
  gap: .5rem;
}
.bh-design-btn {
  padding: .4rem 1rem;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.6);
  border-radius: 99px;
  cursor: pointer;
  background: transparent;
  transition: border-color .2s, color .2s, background .2s;
}
.bh-design-btn:hover,
.bh-design-btn.active {
  border-color: rgba(255,255,255,.9);
  color: #fff;
  background: rgba(255,255,255,.08);
}

/* ----------------------------------------------------------
   Card — base structure (1200×628 logical, rendered at 2×)
   Displayed at 600px wide in modal
   ---------------------------------------------------------- */
.bh-card {
  width: 600px;
  height: 314px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   Design variants
   ---------------------------------------------------------- */
.bh-card.card-navy {
  background-color: #0A0F1E;
  background-image: url('../img/cards/card-navy.png');
  color: #FFFFFF;
}
.bh-card.card-glass {
  background-color: #D0D8E8;
  background-image: url('../img/cards/card-glass.png');
  color: #0A0F1E;
}
.bh-card.card-custom {
  background-color: #F7F5F0;
  background-image: url('../img/cards/card-custom.png');
  color: #0A0F1E;
}

/* ----------------------------------------------------------
   Card inner elements
   ---------------------------------------------------------- */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.card-wordmark {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .85;
}
.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15rem;
}
.card-member-num {
  font-size: .65rem;
  letter-spacing: .12em;
  opacity: .6;
  font-family: 'DM Sans', monospace;
}
.card-tier {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .45;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .4rem;
}
.card-name {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.1;
  opacity: .95;
}
.card-compounds {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
}
.card-archetype {
  font-size: .72rem;
  font-style: italic;
  opacity: .55;
  max-width: 380px;
  line-height: 1.5;
  margin-top: .25rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.card-site {
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .35;
}
.card-ruo {
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .3;
}

/* Glass card text adjustments */
.card-glass .card-wordmark,
.card-glass .card-name,
.card-glass .card-compounds { color: #0A0F1E; }

.card-custom .card-wordmark,
.card-custom .card-name,
.card-custom .card-compounds { color: #0A0F1E; }

/* ----------------------------------------------------------
   Modal actions
   ---------------------------------------------------------- */
.bh-card-modal__actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 640px) {
  .bh-card {
    width: 100%;
    height: auto;
    aspect-ratio: 1200/628;
    padding: 1rem 1.25rem;
  }
  .card-name { font-size: 1.1rem; }
  .card-compounds { font-size: .65rem; }
}
