/* Arquivo: css/checkout.css */

/* --- Classes de Estrutura e Controle de Visibilidade --- */

/* Esconde elementos - Usada no JS para alternar formulário/resultado */
.hidden {
  display: none !important;
}

/* --- Estilos do Formulário Injetado (.blackcat-form) --- */

.blackcat-form {
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background-color: #fcfcfc;
}

.form-title {
  text-align: center;
  color: #333;
  margin-bottom: 5px;
}

.product-summary {
  text-align: center;
  font-weight: 500;
  margin-bottom: 25px;
  font-size: 1.1em;
}

.price-highlight {
  color: #ff6b3d; /* Laranja/Cor PIX */
  font-weight: bold;
}

.form-section h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #555;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

/* Estilo para todos os inputs do checkout */
.checkout-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1em;
}

/* Botão de Submissão */
.submit-button {
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  border: none;
  border-radius: 8px;
  background-color: #1a73e8; /* Azul forte */
  color: white;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-button:hover:not(:disabled) {
  background-color: #0d65d9;
}

.submit-button:disabled {
  background-color: #a0c3e7;
  cursor: not-allowed;
}

/* --- Estilos da Seção de Resultado (PIX) --- */

.result-title {
  color: #333;
  border-bottom: 2px solid #ff6b3d;
  padding-bottom: 5px;
}

.success-message {
  color: green;
  font-weight: bold;
  margin: 15px 0;
}

.pix-info-header {
  font-weight: bold;
  margin-top: 20px;
  font-size: 1.1em;
}

.qr-code-img {
  display: block;
  width: 260px;
  height: 260px;
  margin: 20px auto;
  border: 5px solid #ff6b3d; /* Borda PIX */
  border-radius: 10px;
}


.qr-code-img {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none !important;
  box-shadow: none !important;
  /* Outros estilos como padding e background devem estar aqui */
  padding: 10px;
  background-color: #ffffff; /* Fundo branco para garantir a leitura */
  width: fit-content;
  margin: 15px auto;
}

.qr-code-img canvas {
  /* 1. Remove qualquer borda visual */
  border: none !important;
  /* 2. Remove o outline de foco (que é o mais provável de ser a cor laranja) */
  outline: none !important;
  /* 3. Remove qualquer sombra que possa estar agindo como borda */
  box-shadow: none !important;
}

/* 💡 NOVO: Alvo de qualquer DIV que possa estar ao redor do QR Code */
.qr-code-img > div {
  border: none !important;
  outline: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pix-code-container {
  display: flex;
  gap: 5px;
  margin-bottom: 100px;
  height: 82px;
}

.pix-code-label {
  margin-top: 15px;
  font-weight: 500;
}

.pix-code-input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  font-family: monospace;
  color: #333;
  user-select: all; /* Facilita a seleção no celular */
  height: 82px;
}

.copy-button {
  background-color: #ff6b3d;
  color: white;
  height: 82px;
  border: none;
  padding: 0 15px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.copy-button:hover {
  background-color: #d95a32;
}

.pix-link-button {
  display: none;
  margin-top: 15px;
  text-align: center;
  background-color: #000;
  color: white;
  padding: 12px;
  border-radius: 8px;S
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.pix-link-button:hover {
  background-color: #333;
}

/* --- Estilos de Erro --- */
.error-message {
  color: #cc0000;
  background-color: #ffeaea;
  border: 1px solid #cc0000;
  padding: 10px;
  border-radius: 6px;
  margin: 15px 0;
  font-weight: bold;
}

.error-title {
  color: #cc0000;
}

.error-blockquote {
  border-left: 5px solid #cc0000;
  padding-left: 10px;
  margin: 10px 0;
  background-color: #fcf0f0;
  padding: 10px;
}

.error-retry-button {
  margin-top: 15px;
  background-color: #555;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


#checkoutOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Fundo escuro semi-transparente */
  background: rgba(0, 0, 0, 0.8);
  display: none; /* Inicia escondido */
  justify-content: center; /* Centraliza horizontalmente */
  align-items: center; /* Centraliza verticalmente */
  z-index: 9999; /* Garante que fique acima de tudo */
  backdrop-filter: blur(5px); /* Efeito de desfoque moderno */
}

/* Container interno (o box branco/cinza) */
#checkoutFormContainer,
#checkoutResult {
  background: #ffffff; /* Fundo branco/claro para destaque */
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  max-width: 450px;
  width: 90%;
  box-sizing: border-box;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}