/* Treatly Glass — money on a task: the sheet, the cheque, the wallet. */

/* ---------- the pill on a card ---------- */
.gcard .gcard-meta .gcard-money {
  gap: 0;
  padding: 0 10px;
  color: #231a05;
  background: linear-gradient(135deg, #fff1bf 0%, #edcf8e 38%, #c99a3c 62%, #f6e2a6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 14px rgba(237, 207, 142, 0.35);
}
.gcard-money b {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- the cheque ---------- */
.g-cheque-view {
  position: fixed;
  inset: 0;
  z-index: 116;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 60px) 16px calc(var(--safe-b) + 20px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.g-cheque-view.is-open {
  pointer-events: auto;
  opacity: 1;
}
.g-cheque-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.g-cheque-close {
  position: absolute;
  top: calc(var(--safe-t) + 14px);
  right: 16px;
  width: 44px;
  height: 44px;
}
.g-cheque-stage {
  position: relative;
  width: min(600px, 100%);
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  perspective: 1200px;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.5s cubic-bezier(0.2, 1.1, 0.3, 1);
}
.g-cheque-view.is-open .g-cheque-stage {
  transform: none;
}

.g-cheque {
  --mx: 0.5;
  --my: 0.5;
  --rx: 0deg;
  --ry: 0deg;
  --paper: #0d1b3d;
  --paper-2: #0a3a55;
  --gold: #edcf8e;
  --line: rgba(237, 207, 142, 0.55);
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 2.25 / 1;
  min-height: 210px;
  border-radius: 20px;
  overflow: hidden;
  color: #f7f1e1;
  background:
    radial-gradient(120% 140% at 0% 0%, #1296a8 0%, transparent 48%),
    radial-gradient(120% 140% at 100% 100%, #16678a 0%, transparent 52%),
    linear-gradient(135deg, var(--paper-2), var(--paper) 55%);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  touch-action: pan-y;
}
/* guilloché: fine engraved lines across the whole face */
.g-cheque::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background:
    repeating-radial-gradient(circle at 18% 120%, transparent 0 5px, rgba(255, 255, 255, 0.5) 5.5px 6px),
    repeating-radial-gradient(circle at 92% -30%, transparent 0 7px, rgba(255, 255, 255, 0.35) 7.5px 8px);
  mix-blend-mode: overlay;
}
/* inner frame, like the border on a bank note */
.g-cheque::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 3px rgba(237, 207, 142, 0.12);
  pointer-events: none;
}
.g-cheque-rosette {
  position: absolute;
  right: -6%;
  top: 50%;
  width: 62%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: var(--guill) center / contain no-repeat;
  opacity: 0.55;
  mix-blend-mode: screen;
}
/* holographic foil that follows the light */
.g-cheque-foil {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from calc(var(--mx) * 360deg) at calc(var(--mx) * 100%) calc(var(--my) * 100%), #f2a7c3, #b9a7f5, #8ec9f2, #8fd8b0, #edcf8e, #f2a7c3);
  opacity: 0.22;
  mix-blend-mode: color-dodge;
  filter: blur(18px);
  transition: opacity 0.3s;
}
.g-cheque:hover .g-cheque-foil {
  opacity: 0.34;
}
.g-cheque-micro {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  height: 7px;
  font-size: 5.5px;
  line-height: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
  overflow: hidden;
  color: rgba(237, 207, 142, 0.5);
}
.g-cheque-micro::before {
  content: 'TREATLY · KEEP YOUR WORD · TREATLY · KEEP YOUR WORD · TREATLY · KEEP YOUR WORD · TREATLY · KEEP YOUR WORD · TREATLY · KEEP YOUR WORD · TREATLY · KEEP YOUR WORD · TREATLY · KEEP YOUR WORD';
}
.g-cheque-in {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: clamp(16px, 4.2%, 26px) clamp(18px, 4.6%, 30px) clamp(12px, 3%, 18px);
}
.g-cheque-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.g-cheque-row small {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.g-cheque-head {
  align-items: center;
  justify-content: space-between;
}
.g-cheque-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.g-cheque-brand svg {
  border-radius: 7px;
}
.g-cheque-brand b {
  font-family: var(--sys-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.g-cheque-brand i {
  padding: 3px 8px;
  border-radius: 8px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1405;
  background: linear-gradient(135deg, #fff1bf, #edcf8e 45%, #c99a3c);
}
.g-cheque-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.g-cheque-line {
  flex: 1;
  min-width: 0;
  padding: 0 2px 3px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 700;
}
.g-cheque-to {
  font-family: var(--sys-display);
  font-size: clamp(18px, 4.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.g-cheque-words {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: rgba(247, 241, 225, 0.85);
}
.g-cheque-box {
  flex: none;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--gold);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 12px rgba(237, 207, 142, 0.18);
}
.g-cheque-box b {
  font-family: var(--sys-round);
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #fff6d6 20%, #edcf8e 40%, #fffbe9 50%, #d7a94a 62%, #fff1bf 80%);
  background-size: 250% 100%;
  background-position: calc(var(--mx) * 100%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.g-cheque-for .g-cheque-line {
  font-size: 13.5px;
}
.g-cheque-sign {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 34%;
}
.g-cheque-sig {
  width: 100%;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Caveat, 'Segoe Print', 'Bradley Hand', cursive;
  font-size: clamp(22px, 5.4vw, 30px);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  transform: rotate(-3deg);
}
.g-cheque-sign small {
  margin-top: 3px;
  font-size: 8.5px;
  letter-spacing: 0.1em;
}
.g-cheque-micr {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(247, 241, 225, 0.55);
}

/* the rubber stamp */
.g-cheque-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%) rotate(-12deg);
  pointer-events: none;
}
.g-cheque-stamp span {
  display: block;
  padding: 6px 16px;
  border: 3px solid currentColor;
  border-radius: 10px;
  font-family: var(--sys-display);
  font-size: clamp(18px, 5vw, 30px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.9;
  /* a little worn, like real ink */
  -webkit-mask-image: repeating-linear-gradient(115deg, #000 0 7px, rgba(0, 0, 0, 0.72) 7px 9px);
  mask-image: repeating-linear-gradient(115deg, #000 0 7px, rgba(0, 0, 0, 0.72) 7px 9px);
}
.g-cheque.is-open .g-cheque-stamp {
  /* small, tucked under the date, clear of the amount and the signature */
  transform: none;
  left: auto;
  top: auto;
  right: clamp(16px, 3.6%, 24px);
  bottom: clamp(10px, 2.6%, 16px);
}
.g-cheque.is-open .g-cheque-stamp span {
  font-size: 11px;
  padding: 3px 8px;
  border-width: 1.5px;
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0.8;
}
.g-cheque.is-due .g-cheque-stamp span {
  color: var(--amber);
}
.g-cheque.is-sent .g-cheque-stamp span {
  color: var(--sky);
}
.g-cheque.is-cashed .g-cheque-stamp span {
  color: #7ff0a8;
  animation: g-stamp 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.g-cheque.is-void .g-cheque-stamp span {
  color: #ff6b61;
}
.g-cheque.is-void .g-cheque-in {
  opacity: 0.55;
}
@keyframes g-stamp {
  from {
    transform: scale(2.2);
    opacity: 0;
  }
}
.g-cheque.is-auto {
  --paper: #1a1405;
  --paper-2: #3d2c08;
  background:
    radial-gradient(120% 140% at 0% 0%, #6f5316 0%, transparent 50%),
    radial-gradient(120% 140% at 100% 100%, #4a3508 0%, transparent 52%),
    linear-gradient(135deg, var(--paper-2), var(--paper) 55%);
}
/* printed: it slides out of the slot */
.g-cheque.is-printing {
  animation: g-print 0.9s cubic-bezier(0.2, 1, 0.3, 1) both;
}
@keyframes g-print {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-30px);
  }
}

/* ---------- who wrote this ---------- */
.gcard-inkwho {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px 0 5px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: rgba(20, 20, 24, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity 0.15s;
}
.gcard-inkwho.is-on {
  opacity: 1;
}
.gcard-inkwho i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c, #fff);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

@media (max-width: 420px) {
  .g-cheque-row small {
    font-size: 8.5px;
  }
  .g-cheque-micr {
    font-size: 9.5px;
  }
  .g-cheque-date {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-cheque,
  .g-cheque-stage {
    transition: none;
  }
  .g-cheque.is-printing,
  .g-cheque.is-cashed .g-cheque-stamp span,
  .g-cheque-panel.is-flash {
    animation: none;
  }
}

/* the £ in the treat tray and the give sheet */
.g-money-btn b,
.g-money-glyph {
  font-family: var(--sys-display);
  font-weight: 700;
  font-style: normal;
  background: linear-gradient(135deg, #fff1bf, #edcf8e 45%, #d7a94a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.g-money-btn b {
  font-size: 22px;
}
.g-money-glyph {
  font-size: 20px;
}


/* a way to pay this app does not offer (card payments in the iPhone app) */
.gm-choices [hidden] {
  display: none !important;
}
