/* j23app.com/tip (tip.php): a standalone page styled like the linkable.bio/j23app tip jar. */

:root {
	--bg: #fff;
	--text: #211c18;
	--muted: rgba(33, 28, 24, 0.6);
	--red: #cc0000;
	--on-red: #fff;
	--tile-bg: rgba(33, 28, 24, 0.06);
	--ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
	-webkit-text-size-adjust: 100%;
}

*, *:before, *:after {
	box-sizing: inherit;
}

html, body {
	background: var(--bg);
}

body {
	color: var(--text);
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: inherit;
}

.page {
	display: flex;
	flex-direction: column;
	margin: 0 auto;
	max-width: 560px;
	min-height: 100vh;
	padding: 2rem 1rem 1rem;
	padding: 2rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
	text-align: center;
}

/* Profile */

.profile {
	align-items: center;
	display: flex;
	flex-direction: column;
}

/* The red J23 mark (images/j23.svg) on a black circle, like the app icon. */
.logo {
	background: #000;
	border-radius: 50%;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.08),
		0 4px 8px rgba(0, 0, 0, 0.06),
		0 12px 24px rgba(0, 0, 0, 0.08);
	display: block;
	height: 96px;
	padding: 10px;
	transition: transform 0.3s var(--ease-out);
	width: 96px;
}

.logo img {
	display: block;
	height: 100%;
	width: 100%;
}

.username {
	color: var(--muted);
	font-size: 15px;
	font-weight: 500;
	margin-top: 0.5rem;
	text-decoration: none;
	transition: color 0.2s;
}

.tip-title {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1;
	margin: 1.5rem 0 0;
}

.tip-message {
	background: var(--tile-bg);
	border-radius: 14px;
	font-size: 15px;
	font-weight: 600;
	margin: 20px 0 0;
	padding: 12px 16px;
}

/* Tip box */

.tip-panel {
	background: var(--red);
	border-radius: 24px;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.04),
		0 2px 8px rgba(0, 0, 0, 0.06);
	color: var(--on-red);
	margin-top: 20px;
	padding: 16px;
}

.tip-amounts {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
}

.tip-amount,
.tip-submit {
	border-radius: 999px;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	height: 48px;
	margin: 0;
	transition: background 0.15s, opacity 0.15s, transform 0.15s;
}

.tip-amount:active,
.tip-submit:active {
	transform: scale(0.97);
}

.tip-amount {
	background: transparent;
	border: 1.5px solid currentColor;
	color: inherit;
	font-size: 17px;
}

.tip-custom {
	display: flex;
	gap: 8px;
	margin: 8px 0 0;
}

.tip-custom-field {
	align-items: center;
	border: 1.5px solid currentColor;
	border-radius: 999px;
	display: flex;
	flex: 1;
	height: 48px;
	min-width: 0;
	padding: 0 18px;
}

.tip-custom-field span {
	font-weight: 700;
	margin-right: 4px;
	opacity: 0.7;
}

.tip-custom-field input {
	-moz-appearance: textfield;
	appearance: textfield;
	background: transparent;
	border: 0;
	color: inherit;
	font: inherit;
	font-size: 16px; /* 16px+ stops iOS zooming in on focus */
	margin: 0;
	min-width: 0;
	outline: 0;
	padding: 0;
	text-align: left;
	width: 100%;
}

.tip-custom-field input::placeholder {
	color: inherit;
	opacity: 0.55;
}

.tip-custom-field input::-webkit-outer-spin-button,
.tip-custom-field input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.tip-custom-field:focus-within {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.tip-submit {
	background: var(--on-red);
	border: 0;
	color: var(--red);
	font-size: 16px;
	padding: 0 26px;
}

.tip-note {
	font-size: 12px;
	margin: 12px 0 0;
	opacity: 0.7;
}

.footer {
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	margin-top: auto;
	padding-top: 48px;
}

.footer a {
	text-decoration: none;
}

/* Hover effects only where there's a real pointer (no sticky hover on phones). */
@media (hover: hover) {
	.logo:hover {
		transform: scale(1.04);
	}

	.username:hover,
	.footer a:hover {
		color: var(--text);
	}

	.tip-amount:hover {
		background: rgba(255, 255, 255, 0.16);
	}

	.tip-submit:hover {
		opacity: 0.9;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *:before, *:after {
		transition: none !important;
	}
}
