/* Tip card. Uses the site palette, including the light-theme token overrides. */

.tip-card {
  position: relative;
  margin: 1.75rem 0 0;
  padding: 1rem 1rem 1.05rem;
  border-radius: 12px;
  background:
    linear-gradient(165deg, var(--tip-sheen, rgba(0, 240, 255, 0.1)), transparent 46%),
    var(--panel);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.05),
    0 14px 36px rgba(0, 240, 255, 0.07),
    0 0 28px rgba(255, 45, 198, 0.06);
}

.tip-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta) 58%, var(--cyan));
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.tip-card-page {
  margin-top: 0.35rem;
  padding: 1.15rem 1.05rem 1.2rem;
}

.tip-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tip-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  color: var(--cyan);
  background: var(--inline-bg);
  border: 1px solid var(--border);
}

.tip-kicker {
  margin: 0;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tip-card .tip-title {
  margin: 0.05rem 0 0;
  font-size: 1.35rem;
}

.tip-card-page .tip-title { font-size: 1.7rem; }

.tip-card h1::after,
.tip-card h2::after { display: none; }

.tip-copy {
  margin: 0.8rem 0 0;
  color: var(--fg);
  font-size: 0.98rem;
  line-height: 1.55;
}

.tip-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.9rem 0 0;
}

.tip-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

a.tip-amount:hover,
button.tip-amount:hover,
.tip-amount:focus-visible,
.tip-amount.is-selected,
.tip-amount[aria-pressed="true"] {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  text-decoration: none;
}

.tip-hint {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

a.tip-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  margin-top: 0.85rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--cyan);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 0 rgba(0, 240, 255, 0);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

a.tip-button:hover,
a.tip-button:focus-visible {
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.35);
}

.tip-total {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.site-footer .tip-footer {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}

.site-footer .tip-footer a {
  color: var(--muted);
  text-decoration-color: var(--muted);
}

.site-footer .tip-footer a:hover,
.site-footer .tip-footer a:focus-visible {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}

@media (min-width: 40rem) {
  .tip-card { padding: 1.15rem 1.25rem 1.2rem; }
  .tip-card-page { padding: 1.35rem 1.4rem 1.4rem; }
  a.tip-button {
    display: inline-flex;
    width: auto;
    min-width: 12rem;
  }
}

@media (prefers-color-scheme: light) {
  .tip-card {
    --tip-sheen: rgba(0, 101, 117, 0.08);
    box-shadow:
      0 10px 28px rgba(7, 24, 32, 0.08),
      0 0 0 1px rgba(0, 101, 117, 0.05);
  }
  a.tip-button:hover,
  a.tip-button:focus-visible {
    box-shadow: 0 8px 20px rgba(0, 101, 117, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  a.tip-button { transition: none; }
}
