/* Comprovativo — estilo extrato bancário (glass) */
.tx-receipt {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px calc(12px + var(--safe-bottom));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.tx-receipt.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.tx-receipt__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 14, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tx-receipt__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: min(92dvh, 680px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(236, 247, 241, 0.92) 48%,
    rgba(255, 255, 255, 0.94) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 24px 60px rgba(8, 32, 20, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: txReceiptIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes txReceiptIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tx-receipt__tear {
  height: 10px;
  background:
  repeating-linear-gradient(
    90deg,
    transparent 0 6px,
    rgba(15, 157, 88, 0.18) 6px 12px
  );
  border-bottom: 1px dashed rgba(15, 157, 88, 0.22);
}

.tx-receipt__scroll {
  overflow-y: auto;
  padding: 18px 18px 12px;
}

.tx-receipt__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 60, 35, 0.1);
}

.tx-receipt__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-right: 36px;
}

.tx-receipt__logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.tx-receipt__brand strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.tx-receipt__brand span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tx-receipt__head {
  text-align: center;
  margin-bottom: 16px;
}

.tx-receipt__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(15, 157, 88, 0.12);
  color: var(--green-dark);
}

.tx-receipt__icon--out {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

.tx-receipt__icon--pending {
  background: rgba(255, 193, 7, 0.16);
  color: #b8860b;
}

.tx-receipt__type {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.tx-receipt__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tx-receipt__status--pending {
  background: rgba(255, 193, 7, 0.18);
  color: #9a7200;
}

.tx-receipt__status--completed {
  background: rgba(15, 157, 88, 0.14);
  color: var(--green-dark);
}

.tx-receipt__amount {
  margin: 16px 0 18px;
  padding: 14px 12px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 157, 88, 0.12);
}

.tx-receipt__amount-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tx-receipt__amount-value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.tx-receipt__amount-value--neg {
  color: #c0392b;
}

.tx-receipt__amount-value--pos {
  color: var(--green-dark);
}

.tx-receipt__rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 157, 88, 0.1);
  background: rgba(255, 255, 255, 0.55);
}

.tx-receipt__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(15, 157, 88, 0.08);
}

.tx-receipt__row:last-child {
  border-bottom: none;
}

.tx-receipt__row-label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  max-width: 42%;
}

.tx-receipt__row-value {
  flex: 1;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.tx-receipt__row-value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
}

.tx-receipt__copy {
  margin-left: 6px;
  padding: 2px 6px;
  border: none;
  border-radius: 6px;
  background: rgba(15, 157, 88, 0.1);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
}

.tx-receipt__foot {
  padding: 12px 18px calc(16px + var(--safe-bottom));
  border-top: 1px solid rgba(15, 157, 88, 0.1);
  background: rgba(255, 255, 255, 0.45);
}

.tx-receipt__foot-note {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
  margin-bottom: 10px;
}

.tx-receipt__btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  box-shadow: 0 4px 14px rgba(15, 157, 88, 0.35);
  cursor: pointer;
}

body.tx-receipt-open {
  overflow: hidden;
}

.extrato-card--clickable {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font: inherit;
  color: inherit;
}

.extrato-card--clickable:active {
  transform: scale(0.985);
}

.extrato-card--clickable:hover {
  box-shadow: 0 4px 16px rgba(15, 60, 35, 0.12);
}

[data-theme="dark"] .tx-receipt__panel {
  background: linear-gradient(
    165deg,
    rgba(18, 28, 24, 0.96) 0%,
    rgba(14, 22, 18, 0.94) 100%
  );
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tx-receipt__amount,
[data-theme="dark"] .tx-receipt__rows {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tx-receipt__close {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
