/* Estilos melhorados para PIX e interface geral */

/* Variáveis CSS para consistência */
:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --secondary-color: #3b82f6;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --background: #ffffff;
  --background-light: #f9fafb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Seção de pagamento PIX */
.payment-section {
  background: var(--background);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border-light);
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cabeçalho do pagamento */
.payment-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.payment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  margin-bottom: 1rem;
  color: white;
  box-shadow: var(--shadow-md);
}

.payment-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.payment-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1rem;
}

/* Container principal do PIX */
.pix-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .pix-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Seção do QR Code */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-wrapper {
  position: relative;
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 300px;
}

.qrcode-container {
  position: relative;
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-color);
  transition: var(--transition);
}

.qrcode-container:not(:empty) {
  border: none;
  background: transparent;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
}

.qr-icon {
  margin-bottom: 1rem;
  opacity: 0.6;
}

.qr-placeholder p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.qr-info {
  margin-top: 1rem;
  text-align: center;
}

.qr-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--background-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.qr-timer svg {
  color: var(--warning-color);
}

/* Indicador de verificação automática */
.verification-status {
  margin-top: 1rem;
  text-align: center;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--background-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Seção do código PIX */
.pix-code-section {
  display: flex;
  flex-direction: column;
}

.code-header {
  margin-bottom: 1rem;
}

.code-header h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.code-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
}

.code-container {
  position: relative;
  flex: 1;
}

.pix-code {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  background: var(--background-light);
  color: var(--text-primary);
  resize: none;
  transition: var(--transition);
}

.pix-code:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.pix-code::placeholder {
  color: var(--text-muted);
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.copy-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.copied {
  background: var(--success-color);
}

/* Botão de copiar grande */
.copy-button-container {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.copy-btn-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copy-btn-large:hover {
  background: linear-gradient(135deg, var(--primary-dark), #047857);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.copy-btn-large:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.copy-btn-large.copied {
  background: linear-gradient(135deg, var(--success-color), #059669);
  animation: pulse 0.6s ease-in-out;
}

.copy-btn-large svg {
  transition: var(--transition);
}

.copy-btn-large:hover svg {
  transform: scale(1.1);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Instruções de pagamento */
.payment-instructions {
  background: var(--background-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
}

.instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.instruction-step:last-child {
  margin-bottom: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.step-content p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Status de pagamento */
.payment-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-top: 2rem;
  animation: slideInUp 0.4s ease-out;
}

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  flex-shrink: 0;
}

.status-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.status-content p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.875rem;
}

/* Melhorias gerais da interface */
.modal-dialog {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 1.5rem 2rem;
  border-bottom: none;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Botões melhorados */
.btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #047857);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Formulários melhorados */
.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--background);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Cards de produto melhorados */
.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card img {
  transition: var(--transition);
}

.card:hover img {
  transform: scale(1.05);
}

/* Animações de loading */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsividade melhorada */
@media (max-width: 640px) {
  .payment-section {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .payment-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  
  .payment-icon {
    width: 48px;
    height: 48px;
  }
  
  .payment-header h3 {
    font-size: 1.25rem;
  }
  
  .qr-wrapper {
    padding: 1rem;
  }
  
  .qrcode-container {
    height: 240px;
  }
  
  .instruction-step {
    gap: 0.75rem;
  }
  
  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
}

/* Estados de erro e sucesso */
.error {
  color: var(--error-color);
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.success {
  color: var(--success-color);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

/* Melhorias no modal */
.modal {
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.5);
}

.modal.active {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-dialog {
  animation: slideInUp 0.3s ease-out;
}

/* Melhorias no stepper */
.stepper {
  background: var(--background-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 2rem;
}

.step-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  transition: var(--transition);
}

.step-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.step-btn:hover:not(.active) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
