/* Payment Modal Styles */
.payment-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.payment-modal.active {
  opacity: 1;
  visibility: visible;
}

.payment-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.payment-modal-container {
  position: relative;
  width: 90%;
  max-width: 750px;
  max-height: 85vh;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(20px);
  overflow: hidden;
  transform: scale(0.9) translateY(50px);
  transition: all 0.3s ease;
}

.payment-modal.active .payment-modal-container {
  transform: scale(1) translateY(0);
}

.payment-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.08);
  min-height: 48px;
}

.payment-modal-header h3 {
  color: #ffffff;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.payment-modal-close {
  background: none;
  border: none;
  color: #e2e8f0;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.payment-modal-close:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #ffffff;
}

.payment-modal-content {
  padding: 20px;
  max-height: calc(85vh - 48px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.plan-summary {
  background: rgba(139, 92, 246, 0.08);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  height: fit-content;
  position: sticky;
  top: 0;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.plan-summary h4 {
  color: #ffffff;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
}

.plan-price .currency {
  font-size: 16px;
  color: #06b6d4;
  font-weight: 600;
}

.plan-price .amount {
  font-size: 28px;
  color: #ffffff;
  font-weight: 800;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.plan-features li {
  color: #e2e8f0;
  padding: 6px 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.4;
}

.plan-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: bold;
  font-size: 12px;
}

.plan-features li:last-child {
  border-bottom: none;
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: #e2e8f0;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: rgba(0, 0, 0, 0.5);
}

.form-group input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.form-group small {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.3;
}

.payment-total {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-top: 8px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.total-amount {
  color: #06b6d4;
  font-size: 18px;
  font-weight: 800;
}

.btn-pay {
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-pay:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-pay:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.payment-security {
  text-align: center;
  margin-top: 12px;
}

.payment-security p {
  color: #94a3b8;
  font-size: 11px;
  margin: 2px 0;
  line-height: 1.3;
}

.payment-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  animation: slideInError 0.3s ease;
  grid-column: 1 / -1;
}

.error-content {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.error-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.error-message {
  flex: 1;
  line-height: 1.4;
  font-size: 13px;
}

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

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .payment-modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .payment-modal-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .payment-modal-header {
    padding: 10px 16px;
  }

  .plan-summary {
    padding: 12px;
    position: static;
  }

  .plan-price .amount {
    font-size: 24px;
  }

  .btn-pay {
    padding: 12px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .payment-modal-container {
    width: 98%;
    margin: 8px;
  }

  .payment-modal-header {
    padding: 8px 12px;
  }

  .payment-modal-header h3 {
    font-size: 14px;
  }

  .payment-modal-content {
    padding: 12px;
    gap: 12px;
  }

  .plan-summary {
    padding: 10px;
  }

  .plan-price .amount {
    font-size: 22px;
  }

  .form-group input {
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .btn-pay {
    padding: 10px 16px;
    font-size: 12px;
  }
}
