/* ===== Blood Type Calculator ===== */

.bt-panels > [class*='col-'] {
  display: flex;
  flex-direction: column;
}

.bt-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.bt-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
}

.bt-parent {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card, #fff);
}

.bt-type-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bt-type-btn {
  flex: 1 1 60px;
  padding: 10px 0;
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 10px;
  background: var(--bg-card, #fff);
  color: var(--text, #0f172a);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bt-type-btn:hover {
  border-color: var(--accent, #dc2626);
  color: var(--accent, #dc2626);
}

.bt-type-btn.is-active {
  background: var(--accent, #dc2626);
  border-color: var(--accent, #dc2626);
  color: #fff;
}

.bt-rh-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bt-rh-row .control-label {
  margin: 0;
}

.bt-rh {
  display: flex;
  gap: 6px;
}

.bt-rh-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 8px;
  background: var(--bg-card, #fff);
  color: var(--text, #0f172a);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bt-rh-btn:hover {
  border-color: var(--accent, #dc2626);
  color: var(--accent, #dc2626);
}

.bt-rh-btn.is-active {
  background: var(--accent, #dc2626);
  border-color: var(--accent, #dc2626);
  color: #fff;
}

.bt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* message */
.bt-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.bt-message.hidden {
  display: none;
}

.bt-msg-info {
  background: var(--info-soft, #eff6ff);
  color: var(--info, #2563eb);
  border: 1px solid var(--info-border, #bfdbfe);
}

.bt-msg-success {
  background: var(--success-soft, #f0fdf4);
  color: var(--success, #16a34a);
  border: 1px solid var(--success-border, #bbf7d0);
}

.bt-msg-error {
  background: var(--danger-soft, #fef2f2);
  color: var(--danger, #dc2626);
  border: 1px solid var(--danger-border, #fecaca);
}

.bt-message.is-fading {
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* summary bars */
.bt-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bt-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bt-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bt-bar-label {
  width: 64px;
  color: var(--text, #0f172a);
  font-weight: 600;
  flex: 0 0 auto;
}

.bt-bar-track {
  flex: 1 1 auto;
  height: 12px;
  border-radius: 999px;
  background: var(--bg-soft, #f1f5f9);
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
}

.bt-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.bt-bar-a { background: #dc2626; }
.bt-bar-b { background: #2563eb; }
.bt-bar-ab { background: #7c3aed; }
.bt-bar-o { background: #16a34a; }
.bt-bar-rhpos { background: #d97706; }
.bt-bar-rhneg { background: #64748b; }

.bt-bar-value {
  width: 52px;
  text-align: right;
  color: var(--text-secondary, #475569);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.bt-rh-result {
  border-top: 1px dashed var(--border, #e2e8f0);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bt-rh-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0f172a);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 16px;
  color: var(--text-secondary, #64748b);
  text-align: center;
}

.bt-empty i {
  font-size: 32px;
  opacity: 0.5;
}

.bt-empty p {
  margin: 0;
  font-size: 13px;
}

/* toolbar */
.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.result-toolbar .button-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.bt-meta {
  font-size: 12.5px;
  color: var(--text-secondary, #64748b);
  word-break: break-all;
  min-width: 0;
}

.bt-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: var(--info-soft, #eff6ff);
  border: 1px solid var(--info-border, #bfdbfe);
  border-radius: 10px;
  color: var(--info, #1d4ed8);
  font-size: 12.5px;
  line-height: 1.6;
}

/* Punnett */
.bt-punnett {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bt-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-secondary, #475569);
}

.bt-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.bt-dot-a { background: #dc2626; }
.bt-dot-b { background: #2563eb; }
.bt-dot-o { background: #16a34a; }
.bt-dot-rh { background: #d97706; }
.bt-dot-rhneg { background: #64748b; }

.bt-pn-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin-bottom: 10px;
}

.bt-pn-block {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 12px 12px 0;
}

.bt-pn-title {
  font-size: 12px;
  color: var(--text-secondary, #475569);
  font-weight: 600;
}

.bt-pn-grid {
  display: grid;
  grid-template-columns: repeat(2, 54px);
  gap: 4px;
}

.bt-pn-rh {
  grid-template-columns: repeat(2, 54px);
}

.bt-pn-cell {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border, #e2e8f0);
}

.bt-cell-a { background: #fee2e2; color: #b91c1c; }
.bt-cell-b { background: #dbeafe; color: #1d4ed8; }
.bt-cell-ab { background: #ede9fe; color: #6d28d9; }
.bt-cell-o { background: #dcfce7; color: #15803d; }
.bt-cell-rhpos { background: #fef3c7; color: #b45309; }
.bt-cell-rhneg { background: #e2e8f0; color: #475569; }

.bt-pn-rh-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.bt-pn-rh-wrap .bt-pn-block {
  margin: 0;
}

@media (max-width: 767px) {
  .bt-pn-grid {
    grid-template-columns: repeat(2, 44px);
  }
  .bt-pn-cell {
    width: 44px;
    height: 44px;
  }
}
