/* ============ Screen: Card (#/card) — prefix .cardscr- ============ */

/* --- Card carousel --- */
.cardscr-swipe {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-top: 6px;
}
.cardscr-swipe::-webkit-scrollbar { display: none; }

/* --- Rendered payment card --- */
.cardscr-face {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 340 / 214;
  border-radius: 20px;
  background: linear-gradient(160deg, #FF5A47 0%, #F44A38 100%);
  padding: 20px 22px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: filter 300ms ease;
}
/* sheen — soft radial highlight from the top-left corner */
.cardscr-face::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 18% -10%,
    rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.05) 38%, transparent 60%);
}
/* subtle noise grain — fine dot grid at very low opacity */
.cardscr-face::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.5) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  opacity: 0.05;
}
.cardscr-face > * { position: relative; z-index: 1; }
.cardscr-face--frozen { filter: grayscale(0.9) brightness(0.72); }

.cardscr-wordmark { font-size: 24px; color: #fff; }

/* gold chip with inset contact lines */
.cardscr-chip {
  width: 28px; height: 22px; border-radius: 5px;
  margin-top: 16px;
  background: linear-gradient(140deg, #EFD9A0 0%, #D9B562 55%, #C69B45 100%);
  position: relative;
}
.cardscr-chip::before {
  content: ""; position: absolute; inset: 3px; border-radius: 3px;
  background:
    linear-gradient(rgba(118,86,22,0.55), rgba(118,86,22,0.55)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(118,86,22,0.55), rgba(118,86,22,0.55)) 0 33% / 100% 1px no-repeat,
    linear-gradient(rgba(118,86,22,0.55), rgba(118,86,22,0.55)) 0 67% / 100% 1px no-repeat;
}

.cardscr-num {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 3px;
  color: #fff;
}

.cardscr-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
}
.cardscr-name {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}
/* overlapping mastercard circles */
.cardscr-mc { display: flex; }
.cardscr-mc i { width: 30px; height: 30px; border-radius: 50%; display: block; }
.cardscr-mc i:first-child { background: #EB001B; }
.cardscr-mc i:last-child { background: #F79E1B; margin-left: -12px; opacity: 0.88; }

/* --- Pager dots (cardsCount > 1) --- */
.cardscr-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 2px; }
.cardscr-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-surface-raised);
  transition: background 150ms ease;
}
.cardscr-dot.active { background: var(--color-text); }

/* --- Controls card --- */
.cardscr-controls { margin-top: 20px; }
.cardscr-sq--coral { background: var(--color-accent); }

/* iOS-style toggle switch */
.cardscr-switch {
  width: 52px; height: 32px; border-radius: 16px; flex: none;
  background: var(--color-surface-raised);
  position: relative;
  transition: background 200ms ease;
}
.cardscr-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transition: transform 200ms cubic-bezier(.2,.8,.3,1);
}
.cardscr-switch[aria-checked="true"] { background: var(--color-primary); }
.cardscr-switch[aria-checked="true"]::after { transform: translateX(20px); }

/* Copy link */
.cardscr-copy {
  color: var(--color-link); font-weight: 600; font-size: var(--text-base);
  padding: 8px 2px;
}

/* Footer + sheet body */
.cardscr-footer {
  text-align: center; color: var(--color-text-muted);
  font-size: 13px; margin-top: 18px;
}
.cardscr-sheet-body {
  color: var(--color-text-muted); font-size: var(--text-base);
  margin: -4px 0 18px;
}

/* Toast */
.cardscr-toast {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--color-surface-raised); color: var(--color-text);
  font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius-full);
  box-shadow: var(--shadow-md); z-index: 120;
  animation: cardscr-toast-in 200ms cubic-bezier(.2,.8,.3,1);
  transition: opacity 250ms ease;
}
.cardscr-toast--out { opacity: 0; }
@keyframes cardscr-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
