/* Estilos para Pagamentos Brasileiros - PIX e Boleto */

/* Formulários de Pagamento */
.pix-form, .boleto-form {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header i {
  font-size: 3rem;
  color: var(--primary-green);
  margin-bottom: 1rem;
}

.form-header h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* PIX Preview */
.pix-preview {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.qr-code-container {
  margin-bottom: 1.5rem;
}

.qr-code-placeholder {
  width: 200px;
  height: 200px;
  background: white;
  border: 2px dashed var(--medium-gray);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.qr-code-placeholder i {
  font-size: 3rem;
  color: var(--medium-gray);
  margin-bottom: 1rem;
}

.qr-code-placeholder p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.qr-code-image {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  border: 1px solid var(--light-gray);
}

.pix-info {
  display: grid;
  gap: 1rem;
  text-align: left;
}

.pix-amount, .pix-key, .pix-expires {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  background: white;
  border-radius: 8px;
}

.pix-amount .amount {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-green);
}

.pix-code-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pix-code-container .key {
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
  flex: 1;
}

/* Boleto Preview */
.boleto-preview {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.boleto-placeholder {
  text-align: center;
  padding: 3rem;
  background: white;
  border: 2px dashed var(--medium-gray);
  border-radius: 12px;
}

.boleto-placeholder i {
  font-size: 3rem;
  color: var(--medium-gray);
  margin-bottom: 1rem;
}

.boleto-placeholder p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.boleto-generated {
  text-align: center;
}

.barcode-container {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.barcode {
  font-family: 'Libre Barcode 39', monospace;
  font-size: 1.5rem;
  color: black;
  letter-spacing: 2px;
}

.digitable-line {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.digitable-line label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.line-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.line-container .line {
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
  flex: 1;
  background: var(--light-gray);
  padding: 0.5rem;
  border-radius: 4px;
}

.boleto-details {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-gray);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item label {
  font-weight: 600;
  color: var(--text-dark);
}

.boleto-instructions {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: left;
}

.boleto-instructions h4 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.boleto-instructions ul {
  list-style: none;
  padding: 0;
}

.boleto-instructions li {
  padding: 0.5rem 0;
  color: var(--text-light);
  position: relative;
  padding-left: 1.5rem;
}

.boleto-instructions li:before {
  content: "•";
  color: var(--primary-green);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Customer Form */
.customer-form {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-group input::placeholder {
  color: var(--medium-gray);
}

/* Payment Methods */
.payment-methods {
  margin-bottom: 2rem;
}

.payment-methods-title {
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}
/* 
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
} */

.payment-method {
  background: white;
  border: 2px solid var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.payment-method:hover {
  border-color: var(--primary-green);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.2);
}

.payment-method.active {
  border-color: var(--primary-green);
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(39, 174, 96, 0.1) 100%);
}

.payment-method.active::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary-green);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.payment-method i {
  font-size: 2rem;
  color: var(--primary-green);
  margin-bottom: 0.5rem;
}

.payment-method span {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.payment-method small {
  display: block;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Copy Button */
.copy-btn {
  background: var(--primary-green);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: var(--secondary-green);
  transform: scale(1.05);
}

/* Payment Info */
.boleto-info {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(39, 174, 96, 0.1) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item i {
  color: var(--primary-green);
  font-size: 1.2rem;
}

.info-item span {
  color: var(--text-dark);
  font-weight: 500;
}

/* Messages */
.payment-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.payment-message.error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.payment-message.success {
  background: rgba(46, 204, 113, 0.1);
  color: var(--primary-green);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.payment-message i {
  font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }
  
  .pix-preview, .boleto-preview {
    padding: 1rem;
  }
  
  .qr-code-placeholder, .qr-code-image {
    width: 150px;
    height: 150px;
  }
  
  .pix-info {
    grid-template-columns: 1fr;
  }
  
  .pix-amount, .pix-key, .pix-expires {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .pix-code-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .line-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .copy-btn {
    align-self: flex-start;
    margin-top: 0.5rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pix-form, .boleto-form {
  animation: fadeIn 0.5s ease;
}

.qr-code-image, .barcode {
  animation: fadeIn 0.8s ease;
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-green);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
