/**
 * CashClaim Pending Claims + Success pages.
 */

.cashclaim-pending-page,
.cashclaim-success-page {
  min-height: calc(100vh - var(--dk-bottom-clearance, 68px));
  padding-bottom: calc(var(--dk-bottom-clearance, 68px) + 24px);
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(16, 185, 129, 0.1), transparent 58%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

@media (prefers-color-scheme: dark) {
  .cashclaim-pending-page,
  .cashclaim-success-page {
    background:
      radial-gradient(ellipse 90% 45% at 50% -8%, rgba(52, 211, 153, 0.08), transparent 58%),
      linear-gradient(180deg, #0c0a09 0%, #1c1917 100%);
  }
}

.cc-pending-app,
.cc-success-app {
  max-width: 560px;
  margin: 0 auto;
  min-height: inherit;
  display: flex;
  flex-direction: column;
}

.cc-pending-root {
  flex: 1;
  padding: 0 clamp(14px, 3.5vw, 20px) 24px;
}

/* —— Home pending section —— */
.cashclaim-pending-home__link {
  border: none;
  background: transparent;
  color: #059669;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.cashclaim-pending-home-panel {
  margin-top: 4px;
}

/* —— Pending list —— */
.cc-pending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cc-pending-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  .cc-pending-card {
    background: rgba(28, 25, 23, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.cc-pending-card__img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f5f4;
}

.cc-pending-card__img--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a8a29e;
}

.cc-pending-card__status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  margin-bottom: 6px;
}

.cc-pending-card__name {
  margin: 0 0 4px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1c1917;
}

.cc-pending-card__meta,
.cc-pending-card__id,
.cc-pending-card__date {
  margin: 0 0 2px;
  font-size: 0.75rem;
  color: #78716c;
}

.cc-pending-card__id {
  font-family: ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  .cc-pending-card__name {
    color: #fafaf9;
  }
}

.cc-pending-empty,
.cc-pending-error {
  text-align: center;
  padding: 28px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px dashed rgba(148, 163, 184, 0.35);
}

.cc-pending-empty__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f5f5f4;
  color: #78716c;
}

.cc-pending-empty__title {
  margin: 0 0 6px;
  font-weight: 600;
  color: #1c1917;
}

.cc-pending-empty__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: #78716c;
}

.cc-pending-error__retry {
  margin-top: 12px;
  min-height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #047857, #059669);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.cc-pending-skeleton__card {
  height: 96px;
  border-radius: 16px;
  margin-bottom: 10px;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.12) 0%,
    rgba(148, 163, 184, 0.22) 50%,
    rgba(148, 163, 184, 0.12) 100%
  );
  background-size: 200% 100%;
  animation: ccDetailShimmer 1.2s ease-in-out infinite;
}

/* —— Success page —— */
.cashclaim-success-page {
  padding-bottom: calc(var(--dk-bottom-clearance, 68px) + 120px);
}

.cc-success-root {
  flex: 1;
  padding: clamp(20px, 5vw, 32px) clamp(14px, 3.5vw, 20px);
}

.cc-success-content {
  text-align: center;
}

.cc-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #047857, #10b981);
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 12px 32px rgba(5, 150, 105, 0.35);
}

.cc-success-title {
  margin: 0 0 10px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1c1917;
}

.cc-success-subtitle {
  margin: 0 auto 18px;
  max-width: 42ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #78716c;
}

.cc-success-request-id {
  margin: 0 0 20px;
  font-size: 0.8125rem;
  color: #57534e;
}

.cc-success-timeline {
  margin-top: 24px;
  text-align: left;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

@media (prefers-color-scheme: dark) {
  .cc-success-title {
    color: #fafaf9;
  }

  .cc-success-timeline {
    background: rgba(28, 25, 23, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.cc-success-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cc-success-timeline__step {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}

.cc-success-timeline__step:last-child {
  padding-bottom: 0;
}

.cc-success-timeline__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: rgba(148, 163, 184, 0.35);
}

.cc-success-timeline__step--done:not(:last-child)::after {
  background: rgba(16, 185, 129, 0.45);
}

.cc-success-timeline__dot {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.cc-success-timeline__step--done .cc-success-timeline__dot {
  background: #dcfce7;
  color: #059669;
  border: 2px solid #86efac;
}

.cc-success-timeline__step--current .cc-success-timeline__dot {
  background: #dbeafe;
  color: #1d4ed8;
  border: 2px solid #93c5fd;
}

.cc-success-timeline__step--pending .cc-success-timeline__dot {
  background: #f5f5f4;
  color: #a8a29e;
  border: 2px solid #e7e5e4;
}

.cc-success-timeline__step strong {
  display: block;
  font-size: 0.875rem;
  color: #1c1917;
}

.cc-success-timeline__step span {
  display: block;
  font-size: 0.6875rem;
  color: #2563eb;
  margin-top: 2px;
}

.cc-success-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--dk-bottom-clearance, 68px));
  z-index: 100;
  padding: 12px clamp(14px, 3.5vw, 20px) max(12px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, transparent, rgba(248, 250, 252, 0.97) 20%);
  backdrop-filter: blur(12px);
}

@media (prefers-color-scheme: dark) {
  .cc-success-footer {
    background: linear-gradient(180deg, transparent, rgba(12, 10, 9, 0.97) 20%);
  }
}

.cc-success-btn {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 50px;
  border-radius: 14px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.cc-success-btn--primary {
  background: linear-gradient(135deg, #047857, #059669);
  color: #fff;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35);
}

.cc-success-btn--ghost {
  background: rgba(148, 163, 184, 0.15);
  color: #44403c;
}

@media (prefers-color-scheme: dark) {
  .cc-success-btn--ghost {
    color: #e7e5e4;
  }
}

@media (min-width: 769px) {
  .cashclaim-pending-page,
  .cashclaim-success-page {
    background:
      radial-gradient(ellipse 90% 45% at 50% -8%, rgba(16, 185, 129, 0.1), transparent 58%),
      linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #1c1917;
  }

  .cashclaim-pending-page h1,
  .cashclaim-pending-page h2,
  .cashclaim-success-page h1,
  .cashclaim-success-page h2 {
    color: #1c1917 !important;
  }

  .cc-success-btn--ghost {
    color: #44403c !important;
  }
}
