/* Tokens page. Layout and look only: buttons, fields, cards, chips, modals, badges and notes come from /css/adspot-ui.css. */

.tk-h2 { margin: 0; font-family: var(--ui-font-head); font-weight: var(--ui-head-weight); font-size: 20px; letter-spacing: var(--ui-head-track); color: var(--ui-ink); }

/* balance hero: the number on the left, the three things you do with tokens on the right */
.tk-hero {
	position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; box-sizing: border-box; max-width: 100%;
	margin-bottom: var(--ui-s4); padding: 26px 28px; border-radius: var(--ui-radius-lg); color: #fff;
	/* the soft circles are part of the background (not boxes sticking out of the card), so nothing is wider than the card */
	background:
		radial-gradient(circle at calc(100% - 20px) -10px, rgba(255, 255, 255, .09) 0 130px, transparent 131px),
		radial-gradient(circle at 38% calc(100% + 25px), rgba(255, 255, 255, .07) 0 75px, transparent 76px),
		linear-gradient(135deg, #5f805b 0%, #3f5a3c 100%);
	box-shadow: var(--ui-shadow);
}
.tk-hero__main { position: relative; display: grid; gap: 6px; min-width: 0; flex: 1 1 260px; }
.tk-hero__label { font-size: 13px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255, 255, 255, .82); }
.tk-hero__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-width: 0; font-size: clamp(38px, 6vw, 56px); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tk-hero__unit { font-size: 17px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.tk-hero__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.tk-hero__sub strong { color: #fff; }
.tk-hero__rate { padding: 1px 9px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 600; }
.tk-hero__actions { position: relative; display: flex; flex-wrap: wrap; gap: 10px; flex: 0 1 auto; }
.tk-act {
	appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; box-sizing: border-box;
	border: 1.5px solid rgba(255, 255, 255, .45); border-radius: var(--ui-radius-sm); background: rgba(255, 255, 255, .1); color: #fff;
	font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color var(--ui-ease), border-color var(--ui-ease);
}
.tk-act:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .7); color: #fff; }
.tk-act:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tk-act svg { flex: none; }
.tk-act--primary { background: #fff; border-color: #fff; color: var(--ui-sage-dark); }
.tk-act--primary:hover { background: var(--ui-sage-soft); border-color: var(--ui-sage-soft); color: var(--ui-ink); }

/* two columns: buy on the left, activity on the right (both can shrink, nothing pushes the page wider) */
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ui-s4); align-items: start; }
.tk-col { display: grid; gap: var(--ui-s3); align-content: start; min-width: 0; }

/* buy card */
.tk-buy { padding: 24px; }
.tk-buy__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--ui-sage-soft); }
.tk-buy__badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tk-paynote { margin: 0 0 12px; }
.tk-testline { margin: 0 0 10px; }
.tk-amount-field { margin-bottom: 20px; }
.tk-amount .ui-input { min-height: 56px; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-amount .ui-input-group__addon { padding: 0 18px; font-size: 15px; font-weight: 600; }
.tk-presets { margin-top: 2px; }
.tk-presets .ui-chip { min-width: 56px; justify-content: center; }
.tk-amount-field .ui-error { margin: 0; }

.tk-summary { display: grid; gap: 0; margin: 0 0 20px; padding: 4px 16px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-sm); background: var(--ui-tint); }
.tk-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ui-line); font-size: 14px; }
.tk-summary > div:last-child { border-bottom: 0; }
.tk-summary dt { color: var(--ui-muted); }
.tk-summary dd { margin: 0; color: var(--ui-ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.tk-summary__total dt { color: var(--ui-ink); font-weight: 700; }
.tk-summary__total dd { font-size: 22px; font-weight: 700; }
.tk-cur { font-size: 14px; font-weight: 600; color: var(--ui-muted); }
.tk-summary--flat { margin: 4px 0 0; }
.tk-bad { color: #a53b38 !important; }
.tk-secure { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 12px 0 0; text-align: left; }
.tk-secure[hidden] { display: none; }
.tk-secure svg { flex: none; margin-top: 3px; }

/* send dialog */
.token_modal { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tk-dlg { overflow: hidden; }
.tk-dlg__body { overflow-x: hidden; }
.tk-find { display: block; margin-bottom: 12px; }
.tk-users { height: 320px; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-sm); padding: 4px; background: #fff; overscroll-behavior: contain; }

/* a person: avatar | name over @handle | tick. Same grid in the list, in the chosen-person chip and in the skeleton. */
.tk-person { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; box-sizing: border-box; min-height: 56px; padding: 8px 10px; border-radius: 8px; color: var(--ui-ink); }
.user_row { cursor: pointer; transition: background-color var(--ui-ease); }
.user_row:hover { background: var(--ui-tint); }
.user_row:focus-visible { outline: 2px solid var(--ui-sage); outline-offset: -2px; }
.user_row.is-selected { background: var(--ui-sage-soft); box-shadow: inset 0 0 0 1.5px var(--ui-sage); }
.tk-person__text { display: grid; gap: 1px; min-width: 0; }
.tk-person__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ui-ink); }
.tk-person__handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 1.3; color: var(--ui-muted); }
.tk-person__sub { font-size: 13px; color: var(--ui-muted); }
.tk-av { position: relative; display: block; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--ui-sage-soft); color: var(--ui-sage-dark); }
.tk-av b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 700; text-transform: uppercase; }
.tk-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ui-sage-soft); }
.tk-av.ui-skel-circle { width: 40px; height: 40px; }
.tk-person .tk-tick { width: 18px; height: 18px; color: var(--ui-sage-dark); opacity: 0; }
.user_row.is-selected .tk-tick { opacity: 1; }
.tk-users .ui-empty { padding: 60px 16px; }
.tk-person--skel { pointer-events: none; }
.tk-person--chip { grid-template-columns: 40px minmax(0, 1fr) auto; margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--ui-line); background: var(--ui-tint); border-radius: var(--ui-radius-sm); }
.tk-person--chip .tk-person__name { font-size: 16px; }
.tk-person--chip .tk-person__text { gap: 0; }
.tk-sendfield { margin-bottom: 14px; }
.tk-sendfield .tk-presets { margin-top: 10px; }
.tk-sendfield .ui-hint { display: block; margin-top: 8px; }
.tk-sendfield .ui-chip:disabled { opacity: .45; cursor: not-allowed; }
.tk-final { margin: 10px 0 0; text-align: center; }

