/**
 * Presente — Gift Section · Layout Editorial + Abas PIX / Cartão
 * ───────────────────────────────────────────────────────────────
 * Base rem: 18px (alinhado com main.css)
 */

/* ═══════════════════════════════════════════════
   SEÇÃO WRAPPER
═══════════════════════════════════════════════ */
#fh5co-presente {
  padding: 0;
  border-top: 1px solid rgba(180, 134, 30, 0.12);
  border-bottom: 1px solid rgba(180, 134, 30, 0.12);
}

/* ═══════════════════════════════════════════════
   GRID DOIS PAINÉIS
═══════════════════════════════════════════════ */
.presente-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

/* ═══════════════════════════════════════════════
   PAINEL ESQUERDO — texto / editorial
═══════════════════════════════════════════════ */
.painel-texto {
  background: #2c1a08;
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.painel-texto::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 90% 50% at 50% 0%,
      rgba(212, 168, 67, 0.09) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 40% at 50% 100%,
      rgba(212, 168, 67, 0.05) 0%,
      transparent 70%
    );
  pointer-events: none;
}

.painel-texto::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(212, 168, 67, 0.1);
  pointer-events: none;
}

.painel-texto-inner {
  position: relative;
  z-index: 1;
}

.ornament-painel {
  display: block;
  margin: 0 auto 28px;
}

.txt-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #d4a843;
  display: block;
  margin-bottom: 18px;
  opacity: 0.75;
}

.txt-titulo {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3rem, 4vw, 4.8rem);
  color: #ffffff;
  line-height: 1;
  margin: 0 0 26px;
  font-weight: 400;
  text-shadow: 0 2px 20px rgba(212, 168, 67, 0.2);
}

.txt-linha {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.txt-linha span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 168, 67, 0.45));
}
.txt-linha span:last-child {
  background: linear-gradient(to left, transparent, rgba(212, 168, 67, 0.45));
}

.txt-corpo {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-style: italic;
  font-weight: 300;
  color: #edd9a3;
  line-height: 2;
  opacity: 0.88;
}

