/* ==============================================
   Calculadora — TAPS
   Styles específicos (carrega após calc.css)
   ============================================== */

/* ── Disclaimer (amarelo) ── */
.taps-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #92400e;
}

.taps-disclaimer svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}

/* ── Section labels ── */
.taps-section-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Input rows ── */
.taps-ig-row,
.taps-pvs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 480px) {
  .taps-ig-row,
  .taps-pvs-row {
    grid-template-columns: 1fr;
  }
}

/* ── Input groups ── */
.taps-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.taps-input-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.taps-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.taps-input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-primary, #1e293b);
  background: var(--bg-white, #fff);
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

.taps-input::-webkit-inner-spin-button,
.taps-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.taps-input:focus {
  outline: none;
  border-color: var(--teal, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.taps-input::placeholder {
  color: #94a3b8;
}

.taps-input-unit {
  position: absolute;
  right: 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  pointer-events: none;
}

/* ── Error state on inputs ── */
.taps-input.taps-input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* ── Result card ── */
.taps-result-card {
  padding: 28px;
  animation: tapsSlideIn 0.4s ease-out;
}

.taps-result-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 24px;
}

/* ── Result items ── */
.taps-result-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.taps-result-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e2e8f0;
  color: #64748b;
}

.taps-result-icon-info {
  background: #e0f2fe;
  color: #0284c7;
}

.taps-result-icon-delta {
  background: #fef3c7;
  color: #d97706;
}

.taps-result-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.taps-result-label {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.4;
}

.taps-result-label sup {
  color: #0d9488;
  font-weight: 600;
}

.taps-result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

/* ── Staging blocks ── */
.taps-staging-block {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.taps-staging-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 12px;
}

.taps-staging-content p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary, #1e293b);
  margin: 0 0 6px;
}

.taps-staging-content p:last-child {
  margin-bottom: 0;
}

/* Stage badge */
.taps-stage-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.taps-stage-1 {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.taps-stage-2 {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.taps-stage-none {
  background: #f0fdfa;
  color: #115e59;
  border: 1px solid #99f6e4;
}

/* Donor/Recipient labels */
.taps-roles {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.taps-role {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #64748b;
}

.taps-role strong {
  color: var(--text-primary, #1e293b);
}

.taps-role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.taps-role-dot-donor {
  background: #ef4444;
}

.taps-role-dot-receptor {
  background: #3b82f6;
}

/* ── Animations ── */
@keyframes tapsSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive tweaks ── */
@media (max-width: 480px) {
  .taps-result-item {
    padding: 14px 16px;
  }

  .taps-result-value {
    font-size: 1.25rem;
  }

  .taps-staging-block {
    padding: 16px;
  }

  .taps-disclaimer {
    padding: 14px 16px;
    font-size: 0.8125rem;
  }

  .taps-result-card {
    padding: 20px;
  }
}

/* ── Standard calculator fixes ── */
#taps-card { padding: 28px !important; }
#taps-card .card-header { margin-bottom: 20px; }
#taps-card .card-header h2 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
#taps-card .card-header-sub { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }

.taps-disclaimer {
  background: #fffbeb !important;
  border: 1px solid #fcd34d !important;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #92400e;
  margin: 16px 0 24px;
  line-height: 1.6;
}

#taps-erro { margin-bottom: 16px; }

#taps-card .btn-row {
  display: flex !important;
  align-items: stretch !important;
  gap: 10px;
  margin-top: 20px;
}
#taps-card .btn-row .btn-calcular {
  flex: 1;
  width: auto !important;
  margin-top: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#taps-card .btn-row .btn-limpar {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 24px !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  margin-top: 0 !important;
  width: auto !important;
}
#taps-card .btn-row .btn-limpar:hover { background: #e2e8f0 !important; }

.taps-resultado, #taps-resultado { padding: 28px !important; }
