/* Estilos para a integração do Mercado Pago */

/* Estilos base para o modal */
.modal-pagamento {
  display: none;
  position: fixed;
  z-index: 2000; /* Aumentando z-index para garantir que fique acima de outros elementos */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-pagamento.show {
  opacity: 1;
}

/* Conteúdo do modal */
.modal-pagamento .modal-content {
  background-color: #ffffff;
  margin: 5% auto;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  padding: 25px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-pagamento.show .modal-content {
  transform: translateY(0);
}

/* Botão de fechar */
.modal-pagamento .close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.modal-pagamento .close:hover {
  color: #333;
}

/* Título e texto */
.modal-pagamento h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 15px;
  padding-right: 30px; /* Espaço para o botão fechar */
}

.modal-pagamento p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.4;
}

/* Abas de pagamento */
.tabs-pagamento {
  display: flex;
  margin-bottom: 20px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.tab-button {
  flex: 1;
  padding: 10px 0;
  background-color: #f5f5f5;
  color: #666;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
}

.tab-button.active {
  background-color: var(--accent);
  color: white;
}

.tab-button:first-child {
  border-right: 1px solid #ddd;
}

/* Conteúdo das abas */
.tab-content {
  padding: 15px 0;
}

/* Campos de formulário */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.1);
}

/* Layout para campos lado a lado */
.form-row {
  display: flex;
  gap: 10px;
}

.form-group.half {
  flex: 1;
}

/* Botão de submissão */
.modal-pagamento .btn {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s;
  margin-top: 20px;
  text-align: center;
}

.modal-pagamento .btn:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 0, 0, 0.2);
}

/* Área de PIX */
.pix-qrcode {
  width: 180px;
  height: 180px;
  margin: 15px auto;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: white;
}

.pix-qrcode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pix-code-text {
  margin: 15px 0;
}

.pix-code-text textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  height: 60px;
  resize: none;
  margin-bottom: 10px;
}

/* Ícones de cartão */
.card-icons {
  display: flex;
  justify-content: center;
  margin: 15px 0;
  gap: 10px;
}

.card-icons i {
  font-size: 24px;
  color: #666;
}

.card-icons .fa-cc-visa {
  color: #1A1F71;
}

.card-icons .fa-cc-mastercard {
  color: #EB001B;
}

.card-icons .fa-cc-amex {
  color: #2E77BC;
}

.card-icons .fa-cc-elo {
  color: #00A4E0;
}

/* Estados de loading, sucesso e erro */
#payment-loading, 
#payment-error, 
#payment-success {
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  text-align: center;
}

#payment-loading {
  background-color: rgba(0, 0, 0, 0.05);
}

#payment-error {
  background-color: rgba(220, 53, 69, 0.1);
}

#payment-success {
  background-color: rgba(40, 167, 69, 0.1);
}

#payment-success i, 
#payment-error i {
  font-size: 24px;
  margin-bottom: 10px;
}

/* Estilos específicos para o Mercado Pago */
#cardPaymentBrick_container {
  height: auto;
  margin-bottom: 15px;
}

/* Estilo para os elementos de formulário do Mercado Pago */
.mp-form-element {
  margin-bottom: 15px;
  background-color: white;
  border-radius: 5px;
  padding: 0;
  border: 1px solid #ddd;
}

/* Container para o QR Code PIX */
#pix-qrcode-container {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 5px;
  text-align: center;
}

/* Instruções do PIX */
#pix-instructions {
  display: none;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  background-color: #f9f9f9;
}

#pix-instructions h4 {
  margin-bottom: 10px;
  color: #333;
}

#pix-instructions ol {
  padding-left: 20px;
}

#pix-instructions li {
  margin-bottom: 5px;
}

/* Responsividade */
@media (max-width: 768px) {
  .modal-pagamento .modal-content {
    width: 95%;
    padding: 15px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .pix-qrcode {
    width: 150px;
    height: 150px;
  }
}

  .implementaDominio {		
	font-size: 12px;
  }

/* Estilos específicos para o detalhamento de valores */
.payment-pricing-details {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 15px;
  margin-top: 20px;
  font-size: 12px;
}

.payment-pricing-details h4 {
  margin-top: 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.payment-pricing-details .price-item {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.payment-pricing-details .price-total {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  color: #FF5722;
}

.payment-pricing-details .price-notes {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

/* Estilo para o CardPaymentBrick */
#cardPaymentBrick_container {
  margin-bottom: 0 !important;
}

/* Estilo para os checkboxes de serviços adicionais */
.additional-services {
  background-color: #f0f8ff;
  border: 1px solid #d0e5ff;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.additional-services h4 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
  color: #0056b3;
}

.service-checkbox {
  margin-bottom: 10px;
}

.service-checkbox input[type="checkbox"] {
  margin-right: 10px;
}

.total-price-container {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #d0e5ff;
  font-weight: bold;
}

.total-price-container p {
  margin: 0;
  display: flex;
  justify-content: space-between;
}

/* Estilo para os alertas */
.alert {
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.alert-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.alert-info i {
  margin-right: 5px;
}

/* Estilos para o aviso de mudança de valor do PIX */
#pix-value-changed-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 15px;
  margin-top: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  text-align: center;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

/* Estilo para o botão de gerar PIX desabilitado */
#generate-pix:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* Estilo para o botão de gerar PIX destacado (novo QR Code) */
#generate-pix.highlight {
  background-color: #FF5722;
  animation: pulse 1.5s infinite;
}

/* Estilo para QR Code visível */
#pix-qrcode-container.show {
  display: block !important;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para o aviso de mudança de valor do PIX */
#pix-value-changed-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 15px;
  margin-top: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  text-align: center;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

/* Estilo para o botão de gerar PIX desabilitado */
#generate-pix:disabled {
  background-color: #999;
  cursor: not-allowed;
}

/* Estilo para o botão de gerar PIX destacado (novo QR Code) */
#generate-pix.highlight {
  background-color: #FF5722;
  animation: pulse 1.5s infinite;
}

/* Estilo para QR Code visível */
#pix-qrcode-container.show {
  display: block !important;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para o detalhamento de valores */
.payment-pricing-details {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 15px;
  margin-top: 20px;
  font-size: 14px;
}

.payment-pricing-details h4 {
  margin-top: 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.payment-pricing-details .price-item {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.payment-pricing-details .price-total {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  color: #FF5722;
}

.payment-pricing-details .price-notes {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

/* Estilo para o CardPaymentBrick */
#cardPaymentBrick_container {
  margin-bottom: 0 !important;
}

/* Estilo para os checkboxes de serviços adicionais */
.additional-services {
  background-color: #f0f8ff;
  border: 1px solid #d0e5ff;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.additional-services h4 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
  color: #0056b3;
}

.service-checkbox {
  margin-bottom: 10px;
}

.service-checkbox input[type="checkbox"] {
  margin-right: 10px;
}

.total-price-container {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #d0e5ff;
  font-weight: bold;
}

.total-price-container p {
  margin: 0;
  display: flex;
  justify-content: space-between;
}

/* Estilo para os alertas */
.alert {
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.alert-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.alert-info i {
  margin-right: 5px;
}