.txt-deco {
  position: absolute;
  bottom: 12px;
  right: 28px;
  font-family: "Great Vibes", cursive;
  font-size: 9rem;
  color: rgba(212, 168, 67, 0.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════
   PAINEL DIREITO — formulário
═══════════════════════════════════════════════ */
.painel-form {
  background: #ffffff;
  padding: 48px 52px 56px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════
   ABAS PIX / CARTÃO
═══════════════════════════════════════════════ */
.payment-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 2px solid rgba(180, 134, 30, 0.15);
}

.tab-btn {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b8a07a;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 12px 20px;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab-btn svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.tab-btn:hover {
  color: #9a7d4a;
}

.tab-btn.active {
  color: #d4a843;
  border-bottom-color: #d4a843;
}

/* ── Conteúdo das abas ── */
.tab-content {
  display: none;
  flex-direction: column;
  flex: 1;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════
   ELEMENTOS COMUNS DO FORMULÁRIO
═══════════════════════════════════════════════ */
.form-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #b8861e;
  display: block;
  margin-bottom: 22px;
}

.presente-label {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #9a7d4a;
  margin-bottom: 14px;
  display: block;
}

/* ── Botões de valor (PIX) ── */
.valor-opcoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.valor-btn,
.valor-btn-cc {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-weight: 600;
  color: #7a5a10;
  background: transparent;
  border: 1px solid rgba(180, 134, 30, 0.3);
  border-radius: 2px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  flex: 1;
  min-width: 0;
  text-align: center;
  line-height: 1;
}

.valor-btn:hover,
.valor-btn-cc:hover {
  border-color: #d4a843;
  color: #d4a843;
  background: rgba(212, 168, 67, 0.04);
}

.valor-btn.selected,
.valor-btn-cc.selected {
  background: #d4a843;
  border-color: #d4a843;
  color: #ffffff;
}

/* ── Input valor livre ── */
.valor-custom-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(180, 134, 30, 0.22);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.valor-custom-wrap:focus-within {
  border-color: #d4a843;
}

.valor-prefix {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-weight: 600;
  color: #9a7d4a;
  padding: 0 16px;
  background: rgba(212, 168, 67, 0.05);
  border-right: 1px solid rgba(180, 134, 30, 0.18);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.valor-custom-input {
  border: none;
  outline: none;
  box-shadow: none;
  padding: 11px 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: #5c4a2a;
  background: transparent;
  width: 100%;
  -moz-appearance: textfield;
}
.valor-custom-input::placeholder {
  color: #c4a878;
}
.valor-custom-input::-webkit-inner-spin-button,
.valor-custom-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* ── Divisor ── */
.form-divider {
  border: none;
  border-top: 1px solid rgba(180, 134, 30, 0.14);
  margin: 16px 0;
}

/* ── Inputs ── */
.painel-form .presente-input-group {
  margin-bottom: 10px;
}

.painel-form .presente-input.form-control {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: #2c1a08;
  background: #fdfaf4;
  border: 1px solid rgba(180, 134, 30, 0.2);
  border-bottom: 1px solid rgba(180, 134, 30, 0.2);
  border-radius: 2px;
  padding: 10px 14px;
  box-shadow: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  width: 100%;
}
.painel-form .presente-input.form-control::placeholder {
  color: #b8a07a;
  opacity: 1;
}
.painel-form .presente-input.form-control:focus {
  border-color: #d4a843;
  border-bottom-color: #d4a843;
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
  background: #ffffff;
  outline: none;
}

.presente-textarea {
  resize: none;
}

/* ── Botão principal ── */
.presente-btn {
  width: 100%;
  margin-top: 6px;
  padding: 15px 24px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: unset;
}

.presente-btn svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

/* ── Nota de segurança ── */
.presente-seguro {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.82rem;
  color: #b8a07a;
  text-align: center;
  margin-top: 12px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.presente-seguro svg {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

/* ═══════════════════════════════════════════════
   FORMULÁRIO DO CARTÃO — layouts em coluna
═══════════════════════════════════════════════ */
.cc-section-label {
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #9a7d4a;
  margin-bottom: 10px;
  display: block;
  opacity: 0.8;
}

/* linhas de campos lado a lado */
.cc-row {
  display: flex;
  gap: 8px;
}

.cc-full {
  flex: 1;
}
.cc-half {
  flex: 1;
}
.cc-third {
  flex: 1;
}
.cc-cep {
  flex: 1.4;
}
.cc-num-end {
  flex: 0.8;
}

/* formatação visual do número do cartão */
.cc-numero-input {
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════
   ESTADOS: LOADING / ERRO / SUCESSO
═══════════════════════════════════════════════ */
#presente-loading,
#cartao-loading {
  padding: 60px 0;
  text-align: center;
  display: none;
}

.presente-spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid rgba(212, 168, 67, 0.18);
  border-top-color: #d4a843;
  border-radius: 50%;
  animation: presente-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes presente-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Spinner para botão de verificação */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.presente-loading-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1rem;
  color: #9a7d4a;
}

.presente-erro {
  background: rgba(160, 30, 30, 0.08);
  border: 1px solid rgba(160, 30, 30, 0.25);
  border-radius: 3px;
  padding: 14px 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: #8b2a2a;
  margin-top: 16px;
  text-align: center;
  line-height: 1.6;
  animation: erro-shake 0.4s ease;
}

/* Animação de shake para chamar atenção ao erro */
@keyframes erro-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* QR Code */
.pix-success-header {
  text-align: center;
  margin-bottom: 22px;
}

.pix-check-icon {
  font-size: 2.2rem;
  color: #d4a843;
  margin-bottom: 12px;
  display: block;
}

.pix-nome-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: #2c1a08;
  margin: 0 0 8px;
}

.pix-instrucao {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-style: italic;
  color: #8a7452;
  line-height: 1.7;
  margin-bottom: 0;
}

.pix-valor-display {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9a7d4a;
  margin-bottom: 18px;
  text-align: center;
}
.pix-valor-display strong {
  color: #d4a843;
}

.pix-qr-container {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.pix-qrcode-img {
  width: 172px;
  height: 172px;
  border: 8px solid #ffffff;
  box-shadow:
    0 0 0 1.5px rgba(180, 134, 30, 0.28),
    0 4px 20px rgba(180, 134, 30, 0.1);
  border-radius: 3px;
  display: block;
}

.pix-copia-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.pix-payload-input {
  flex: 1;
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  color: #8a7452;
  border: 1px solid rgba(180, 134, 30, 0.22);
  border-radius: 2px;
  padding: 10px 12px;
  background: rgba(212, 168, 67, 0.03);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.btn-copiar-pix {
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  background: #d4a843;
  border: none;
  border-radius: 2px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.btn-copiar-pix:hover {
  background: #b8861e;
}
.btn-copiar-pix.copied {
  background: #4a7a4a;
}

.pix-validade {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.85rem;
  color: #b8a07a;
  margin-bottom: 20px;
  text-align: center;
}

.btn-novo-presente,
#btn-novo-cartao {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9a7d4a;
  background: transparent;
  border: 1px solid rgba(180, 134, 30, 0.28);
  border-radius: 2px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
  width: 100%;
}
.btn-novo-presente:hover,
#btn-novo-cartao:hover {
  border-color: #d4a843;
  color: #d4a843;
}

/* ── Botão verificar pagamento ── */
.btn-verificar-pix {
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #2c1a08;
  background: linear-gradient(135deg, #d4a843, #b8861e);
  border: none;
  border-radius: 2px;
  padding: 12px 24px;
  margin-top: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
  width: 100%;
  font-weight: 600;
}
.btn-verificar-pix:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 168, 67, 0.3);
}
.btn-verificar-pix:disabled {
  background: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-verificar-pix .spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════
   RESPONSIVO
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .painel-texto {
    padding: 56px 40px;
  }
  .painel-form {
    padding: 40px 36px 48px;
  }
  .txt-deco {
    display: none;
  }
}

@media (max-width: 720px) {
  .presente-grid {
    grid-template-columns: 1fr;
  }

  .painel-texto {
    padding: 52px 28px 44px;
    min-height: auto;
    text-align: center;
  }

  .ornament-painel {
    margin: 0 auto 24px;
  }

  .txt-titulo {
    font-size: clamp(2.8rem, 10vw, 3.8rem);
  }
  .txt-corpo {
    font-size: 1rem;
    line-height: 1.8;
  }

  .painel-form {
    padding: 40px 24px 52px;
  }

  .cc-row {
    flex-wrap: wrap;
  }
  .cc-half,
  .cc-third,
  .cc-cep,
  .cc-num-end {
    flex: 1 1 calc(50% - 4px);
  }

  .valor-btn,
  .valor-btn-cc {
    flex: unset;
    padding: 9px 12px;
    font-size: 0.95rem;
    justify-content: center;
    text-align: center;
  }

  /* Centralizar textos das abas no mobile */
  .tab-btn {
    padding: 10px 14px;
    font-size: 0.68rem;
    justify-content: center;
  }

  /* Ajustar botões principais no mobile */
  .presente-btn {
    font-size: 0.85rem;
    padding: 14px 20px;
  }
}

@media (max-width: 420px) {
  .painel-texto {
    padding: 40px 22px;
  }
  .painel-form {
    padding: 32px 20px 44px;
  }
  .cc-half,
  .cc-third,
  .cc-cep,
  .cc-num-end {
    flex: 1 1 100%;
  }
}

/* ═══════════════════════════════════════════════
   SELECT DE PARCELAS
═══════════════════════════════════════════════ */
.cc-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%239a7d4a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px !important;
  cursor: pointer;
  background-color: #fdfaf4;
  color: #5c4a2a;
  border: none;
  outline: none;
  box-shadow: none;
  transition: background-color 0.2s;
}

.cc-select:focus {
  background-color: #ffffff;
  border: none;
  box-shadow: none;
  outline: none;
}

.cc-select::placeholder {
  color: #c4a878;
}

/* Resumo de parcelas com taxa */
.cc-resumo-parcelas {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
  color: #5c4a2a;
  text-align: center;
  padding: 10px 14px;
  background: #fdfaf4;
  border: 1px solid rgba(180, 134, 30, 0.15);
  border-radius: 2px;
  margin-top: 8px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.cc-resumo-parcelas .valor-total {
  font-weight: 600;
  color: #9a7d4a;
}

.cc-resumo-parcelas .valor-parcela {
  font-weight: 600;
  color: #9a7d4a;
}

/* Texto informativo sobre taxas */
.cc-taxa-info {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.8rem;
  color: #b8a07a;
  text-align: center;
  margin: 0 0 12px 0;
  line-height: 1.3;
}
