/*
Theme Name: LinkHub
Description: A link-in-bio theme. One simple page with your photo, bio, social links and a list of buttons. Includes link ordering, scheduling, click stats and color presets.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: linkhub
*/

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

body.linkhub {
	--lh-radius: 14px;
	margin: 0;
	min-height: 100vh;
	background: var(--lh-bg1);
	background: linear-gradient(160deg, var(--lh-bg1), var(--lh-bg2)) fixed;
	color: var(--lh-text);
	font-family: var(--lh-font);
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}

.lh-wrap {
	position: relative;
	max-width: 680px;
	margin: 0 auto;
	padding: 56px 20px 40px;
	text-align: center;
}

/* Share button */
.lh-share {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--lh-btn-bg);
	color: var(--lh-btn-text);
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

/* Profile */
.lh-avatar {
	display: block;
	width: 96px;
	height: 96px;
	margin: 0 auto 14px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid rgba(255, 255, 255, .6);
}
.lh-avatar-fallback {
	display: grid;
	place-items: center;
	background: var(--lh-btn-bg);
	color: var(--lh-btn-text);
	font-size: 40px;
	font-weight: 700;
}
.lh-name { margin: 0 0 6px; font-size: 1.4rem; font-weight: 700; }
.lh-bio { max-width: 480px; margin: 0 auto 18px; opacity: .85; white-space: pre-line; }

/* Social chips */
.lh-socials { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 26px; }
.lh-social {
	padding: 6px 12px;
	border: 1.5px solid currentColor;
	border-radius: 999px;
	color: inherit;
	font-size: .85rem;
	text-decoration: none;
	opacity: .85;
}
.lh-social:hover { opacity: 1; }

/* Links */
.lh-links { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.lh-heading { margin: 10px 0 0; font-size: 1rem; font-weight: 700; opacity: .9; }

.lh-link {
	display: grid;
	grid-template-columns: 44px 1fr 44px;
	align-items: center;
	min-height: 56px;
	padding: 6px 8px;
	border: 2px solid transparent;
	border-radius: var(--lh-radius);
	background: var(--lh-btn-bg);
	color: var(--lh-btn-text);
	font-weight: 600;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.lh-link:hover { transform: scale(1.02); }
.lh-link:focus-visible { outline: 3px solid var(--lh-text); outline-offset: 3px; }

.lh-lead {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	overflow: hidden;
	border-radius: calc(var(--lh-radius) * .6);
	font-size: 1.4rem;
}
.lh-lead img { width: 100%; height: 100%; object-fit: cover; }
.lh-title { padding: 0 6px; }

/* Featured card */
.lh-layout-featured {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
	border-radius: min(var(--lh-radius), 28px);
}
.lh-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lh-layout-featured .lh-title { padding: 14px 16px; }

/* Button styles */
.lh-btn-rounded { --lh-radius: 14px; }
.lh-btn-pill { --lh-radius: 999px; }
.lh-btn-square { --lh-radius: 0px; }
.lh-btn-outline { --lh-radius: 12px; }
.lh-btn-outline .lh-link { background: transparent; color: var(--lh-text); border-color: var(--lh-text); }
.lh-btn-hard { --lh-radius: 8px; }
.lh-btn-hard .lh-link { border-color: var(--lh-btn-text); box-shadow: 4px 4px 0 var(--lh-btn-text); }

/* Attention effects */
@keyframes lh-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes lh-shake {
	0%, 86%, 100% { transform: translateX(0); }
	88% { transform: translateX(-5px); }
	92% { transform: translateX(5px); }
	96% { transform: translateX(-3px); }
}
.lh-anim-pulse { animation: lh-pulse 2s ease-in-out infinite; }
.lh-anim-shake { animation: lh-shake 3.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
	.lh-anim-pulse, .lh-anim-shake { animation: none; }
	.lh-link { transition: none; }
}

.lh-empty { opacity: .75; }
.lh-footer { margin-top: 36px; font-size: .8rem; opacity: .7; }

.lh-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	padding: 10px 16px;
	border-radius: 999px;
	background: #111;
	color: #fff;
	font-size: .9rem;
	opacity: 0;
	transform: translate(-50%, 20px);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.lh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
