/* Checkout Page - Two Column Layout */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Utility Classes */
.hidden {
  display: none;
}

/* Main Wrapper */
.checkout-wrapper {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
}

/* Left Side - Checkout Flow */
.checkout-left {
  max-width: 500px;
}

.checkout-header h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #111827;
  margin-bottom: 2rem;
}

.checkout-form {
  margin-bottom: 2rem;
}

.checkout-form h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.checkout-form > p {
  color: #6b7280;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Right Side - Purchase Summary */
.checkout-right {
  position: relative;
}

.purchase-summary {
  position: sticky;
  top: 2rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
}

.purchase-summary h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.purchase-image {
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.purchase-image img {
  width: 100%;
  height: auto;
  display: block;
}

.purchase-details h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.purchase-meta {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.purchase-files {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.purchase-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
}

.purchase-total span {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.total-amount {
  font-size: 1.5rem !important;
  color: #4f46e5 !important;
}

/* Message Container */
.message-container {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.message-success {
  background-color: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.message-error {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.form-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.otp-input {
  text-align: center;
  font-size: 1.5rem;
  font-family: "Courier New", monospace;
  letter-spacing: 0.5rem;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.btn-primary {
  background-color: #4f46e5;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #4338ca;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-pay {
  background-color: #10b981;
}

.btn-pay:hover:not(:disabled) {
  background-color: #059669;
}

.btn-link {
  background: none;
  border: none;
  color: #4f46e5;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  width: auto;
  font-size: 0.875rem;
}

.btn-link:hover:not(:disabled) {
  color: #4338ca;
  text-decoration: underline;
}

.btn-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* OTP Timer Section */
.otp-timer-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.otp-timer {
  color: #6b7280;
}

/* Info Box */
.info-box {
  margin-bottom: 1.5rem;
  background-color: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 0.875rem;
  border-radius: 0.375rem;
}

.info-box-text {
  font-size: 0.875rem;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-box-icon-inline {
  width: 1rem;
  height: 1rem;
  color: #3b82f6;
  flex-shrink: 0;
}

/* Success Section */
.success-container {
  text-align: center;
  padding: 1rem 0;
}

.success-icon-wrapper {
  width: 4rem;
  height: 4rem;
  background-color: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.success-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #16a34a;
}

.success-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #111827;
  margin-bottom: 0.5rem;
}

.success-message {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.success-email-box {
  background-color: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.success-email-title {
  color: #166534;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.success-email-address {
  font-size: 0.875rem;
  color: #15803d;
}

.success-order-details {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.success-order-id {
  font-family: "Courier New", monospace;
  color: #111827;
  font-weight: bold;
}

/* Loading Spinner */
.spinner {
  animation: spin 1s linear infinite;
}

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

/* Icon Utility */
.icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .checkout-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .checkout-right {
    order: -1;
  }

  .purchase-summary {
    position: relative;
    top: 0;
  }

  .checkout-left {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .checkout-wrapper {
    padding: 1rem 0.75rem;
  }

  .checkout-header h1 {
    font-size: 1.5rem;
  }

  .checkout-form h2 {
    font-size: 1.25rem;
  }

  .purchase-summary {
    padding: 1rem;
  }
}
