/* ==========================================================================
   Payment Success — Illustra 3.0
   ========================================================================== */

body {
  min-height: 100vh;
}

.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background:
    radial-gradient(ellipse 900px 480px at 50% -10%, rgba(201,162,75,0.2), transparent 60%),
    linear-gradient(180deg, var(--teal-950) 0%, var(--teal-800) 26%, var(--cream-deep) 72%, var(--cream) 100%);
}

.success-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: 0 30px 70px -20px rgba(0, 16, 20, 0.45);
  padding: 44px 36px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: success-card-in 0.6s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes success-card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.success-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
}

.success-kk-logo {
  height: 52px;
  width: auto;
}

.success-illustra-logo {
  height: 34px;
  width: auto;
  filter: invert(1);
}

/* --- animated checkmark --- */
.success-check {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
}

.success-check-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.success-check-circle {
  fill: none;
  stroke: #2f9e5a;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transform-origin: center;
  animation: success-circle-draw 0.6s ease-out forwards;
}

.success-check-mark {
  fill: none;
  stroke: #2f9e5a;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: success-mark-draw 0.4s ease-out 0.55s forwards;
}

@keyframes success-circle-draw {
  from { stroke-dashoffset: 283; }
  to   { stroke-dashoffset: 0; }
}

@keyframes success-mark-draw {
  from { stroke-dashoffset: 60; }
  to   { stroke-dashoffset: 0; }
}

.success-credit {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-top: 16px;
}

.success-credit span {
  color: var(--maroon);
  font-weight: 700;
}

.success-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--ink);
  margin-bottom: 12px;
}

.success-message {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 400px;
  margin-bottom: 30px;
}

.success-message a {
  color: var(--maroon);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.success-message a:hover { color: var(--maroon-deep); }

/* ---------------------------------------------------------------------
   ID card flip — auto-flips between front and back every 5s.
   Each face independently rotates (rather than one shared inner wrapper) so
   backface-visibility can hide it without needing transform-style:preserve-3d
   on a parent; the two faces are kept exactly 180deg apart at every step.
   --------------------------------------------------------------------- */
.id-card-section {
  margin-bottom: 32px;
}

.id-card-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
  max-width: 320px;
  margin: 0 auto 20px;
}

.id-card-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.flip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.flip-card-inner {
  position: relative;
  perspective: 1200px;
}

.flip-card-portrait .flip-card-inner { width: 124px; height: 196px; }
.flip-card-landscape .flip-card-inner { width: 196px; height: 124px; }

.flip-card-face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(30, 23, 18, 0.25);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: flip-card-spin 5s ease-in-out infinite;
}

.flip-card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes flip-card-spin {
  0%, 42%  { transform: rotateY(0deg); }
  50%, 92% { transform: rotateY(180deg); }
  100%     { transform: rotateY(360deg); }
}

.flip-card-back {
  animation-name: flip-card-spin-back;
}

@keyframes flip-card-spin-back {
  0%, 42%  { transform: rotateY(180deg); }
  50%, 92% { transform: rotateY(360deg); }
  100%     { transform: rotateY(540deg); }
}

.flip-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.success-actions { margin-bottom: 0; }

@media (max-width: 480px) {
  .success-card { padding: 36px 24px 32px; }
  .success-kk-logo { height: 44px; }
  .success-illustra-logo { height: 28px; }
  .success-check { width: 80px; height: 80px; }
  .id-card-row { gap: 18px; }
  .flip-card-portrait .flip-card-inner { width: 100px; height: 158px; }
  .flip-card-landscape .flip-card-inner { width: 158px; height: 100px; }
}
