/* =========================
   MODAL PIX – versão final
   Arquivo: ativerma/inicio/pagamento/modal-pix.css
========================= */

/* ---------- Estrutura geral ---------- */
#modal-pix .modal-content {
  max-width: 560px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(22, 114, 216, 0.12);
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.22);
  background: #fff;
}

#modal-pix .modal-body {
  padding: 22px 24px 24px;
}

/* ---------- STATUS ---------- */
.pix-status {
  text-align: center;
  margin-bottom: 14px;
}

.pix-status-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(22, 114, 216, 0.1);
  color: var(--primary-color, #1672d8);
  font-size: 30px;
  box-shadow: 0 10px 26px rgba(22, 114, 216, 0.18);
}

.pix-status-icon.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.pix-status-icon.error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.pix-status-text {
  margin: 0;
  line-height: 1.55;
  color: #374151;
  font-size: 0.95rem;
}

/* ---------- QR CODE ---------- */
.pix-qrcode {
  text-align: center;
  margin: 12px 0 16px;
}

.pix-qrcode img {
  max-width: 240px;
  width: 100%;
  height: auto;
  display: inline-block;
  border-radius: 16px;
  padding: 12px;
  background: #0b1220;
  border: 1px solid rgba(2, 6, 23, 0.2);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.25);
}

/* ---------- CÓDIGO PIX ---------- */
.pix-code-container {
  margin: 14px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

/* Cabeçalho do código (título centralizado + botão à direita) */
.pix-code-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* Centraliza o label no modal */
  min-height: 36px;
}

.pix-code-header label {
  font-weight: 600;
  color: #374151;
  text-align: center;
  width: 100%;
  pointer-events: none; /* evita interferência de clique */
}

/* Botão copiar fixado à direita sem afetar o centro do label */
.pix-code-header .btn-copiar-pix {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-width: 110px;
  padding: 0.55rem 0.9rem;
  border: none;
  border-radius: 10px;
  background: #1672d8;
  background: linear-gradient(to bottom, #3a8df0, #1672d8);
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;  
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(22, 114, 216, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.pix-code-header .btn-copiar-pix:hover {
  transform: translateY(calc(-50% - 2px));
  background: linear-gradient(to bottom, #5ca1f3, #1363bd);
  box-shadow: 0 12px 28px rgba(22, 114, 216, 0.35);
}

.pix-code-header .btn-copiar-pix:active {
  transform: translateY(calc(-50% + 1px));
  box-shadow: 0 6px 16px rgba(22, 114, 216, 0.6);
}

.pix-code-header .btn-copiar-pix:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(22, 114, 216, 0.4), 0 10px 25px rgba(22, 114, 216, 0.25);
}

/* Campo do código PIX (sem scroll interno, 100% de largura) */
#pix-code {
  width: 100%;
  field-sizing: content;
  min-height: 90px;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  resize: none;
  overflow: hidden;
  transition: border 0.18s, box-shadow 0.18s, background 0.18s;
}

#pix-code:focus {
  outline: none;
  background: #fff;
  border-color: #1672d8;
  box-shadow: 0 0 0 3px rgba(22, 114, 216, 0.12);
}

/* ---------- VALOR ---------- */
.pix-valor {
  text-align: center;
  margin-top: 12px;
  padding: 12px 14px 10px;
  border-radius: 12px;
  background: #f1f6fe;
  border: 1px solid rgba(22, 114, 216, 0.1);
}

.pix-valor span {
  display: block;
  margin-bottom: 4px;
  color: #6b7280;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pix-valor strong {
  color: var(--primary-color, #1672d8);
  font-weight: 800;
  font-size: 1.6rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* ---------- Responsividade ---------- */
@media (max-width: 560px) {
  #modal-pix .modal-content {
    width: 94%;
    max-width: none;
  }

  .pix-code-header {
    padding-right: 0;
    flex-direction: column;
    gap: 8px;
  }

  .pix-code-header .btn-copiar-pix {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }

  #pix-code {
    min-height: 110px;
    font-size: 0.86rem;
  }

  .pix-qrcode img {
    max-width: 68vw;
  }
}

/* ---------- Fallback para browsers sem field-sizing ---------- */
@supports not (field-sizing: content) {
  #pix-code {
    overflow: hidden;
  }
}
