/**
 * Simple LinkTree - frontend styles
 * Standalone styling controlled entirely from Settings > LinkTree
 * (background, font, text color, link colors) -- not inherited from the
 * active theme, so the page looks the same everywhere it's used.
 */

.ll-linktree-page {
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 3rem;
	text-align: center;

	color: var(--ll-text, #ffffff);
	font-family: var(--ll-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
	border-radius: 20px;
}

.ll-linktree-page * {
	box-sizing: border-box;
}

.ll-avatar {
	margin: 0 auto 1rem;
	width: 96px;
	height: 96px;
}

.ll-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ll-avatar-circle .ll-avatar img {
	border-radius: 50%;
}

.ll-avatar-square .ll-avatar img {
	border-radius: 14px;
}

.ll-name {
	font-size: 1.5rem;
	line-height: 1.3;
	margin: 0 0 0.4rem;
	font-family: inherit;
	color: inherit;
}

.ll-bio {
	margin: 0 auto 1.25rem;
	max-width: 40em;
	opacity: 0.8;
	line-height: 1.5;
	font-family: inherit;
	color: inherit;
}

/* Social icon row (shown under the bio) */

.ll-social-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin: 0 0 1.75rem;
}

.ll-social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ll-social-size, 40px);
	height: var(--ll-social-size, 40px);
	font-size: calc(var(--ll-social-size, 40px) * 0.45);
	border-radius: 50%;
	background: transparent;
	border: 2px solid var(--ll-social-color, currentColor);
	color: var(--ll-social-color, currentColor);
	text-decoration: none;
	transition: color 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

/* Shared sizing for all three icon systems (Dashicons, Font Awesome, plain
 * text/emoji) so swapping between them doesn't change layout. */
.ll-icon-glyph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	font-size: 1em;
	line-height: 1;
}

.ll-social-icon:hover,
.ll-social-icon:focus {
	border-color: var(--ll-social-hover-color, var(--ll-social-color));
	color: var(--ll-social-hover-color, var(--ll-social-color));
	transform: translateY(-1px);
	text-decoration: none;
}

/* Browsers (and many themes) apply a special muted color to already-clicked
 * links via :visited, which can otherwise silently override the color above
 * once someone has clicked a social icon. :visited only allows a handful of
 * color-related properties to be styled, so this targets exactly those and
 * uses !important as a deliberate, narrow override -- this is a standalone-
 * styled component and visited-state theme CSS should never leak into it. */
.ll-social-icon:visited {
	color: var(--ll-social-color, currentColor) !important;
	border-color: var(--ll-social-color, currentColor) !important;
}

.ll-social-icon:visited:hover,
.ll-social-icon:visited:focus {
	color: var(--ll-social-hover-color, var(--ll-social-color)) !important;
	border-color: var(--ll-social-hover-color, var(--ll-social-color)) !important;
}

.ll-link-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ll-link-item {
	margin: 0;
}

.ll-link-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.85rem 1.25rem;
	text-decoration: none;
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.3;
	transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
	font-family: inherit;
}

/* Fill variants (must come before :hover below -- equal specificity means
 * source order decides, and the hover state needs to win over these). */
.ll-fill-outline .ll-link-btn {
	background: transparent;
	color: var(--ll-link-text, var(--ll-accent));
}

.ll-fill-solid .ll-link-btn {
	background: var(--ll-accent);
	color: var(--ll-link-text, #fff);
}

/* Same :visited safety net as the social icons above -- without this, a
 * clicked link's text can silently revert to the browser/theme default
 * visited-link color instead of the configured Link Text Color. */
.ll-fill-outline .ll-link-btn:visited {
	color: var(--ll-link-text, var(--ll-accent)) !important;
}

.ll-fill-solid .ll-link-btn:visited {
	color: var(--ll-link-text, #fff) !important;
}

/* Shape variants */
.ll-style-rounded .ll-link-btn {
	border-radius: 10px;
}

.ll-style-pill .ll-link-btn {
	border-radius: 999px;
}

.ll-style-square .ll-link-btn {
	border-radius: 0;
}

/* Hover: background + text only. Border color is intentionally left alone
 * (it stays whatever the base/fill rule set it to) so hover doesn't read as
 * "just the border changed." This rule must come after the fill/shape
 * variants above so it correctly overrides them on hover. */
.ll-link-btn:hover,
.ll-link-btn:focus {
	transform: translateY(-1px);
	text-decoration: none;
	background: var(--ll-hover-bg);
	color: var(--ll-hover-text);
}

/* The :visited overrides above use !important (see comment there), which
 * would otherwise also block the hover-text color from applying once a
 * link has been clicked. This restores hover behavior for visited links. */
.ll-link-btn:visited:hover,
.ll-link-btn:visited:focus {
	color: var(--ll-hover-text) !important;
}

.ll-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 1.1em;
}

.ll-empty {
	opacity: 0.6;
	font-style: italic;
}

/* Embed blocks (YouTube video, external shortcodes like tour dates) */

.ll-item-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ll-embed-block {
	text-align: left;
}

.ll-embed-youtube .ll-video-wrap {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
	border-radius: 10px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.05);
}

.ll-embed-youtube .ll-video-wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ll-embed-caption {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	opacity: 0.75;
	text-align: center;
	color: inherit;
}

/* Shortcode embeds (e.g. a tour dates plugin) inherit theme styling by
 * default since we don't reset their markup -- this just ensures sane
 * spacing/width inside the LinkTree column. */
.ll-embed-shortcode {
	width: 100%;
}

/* Footer copyright line */
.ll-copyright {
	margin: 2.5rem 0 0;
	font-size: 0.8rem;
	opacity: 0.55;
	color: inherit;
	font-family: inherit;
}

/* Responsive width: phones use the full available width regardless of the
 * configured Page Max Width, which only applies at tablet/desktop sizes. */
@media (max-width: 480px) {
	.ll-linktree-page {
		padding: 1.75rem 1rem 2.5rem;
		max-width: 100% !important;
	}
}
