:root {
  --background: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --accent-color: #4f46e5;
  --danger-color: #ef4444;
  --border-color: #e2e8f0;
  --card-background: #f8fafc;
  --secondary-color: #f8fafc;
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: var(--text-primary);
}

img {
  max-width: 100%;
  display: block;
}

#paymentElement {
  margin: 20px 0;
  min-height: 340px !important;
}

#payment-errors {
  min-height: 20px;
}

#submitPayment {
  width: 100%;
}

.close {
  cursor: pointer;
}

.StripeElement {
  box-sizing: border-box;
  border-radius: 12px;
  background-color: #fff;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: min(360px, calc(100vw - 32px));
  background: var(--background);
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
  border-left: 4px solid var(--accent-color);
  z-index: 1001;
  transform: translateX(420px);
  transition: transform 0.3s ease-in-out;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  border-left-color: var(--danger-color);
}

.toast.success {
  border-left-color: #10b981;
}

@media (max-width: 768px) {
  .toast {
    right: 12px;
    left: 12px;
    max-width: unset;
    transform: translateY(-24px);
    opacity: 0;
  }

  .toast.show {
    transform: translateY(0);
    opacity: 1;
  }
}


body { padding-bottom: 86px; }
@media (min-width: 768px) { body { padding-bottom: 0; } }
#generatedLetter { overflow-wrap: anywhere; }