.tk-done { display: grid; justify-items: center; gap: 8px; padding: 32px 24px 20px; text-align: center; }
.tk-done__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--ui-ok-soft); color: var(--ui-ok); }
.tk-done__icon svg { width: 30px; height: 30px; }
.tk-done__text, .tk-done__bal { margin: 0; font-size: 14.5px; line-height: 1.5; }

/* payment dialog */
#paypal-status { margin-bottom: 14px; }
#paypal-status .ui-btn { margin-top: 10px; }
#paypal-button-container { min-height: 120px; }
.tk-pp-skel { height: 48px; margin-bottom: 10px; }
.tk-pp-fail { padding: 24px 8px; }

@media (max-width: 900px) {
	.tk-layout { grid-template-columns: minmax(0, 1fr); }
	.tk-hero { padding: 22px 20px; }
	.tk-hero__actions { flex: 1 1 100%; }
	.tk-act { flex: 1 1 0; padding: 0 12px; }
}
@media (max-width: 560px) {
	.tk-buy { padding: 18px; }
	.tk-hero__actions { display: grid; grid-template-columns: 1fr 1fr; }
	.tk-act--primary { grid-column: 1 / -1; }
	.tk-amount .ui-input { font-size: 22px; min-height: 52px; }
	.tk-buy .tk-presets { flex-wrap: nowrap; }
	.tk-buy .tk-presets .ui-chip { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; }
	.tk-users { height: 280px; }
	.tk-earn { padding: 16px; }
	.tk-earn__nums strong { font-size: 19px; }
}

/* number inputs without the browser spinners */
.tk-amount .ui-input::-webkit-outer-spin-button, .tk-amount .ui-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tk-amount .ui-input { -moz-appearance: textfield; appearance: textfield; }

/* how it works */
.tk-info { padding: 18px 20px; }
.tk-info__title { margin: 0 0 10px; font-family: var(--ui-font-head); font-weight: var(--ui-head-weight); font-size: 16px; letter-spacing: var(--ui-head-track); color: var(--ui-ink); }
.tk-info__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; color: var(--ui-text); }
.tk-info__list li { position: relative; padding-left: 22px; }
.tk-info__list li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ui-sage); opacity: .55; }

/* recent activity */
.tk-earn { display: grid; gap: 14px; padding: 20px 22px; min-width: 0; }
.tk-earn__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tk-earn__head .tk-info__title { margin: 0; font-size: 18px; }
.tk-earn__body { display: grid; gap: 14px; min-width: 0; }
.tk-earn__nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tk-earn__nums > div { display: grid; gap: 2px; min-width: 0; padding: 12px 14px; border-radius: var(--ui-radius-sm); background: var(--ui-sage-soft); }
.tk-earn__nums strong { font-size: 22px; line-height: 1.2; color: var(--ui-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tk-earn__nums small { font-size: 14px; font-weight: 600; color: var(--ui-muted); }
.tk-earn__label { font-size: 13px; font-weight: 700; color: var(--ui-sage-dark); }
.tk-skel-num { height: 70px; border-radius: var(--ui-radius-sm); }
.tk-earn__err { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
.tk-recent { display: grid; margin: 0; padding: 0; list-style: none; }
.tk-recent li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--ui-line); }
.tk-recent li:first-child { border-top: 0; }
.tk-recent__ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ui-tint); color: var(--ui-muted); }
.tk-recent__ico.is-in { background: var(--ui-ok-soft); color: #1f6b24; }
.tk-recent__ico.is-out { background: var(--ui-bad-soft); color: #a53b38; }
.tk-recent__main { display: grid; min-width: 0; font-size: 14px; }
.tk-recent__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-ink); }
.tk-recent__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ui-muted); }
.tk-recent__amt { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-recent__amt.is-in { color: #1f6b24; }
.tk-recent__amt.is-out { color: #a53b38; }
.tk-recent li.tk-recent__empty { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 4px; padding: 28px 8px; text-align: center; }
.tk-recent__empty strong { color: var(--ui-ink); }
.tk-recent__empty span { font-size: 14px; color: var(--ui-muted); }
