/* ============================================================
   Payment Success Page — Stylesheet
   Credit: lautandigital.id
   ============================================================ */

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

:root {
  --green-main:   #22c55e;
  --green-dark:   #16a34a;
  --green-light:  #dcfce7;
  --blue-accent:  #3b82f6;
  --text-primary: #111827;
  --text-muted:   #6b7280;
  --border:       #e5e7eb;
  --bg:           #f0fdf4;
  --card-bg:      #ffffff;
  --radius:       1.25rem;
  --shadow:       0 20px 60px rgba(0, 0, 0, .10);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

/* ─── Layout ─────────────────────────────────────────── */
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 2rem 1rem;
}

/* ─── Card ────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: slideUp .55s cubic-bezier(.22, .61, .36, 1) both;
}

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

/* ─── Success Icon ────────────────────────────────────── */
.icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.circle-bg {
  width: 88px;
  height: 88px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn .45s .3s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: 1; transform: scale(1); }
}

.checkmark {
  width: 52px;
  height: 52px;
}

.checkmark__circle {
  stroke: var(--green-main);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: drawCircle .6s .6s ease forwards;
}

.checkmark__check {
  stroke: var(--green-main);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck .4s 1.1s ease forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* ─── Typography ──────────────────────────────────────── */
.title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: .5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: .9625rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

/* ─── Detail Box ──────────────────────────────────────── */
.detail-box {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row.total {
  margin-top: .35rem;
  padding-top: .75rem;
}

.label {
  font-size: .875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.value {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  word-break: break-all;
}

.value.amount {
  font-size: 1.1rem;
  color: var(--green-dark);
}

/* ─── Buttons ─────────────────────────────────────────── */
.actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.btn {
  width: 100%;
  padding: .8rem 1.25rem;
  border-radius: .625rem;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-main), var(--green-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(34,197,94,.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(34,197,94,.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  background: #f3f4f6;
}

/* ─── Support text ────────────────────────────────────── */
.support-text {
  font-size: .8125rem;
  color: var(--text-muted);
}

.support-text a {
  color: var(--blue-accent);
  text-decoration: none;
  font-weight: 500;
}

.support-text a:hover {
  text-decoration: underline;
}

/* ─── Footer ──────────────────────────────────────────── */
.footer {
  margin-top: 1.75rem;
  font-size: .8125rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ─── Toast ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1f2937;
  color: #fff;
  padding: .7rem 1.4rem;
  border-radius: 2rem;
  font-size: .875rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.25rem;
  }

  .title {
    font-size: 1.4rem;
  }

  .detail-box {
    padding: 1rem 1.1rem;
  }
}
