/* orvionix — payment / shipping page */
@import url("tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.pay-page {
  font-family: var(--font-sans);
  background:
    radial-gradient(ellipse 100% 60% at 50% -15%, rgba(20, 184, 166, 0.16), transparent 50%),
    linear-gradient(165deg, var(--accent-light) 0%, #e0f2f1 25%, #f1f5f9 60%, #e2e8f0 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ox-ink);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

.pay-shell {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.pay-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.pay-container--steps {
  max-width: 64rem;
}

.pay-strong {
  font-weight: 600;
}

.pay-card-meta-right {
  text-align: right;
}

.pay-summary-val {
  font-weight: 600;
  color: #134e4a;
}

.pay-mb-lg {
  margin-bottom: 3rem;
}

.pay-mb-md {
  margin-bottom: 2rem;
}

/* Glass card */
.pay-glass {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(13, 148, 136, 0.15);
  box-shadow: 0 12px 48px rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
}

.pay-glass--pad-sm {
  padding: 1.5rem;
}

.pay-glass--pad {
  padding: 2rem;
}

/* Header row */
.pay-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.pay-logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.pay-logo-mark {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--accent-dark), #115e59);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(17, 94, 89, 0.35);
}

.pay-brand-title {
  font-family: var(--font-sans);
  font-size: 1.875rem;
  font-weight: 700;
  color: #134e4a;
  letter-spacing: -0.02em;
}

.pay-brand-tag {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(19, 78, 74, 0.85);
}

.pay-support {
  text-align: right;
  color: #134e4a;
}

.pay-support-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0d9488;
}

.pay-support a {
  font-weight: 600;
  font-size: 1.125rem;
  color: #115e59;
  transition: color 0.2s ease;
}

.pay-support a:hover {
  color: var(--ox-cta);
}

.pay-support-phone {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Progress steps */
.pay-steps-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.step-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: rgba(13, 148, 136, 0.15);
  z-index: -1;
}

.step-item.active .step-circle {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  transform: scale(1.12);
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.45);
  color: #fff;
}

.step-item.completed .step-circle {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}

.step-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent-dark);
  transition: all 0.4s ease;
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.step-label {
  margin-top: 1rem;
  font-weight: 600;
  color: #134e4a;
  font-size: 0.9rem;
  text-align: center;
}

/* Main grid */
.pay-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.pay-forms-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pay-summary-col {
  position: static;
}

@media (min-width: 1024px) {
  .pay-main-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }

  .pay-summary-col {
    position: sticky;
    top: 2rem;
  }
}

/* Section titles */
.pay-section-head {
  font-size: 1.75rem;
  font-weight: 700;
  color: #042f2e;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0;
}

.pay-section-head-bar {
  width: 0.5rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-mid), var(--accent-dark));
  margin-right: 1rem;
  flex-shrink: 0;
}

.pay-lead {
  font-size: 0.875rem;
  color: rgba(19, 78, 74, 0.9);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

/* Form fields */
.pay-field {
  margin-bottom: 0;
}

.pay-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .pay-field-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.pay-label {
  display: block;
  font-weight: 600;
  color: #134e4a;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.pay-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(13, 148, 136, 0.2);
  font-size: 1rem;
  color: #042f2e;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pay-input::placeholder {
  color: #94a3b8;
}

.pay-input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.pay-stack-form > * + * {
  margin-top: 1.5rem;
}

.field-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

/* Card preview */
.pay-card-display {
  border-radius: var(--radius);
  padding: 2rem;
  background: linear-gradient(145deg, var(--accent-dark) 0%, #0f172a 55%, #042f2e 100%);
  color: #fff;
  margin-bottom: 1rem;
}

.pay-card-display-top {
  text-align: right;
  margin-bottom: 1rem;
}

.pay-card-display-top span {
  font-size: 0.875rem;
  opacity: 0.85;
}

.pay-card-dots {
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  font-family: ui-monospace, monospace;
  margin-bottom: 1.5rem;
}

.pay-card-display-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.pay-card-display-bottom small {
  font-size: 0.75rem;
  opacity: 0.8;
  display: block;
  margin-bottom: 0.25rem;
}

.pay-card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Checkbox row */
.pay-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.pay-check-row span {
  font-size: 0.875rem;
  color: #134e4a;
}

.pay-check-row a {
  text-decoration: underline;
  color: #042f2e;
}

.pay-check-row a:hover {
  color: var(--accent-dark);
}

.custom-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent-dark);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.3s ease;
}

.custom-checkbox:checked {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  border-color: var(--accent);
}

.custom-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

/* Primary button */
.pay-btn-primary {
  width: 100%;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-full);
  border: none;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-sans);
  cursor: pointer;
  background: linear-gradient(135deg, var(--ox-cta) 0%, var(--ox-cta-dark) 100%);
  box-shadow: 0 6px 24px rgba(234, 88, 12, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pay-btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, var(--ox-cta) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(234, 88, 12, 0.45);
}

.pay-divider-top {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(13, 148, 136, 0.15);
}

.pay-note {
  font-size: 0.875rem;
  color: rgba(19, 78, 74, 0.9);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.pay-error-center {
  text-align: center;
  margin-top: 1rem;
}

/* Summary */
.pay-summary-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #042f2e;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.pay-summary-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pay-summary-thumb {
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-summary-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pay-summary-info {
  flex: 1;
  min-width: 0;
}

.pay-summary-line-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #042f2e;
}

.pay-summary-meta {
  font-size: 0.75rem;
  color: rgba(19, 78, 74, 0.75);
  margin-top: 0.25rem;
}

.pay-summary-price {
  font-weight: 700;
  color: #042f2e;
  flex-shrink: 0;
}

.pay-summary-totals {
  border-top: 1px solid rgba(13, 148, 136, 0.15);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.pay-total-row {
  display: flex;
  justify-content: space-between;
  color: #134e4a;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.pay-total-row--grand {
  border-top: 1px solid rgba(13, 148, 136, 0.15);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #042f2e;
}

.pay-text-success {
  color: #16a34a;
  font-weight: 600;
}

.pay-trust-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pay-trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #134e4a;
}

.pay-trust-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Utilities */
.hidden {
  display: none !important;
}

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

.fade-in {
  opacity: 0;
  animation: payFadeInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
