:root {
  --tmw-accent:       #7c3aed;
  --tmw-accent-hover: #6d28d9;
  --tmw-text:         #ffffff;
  --tmw-radius:       999px;
  --tmw-font-size:    .875rem;
  --tmw-gap:          .375em;
  --tmw-shadow:       0 1px 4px rgba(0, 0, 0, .18);
}

/* ── Shared wrapper ─────────────────────────────────────────────── */
.tmw-wrap {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  font-family: inherit;
  transition: background .15s ease, opacity .15s ease, color .15s ease;
}

.tmw-wrap:focus-visible {
  outline: 2px solid var(--tmw-accent);
  outline-offset: 3px;
}

/* ── Pill ───────────────────────────────────────────────────────── */
.tmw-pill {
  gap: var(--tmw-gap);
  padding: .4em .85em;
  border-radius: var(--tmw-radius);
  background: var(--tmw-accent);
  color: var(--tmw-text);
  font-size: var(--tmw-font-size);
  font-weight: 600;
  box-shadow: var(--tmw-shadow);
}

a.tmw-pill:hover,
a.tmw-pill:focus {
  background: var(--tmw-accent-hover);
  color: var(--tmw-text);
}

/* ── Minimal ────────────────────────────────────────────────────── */
.tmw-minimal {
  gap: var(--tmw-gap);
  font-size: var(--tmw-font-size);
  font-weight: 600;
  color: inherit;
}

a.tmw-minimal:hover,
a.tmw-minimal:focus {
  opacity: .75;
}

/* ── Card ───────────────────────────────────────────────────────── */
.tmw-card {
  flex-direction: column;
  align-items: flex-start;
  gap: .2em;
  padding: .6em 1em;
  border-radius: calc(var(--tmw-radius) / 5);
  background: var(--tmw-accent);
  color: var(--tmw-text);
  font-size: var(--tmw-font-size);
  box-shadow: var(--tmw-shadow);
  min-width: 7.5em;
}

a.tmw-card:hover,
a.tmw-card:focus {
  background: var(--tmw-accent-hover);
  color: var(--tmw-text);
}

.tmw-card-label {
  font-size: .7em;
  opacity: .8;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tmw-card-amount {
  font-size: 1.3em;
  font-weight: 700;
}

/* ── Icon container ─────────────────────────────────────────────── */
.tmw-icon {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 1.1em;
  height: 1.1em;
}

.tmw-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
}

.tmw-face svg {
  width: 100%;
  height: 100%;
}

/* Wallet visible by default */
.tmw-face-wallet {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition: opacity .22s ease, transform .28s cubic-bezier(.55, .06, .68, .19);
}

/* Smiley hidden by default */
.tmw-face-smiley {
  opacity: 0;
  transform: scale(0.25) rotate(-25deg);
}

/* ── Click animation ────────────────────────────────────────────── */

.tmw-happy .tmw-face-wallet {
  opacity: 0;
  transform: scale(0.15) rotate(20deg);
}

@keyframes tmw-smiley-in {
  0%   { opacity: 0; transform: scale(0.25) rotate(-25deg); }
  50%  { opacity: 1; transform: scale(1.3)  rotate(6deg);   }
  70%  {             transform: scale(0.88) rotate(-3deg);  }
  85%  {             transform: scale(1.1)  rotate(2deg);   }
  100% { opacity: 1; transform: scale(1)    rotate(0deg);   }
}

.tmw-happy .tmw-face-smiley {
  animation: tmw-smiley-in .65s .18s cubic-bezier(.34, 1.56, .64, 1) both;
}

/* ── Alignment ──────────────────────────────────────────────────── */
.tmw-align-left   { display: block; text-align: left;   }
.tmw-align-center { display: block; text-align: center; }
.tmw-align-right  { display: block; text-align: right;  }

/* ── Misc ───────────────────────────────────────────────────────── */
.tmw-label {
  margin-right: .1em;
}
