/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.2
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

:root {
	--flatsome-child-font-sans: "Be Vietnam Pro", sans-serif;

	/* Palette: zinc neutrals + ONE accent (rose). Used everywhere, keep it that way. */
	--fc-ink: #18181b;
	--fc-ink-soft: #27272a;
	--fc-text: #3f3f46;
	--fc-muted: #52525b;
	--fc-subtle: #71717a;
	--fc-line: #e4e4e7;
	--fc-line-strong: #d4d4d8;
	--fc-surface: #ffffff;
	--fc-surface-soft: #fafafa;
	--fc-page-bg: #f4f4f5;
	--fc-accent: #e11d48;
	--fc-accent-hover: #be123c;
	--fc-accent-soft: rgba(225, 29, 72, 0.08);
	--fc-success: #047857;
	--fc-danger: #be123c;

	/* Shape rule: containers 14-28px radius, every clickable pill (badge, tab,
	   status) is fully round, buttons inside the box are 14px. */
	--fc-radius-lg: 28px;
	--fc-radius-md: 18px;
	--fc-radius-sm: 14px;
	--fc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body,
body button,
body input,
body select,
body textarea,
body .button,
body .nav > li > a,
body .nav-dropdown > li > a,
body .mobile-sidebar-levels-2 .nav > li > a,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .uppercase,
body .is-uppercase,
body .heading-font,
body .alt-font {
	font-family: var(--flatsome-child-font-sans) !important;
}

.header--download-template {
	background: #ffffff;
	border-bottom: 1px solid #e4e4e7;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.download-header {
	padding: 12px 0;
}

.download-header__inner {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.download-header__brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	text-decoration: none;
}

.download-header__brand:hover,
.download-header__brand:focus {
	text-decoration: none;
}

.download-header__brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background: var(--fc-ink);
	box-shadow: none;
	color: #fff;
	flex: 0 0 auto;
}

.download-header__brand-icon svg {
	width: 16px;
	height: 16px;
	display: block;
	fill: currentColor;
}

.download-header__brand-text {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	color: #18181b;
	letter-spacing: -0.02em;
}

.download-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

.download-header__menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 36px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.download-header__menu-item,
.download-header__menu > li {
	margin: 0;
}

.download-header__menu-item a,
.download-header__menu > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	color: #52525b;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: color .2s ease;
}

.download-header__menu-item a:hover,
.download-header__menu-item a:focus,
.download-header__menu > li > a:hover,
.download-header__menu > li > a:focus {
	color: #18181b;
}

.download-header__actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex: 0 0 auto;
}

.download-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 4px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #e4e4e7;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(24, 24, 27, 0.04);
	margin-bottom:0;
}

.download-header__toggle span {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 999px;
	background: #3f3f46;
	transition: transform .2s ease, opacity .2s ease;
}

.download-header__lang {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: all .2s ease;
}

.download-header__lang {
	gap: 8px;
	padding: 0 14px;
	border: 1px solid #e4e4e7;
	background: #ffffff;
	color: #3f3f46;
	box-shadow: 0 2px 8px rgba(24, 24, 27, 0.04);
}

.download-header__lang:hover,
.download-header__lang:focus {
	background: #fafafa;
	color: #18181b;
}

.download-header__lang-flag {
	position: relative;
	display: inline-flex;
	width: 16px;
	height: 12px;
	border-radius: 2px;
	background: #d91f26;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
	flex: 0 0 auto;
}

.download-header__lang-flag::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 6px;
	height: 6px;
	background: #ffd84d;
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 35%);
	transform: translate(-50%, -50%);
}

.download-header__lang-caret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: currentColor;
}

.download-header__lang-caret svg {
	width: 14px;
	height: 14px;
	display: block;
	fill: currentColor;
}

.download-header__mobile-panel {
	display: none;
}

.download-header__mobile-nav,
.download-header__mobile-menu,
.download-header__mobile-item,
.download-header__mobile-menu > li {
	display: none;
}

.download-footer {
	border-top: 1px solid #e4e4e7;
	background: #fafafa;
}

.download-footer__inner {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 20px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.download-footer__copyright {
	color: #71717a;
	font-size: 14px;
	line-height: 1.5;
}

.download-footer__nav {
	flex: 0 1 auto;
}

.download-footer__menu {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 38px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.download-footer__menu > li {
	margin: 0;
}

.download-footer__menu > li > a {
	color: #71717a;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	text-decoration: none;
	transition: color .2s ease;
}

.download-footer__menu > li > a:hover,
.download-footer__menu > li > a:focus {
	color: #3f3f46;
}

.instagram-template-shell {
	width: 100%;
}

.instagram-template-panel,
.instagram-template-card,
.instagram-template-faq__item {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #e4e4e7;
	box-shadow: 0 10px 26px rgba(24, 24, 27, 0.04);
}

.instagram-template-content {
	margin-top: 18px;
}

.instagram-template-faq {
	margin-top: 18px;
}

.instagram-template-content__inner {
	padding: 24px 18px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #e4e4e7;
	box-shadow: 0 10px 26px rgba(24, 24, 27, 0.04);
}

.instagram-template-content__inner > :first-child {
	margin-top: 0;
}

.instagram-template-content__inner > :last-child {
	margin-bottom: 0;
}

.instagram-template-content__inner h1,
.instagram-template-content__inner h2,
.instagram-template-content__inner h3,
.instagram-template-content__inner h4,
.instagram-template-content__inner h5,
.instagram-template-content__inner h6 {
	margin: 0;
	color: #18181b;
}

.instagram-template-content__inner h2,
.instagram-template-content__inner h3,
.instagram-template-content__inner h4 {
	margin-bottom: 12px;
}

.instagram-template-content__inner p,
.instagram-template-content__inner li,
.instagram-template-content__inner blockquote,
.instagram-template-content__inner td,
.instagram-template-content__inner th {
	color: #52525b;
	font-size: 14px;
	line-height: 1.7;
}

.instagram-template-content__inner ul,
.instagram-template-content__inner ol {
	margin: 0 0 16px 20px;
}

.instagram-template-content__inner li {
	margin-bottom: 8px;
}

.instagram-template-content__inner img {
	border-radius: 18px;
}

.instagram-template-content__inner .wp-block-group,
.instagram-template-content__inner .wp-block-columns,
.instagram-template-content__inner .wp-block-cover,
.instagram-template-content__inner .wp-block-media-text,
.instagram-template-content__inner .wp-block-table,
.instagram-template-content__inner .wp-block-buttons {
	margin-bottom: 18px;
}

.instagram-template-faq h2 {
	text-align: center;
	margin-bottom: 16px;
	color: #18181b;
}

.instagram-template-faq__list {
	display: grid;
	gap: 12px;
}

.instagram-template-faq__item {
	border-radius: 16px;
	padding: 0;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #e4e4e7;
	box-shadow: 0 10px 26px rgba(24, 24, 27, 0.04);
}

.instagram-template-faq__item summary {
	position: relative;
	padding: 18px 48px 18px 18px;
	cursor: pointer;
	list-style: none;
	font-size: 15px;
	font-weight: 700;
	color: #18181b;
}

.instagram-template-faq__item summary::-webkit-details-marker {
	display: none;
}

.instagram-template-faq__item summary::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 18px;
	transform: translateY(-50%);
	font-size: 22px;
	color: var(--fc-accent);
}

.instagram-template-faq__item[open] summary::after {
	content: "-";
}

.instagram-template-faq__item p {
	margin: 0;
	padding: 0 18px 18px;
	color: #52525b;
	font-size: 14px;
	line-height: 1.7;
}

.flatsome-child-page-template,
.flatsome-child-single-template {
	background: var(--fc-page-bg);
	padding: 28px 0 56px;
}

.flatsome-child-page-shell,
.flatsome-child-single-shell {
	width: 100%;
}

.flatsome-child-page-hero,
.flatsome-child-single-hero {
	position: relative;
	overflow: hidden;
	padding: 30px 18px 24px;
	border: 1px solid #e4e4e7;
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 12px 28px rgba(24, 24, 27, 0.04);
}

.flatsome-child-page-hero__breadcrumbs,
.flatsome-child-single-meta {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin: 0 0 10px;
	color: #71717a;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.flatsome-child-page-hero__breadcrumbs span,
.flatsome-child-page-hero__breadcrumbs a,
.flatsome-child-single-meta span,
.flatsome-child-single-meta a {
	color: inherit;
	text-decoration: none;
}

.flatsome-child-page-title,
.flatsome-child-single-title {
	position: relative;
	z-index: 1;
	margin: 0;
	color: #18181b;
	font-size: 36px;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.04em;
}

.flatsome-child-page-excerpt,
.flatsome-child-single-excerpt {
	position: relative;
	z-index: 1;
	max-width: 860px;
	margin-top: 14px;
	color: #52525b;
	font-size: 15px;
	line-height: 1.75;
}

.flatsome-child-page-excerpt > :first-child,
.flatsome-child-single-excerpt > :first-child {
	margin-top: 0;
}

.flatsome-child-page-excerpt > :last-child,
.flatsome-child-single-excerpt > :last-child {
	margin-bottom: 0;
}

.flatsome-child-page-card,
.flatsome-child-single-card {
	margin-top: 18px;
	padding: 24px 18px;
	border: 1px solid #e4e4e7;
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 12px 28px rgba(24, 24, 27, 0.04);
}

.flatsome-child-page-content,
.flatsome-child-single-content,
.flatsome-child-single-content .entry-content {
	color: #52525b;
	font-size: 15px;
	line-height: 1.8;
}

.flatsome-child-page-content > :first-child,
.flatsome-child-single-content > :first-child,
.flatsome-child-single-content .entry-content > :first-child {
	margin-top: 0;
}

.flatsome-child-page-content > :last-child,
.flatsome-child-single-content > :last-child,
.flatsome-child-single-content .entry-content > :last-child {
	margin-bottom: 0;
}

.flatsome-child-page-content h1,
.flatsome-child-page-content h2,
.flatsome-child-page-content h3,
.flatsome-child-page-content h4,
.flatsome-child-page-content h5,
.flatsome-child-page-content h6,
.flatsome-child-single-content h1,
.flatsome-child-single-content h2,
.flatsome-child-single-content h3,
.flatsome-child-single-content h4,
.flatsome-child-single-content h5,
.flatsome-child-single-content h6 {
	color: #18181b;
}

.flatsome-child-page-content img,
.flatsome-child-single-content img {
	border-radius: 18px;
}

.flatsome-child-single-thumbnail {
	margin-bottom: 22px;
}

.flatsome-child-single-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 20px;
	box-shadow: 0 16px 34px rgba(24, 24, 27, 0.08);
}

.flatsome-child-single-content .blog-share,
.flatsome-child-single-content .entry-author,
.flatsome-child-single-content .entry-meta,
.flatsome-child-single-content .nav-links {
	margin-top: 24px;
}

@media only screen and (min-width: 48em) {
	.flatsome-child-page-template,
	.flatsome-child-single-template {
		padding: 42px 0 80px;
	}

	.flatsome-child-page-shell,
	.flatsome-child-single-shell {
		padding: 0 20px;
	}

	.flatsome-child-page-hero,
	.flatsome-child-single-hero {
		padding: 42px 28px 28px;
	}

	.flatsome-child-page-title,
	.flatsome-child-single-title {
		font-size: 54px;
	}

	.flatsome-child-page-card,
	.flatsome-child-single-card {
		padding: 28px;
	}

	.instagram-template-shell {
		padding: 0 20px;
	}

	.instagram-template-content__inner {
		padding: 28px;
	}
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/

	.download-header {
		padding: 8px 0 0;
	}

	.download-header__inner {
		gap: 10px;
		padding: 0 6px;
		min-height: 56px;
	}

	.download-header__brand {
		flex: 1 1 auto;
		min-width: 0;
		gap: 8px;
	}

	.download-header__brand-icon {
		width: 30px;
		height: 30px;
		border-radius: 9px;
	}

	.download-header__brand-text {
		font-size: 16px;
	}

	.download-header__nav {
		display: none;
	}

	.download-header__actions {
		gap: 8px;
		margin-left: auto;
	}

	.download-header__lang {
		min-height: 32px;
		padding: 0 10px;
		border-radius: 10px;
		gap: 6px;
		margin-bottom: 0;
	}

	.download-header__lang-label {
		display: none;
	}

	.download-header__lang-caret svg {
		width: 12px;
		height: 12px;
	}

	.download-header__toggle {
		display: inline-flex;
	}

	.download-header__toggle[aria-expanded="true"] span:nth-child(1) {
		transform: translateY(6px) rotate(45deg);
	}

	.download-header__toggle[aria-expanded="true"] span:nth-child(2) {
		opacity: 0;
	}

	.download-header__toggle[aria-expanded="true"] span:nth-child(3) {
		transform: translateY(-6px) rotate(-45deg);
	}

	.download-header__mobile-panel {
		display: block;
		margin-top: 10px;
		padding: 0 6px 10px;
	}

	.download-header__mobile-panel[hidden] {
		display: none;
	}

	.download-header__mobile-nav,
	.download-header__mobile-menu,
	.download-header__mobile-item,
	.download-header__mobile-menu > li {
		display: block;
	}

	.download-header__mobile-menu {
		gap: 8px;
		margin: 0;
		padding: 12px;
		list-style: none;
		border: 1px solid #e4e4e7;
		border-radius: 18px 18px 20px 20px;
		background: rgba(255, 255, 255, 0.96);
		box-shadow: 0 12px 28px rgba(24, 24, 27, 0.08);
	}

	.download-header__mobile-item,
	.download-header__mobile-menu > li {
		display: block;
		margin: 0;
	}

	.download-header__mobile-item a,
	.download-header__mobile-menu > li > a {
		display: flex;
		align-items: center;
		min-height: 42px;
		padding: 0 14px;
		border-radius: 12px;
		text-decoration: none;
		font-size: 14px;
		font-weight: 600;
	}

	.download-header__mobile-item a,
	.download-header__mobile-menu > li > a {
		background: #f4f4f5;
		color: #27272a;
	}

	.download-footer__inner {
		padding: 16px 12px 20px;
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.download-footer__menu {
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 10px 18px;
	}

	.flatsome-child-page-title,
	.flatsome-child-single-title {
		font-size: 30px;
	}

	.flatsome-child-page-card,
	.flatsome-child-single-card {
		padding: 22px 16px;
	}

}
/* =====================================================================
 * PAGE DOWNLOAD: HERO (H1, badges, download box, results, tool tabs)
 * ===================================================================== */

.instagram-template-page {
	background: var(--fc-page-bg);
	padding: 16px 0 48px;
}

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

.fc-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	vertical-align: middle;
}

.fc-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius-lg);
	background: var(--fc-surface);
	box-shadow: 0 24px 48px -32px rgba(24, 24, 27, 0.18);
	padding: 28px 16px 20px;
}

/* Dot grid on the right half, fading out toward the text. Decoration only. */
.fc-hero::before {
	content: "";
	position: absolute;
	inset: 0 0 0 auto;
	width: 58%;
	z-index: -1;
	pointer-events: none;
	background-image: radial-gradient(rgba(24, 24, 27, 0.11) 1px, transparent 1.2px);
	background-size: 18px 18px;
	-webkit-mask-image: linear-gradient(to left, #000 10%, transparent 92%);
	mask-image: linear-gradient(to left, #000 10%, transparent 92%);
}

/* Soft accent wash in the top-right corner. */
.fc-hero::after {
	content: "";
	position: absolute;
	top: -160px;
	right: -120px;
	width: 420px;
	height: 420px;
	z-index: -1;
	pointer-events: none;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(225, 29, 72, 0.09), transparent);
}

.fc-hero__inner {
	position: relative;
	max-width: 860px;
}

/* --- H1 --- */
.fc-hero__title {
	margin: 0;
	color: var(--fc-ink);
	font-size: 28px;
	font-weight: 800;
	/* Vietnamese stacks diacritics (Ả, Ẫ): never go below ~1.12 or they clip. */
	line-height: 1.16;
	letter-spacing: -0.028em;
	text-wrap: balance;
}

.fc-hero__brand {
	color: var(--fc-accent);
}

.fc-hero__subtitle {
	margin-top: 12px;
	max-width: 62ch;
	color: var(--fc-muted);
	font-size: 15px;
	line-height: 1.65;
}

.fc-hero__subtitle > :first-child {
	margin-top: 0;
}

.fc-hero__subtitle > :last-child {
	margin-bottom: 0;
}

/* --- Badges (above the box) --- */
.fc-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.fc-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 4px 9px 4px 7px;
	border: 1px solid var(--fc-line);
	border-radius: 999px;
	background: var(--fc-surface-soft);
	color: var(--fc-text);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.fc-badge .fc-icon {
	width: 14px;
	height: 14px;
	color: var(--fc-accent);
}

/* --- Download box --- */
.fc-box {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin: 14px 0 0;
	padding: 8px;
	border: 1.5px solid var(--fc-line-strong);
	border-radius: 22px;
	background: var(--fc-surface);
	box-shadow: 0 1px 0 rgba(24, 24, 27, 0.02), 0 18px 36px -24px rgba(24, 24, 27, 0.22);
	transition: border-color .25s var(--fc-ease), box-shadow .25s var(--fc-ease);
}

.fc-box:focus-within {
	border-color: var(--fc-accent);
	box-shadow: 0 0 0 4px var(--fc-accent-soft), 0 18px 36px -24px rgba(24, 24, 27, 0.22);
}

.fc-box__field {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	height: 56px;
	padding: 0 8px 0 14px;
	border-radius: var(--fc-radius-sm);
	background: var(--fc-surface-soft);
}

.fc-box__icon {
	display: inline-flex;
	color: var(--fc-subtle);
	font-size: 20px;
}

body .fc-box .fc-box__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--fc-ink);
	/* >= 16px: iOS Safari zooms into a focused input below 16px. */
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
}

body .fc-box .fc-box__input:focus {
	outline: none;
	box-shadow: none;
}

.fc-box__input::placeholder {
	color: var(--fc-subtle);
	opacity: 1;
}

body .fc-box .fc-box__paste {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 0 0 auto;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--fc-line);
	border-radius: 10px;
	background: var(--fc-surface);
	color: var(--fc-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
	transition: background-color .2s var(--fc-ease), border-color .2s var(--fc-ease), transform .2s var(--fc-ease);
}

body .fc-box .fc-box__paste .fc-icon {
	font-size: 16px;
}

body .fc-box .fc-box__paste:hover {
	border-color: var(--fc-line-strong);
	background: var(--fc-surface-soft);
}

body .fc-box .fc-box__paste:active {
	transform: scale(0.97);
}

.fc-box__submit,
.fc-box__submit:hover,
.fc-box__submit:focus,
.fc-box__submit:visited {
	color: #ffffff;
	text-decoration: none;
}

.fc-box__submit {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 54px;
	padding: 0 26px;
	border-radius: var(--fc-radius-sm);
	background: var(--fc-ink);
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition: background-color .2s var(--fc-ease), transform .2s var(--fc-ease);
}

.fc-box__submit .fc-icon {
	font-size: 19px;
}

.fc-box__submit:hover {
	background: var(--fc-ink-soft);
}

.fc-box__submit:active {
	transform: scale(0.98);
}

.fc-box__submit:focus-visible {
	outline: 3px solid var(--fc-accent);
	outline-offset: 2px;
}

/* Loading: a light sweep across the button instead of a spinner. */
.fc-box__submit.is-loading {
	pointer-events: none;
	background: var(--fc-ink-soft);
}

.fc-box__submit.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.18) 50%, transparent 80%);
	transform: translateX(-100%);
	animation: fc-sweep 1.2s var(--fc-ease) infinite;
}

@keyframes fc-sweep {
	to {
		transform: translateX(100%);
	}
}

/* --- Results (status, preview, buttons, image grid) --- */
.fc-results {
	display: flex;
	flex-direction: column;
}

.fc-results > * {
	margin-top: 12px;
}

.instagram-template-status[hidden],
.instagram-template-preview[hidden],
.instagram-template-actions[hidden],
.instagram-template-image-grid[hidden] {
	display: none !important;
}

.instagram-template-status {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	padding: 8px 14px;
	border: 1px solid var(--fc-line);
	border-radius: 999px;
	background: var(--fc-surface-soft);
	color: var(--fc-muted);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
}

.instagram-template-status:empty {
	display: none;
}

.instagram-template-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--fc-subtle);
	flex: 0 0 auto;
}

.instagram-template-status.loading {
	color: var(--fc-ink);
}

.instagram-template-status.loading::before {
	width: 12px;
	height: 12px;
	border: 2px solid var(--fc-line-strong);
	border-top-color: var(--fc-accent);
	background: transparent;
	animation: fc-spin .8s linear infinite;
}

.instagram-template-status.success {
	color: var(--fc-success);
	border-color: rgba(4, 120, 87, 0.18);
	background: rgba(4, 120, 87, 0.05);
}

.instagram-template-status.success::before {
	background: var(--fc-success);
}

.instagram-template-status.error {
	color: var(--fc-danger);
	border-color: rgba(190, 18, 60, 0.2);
	background: rgba(190, 18, 60, 0.05);
}

.instagram-template-status.error::before {
	background: var(--fc-danger);
}

@keyframes fc-spin {
	to {
		transform: rotate(360deg);
	}
}

.instagram-template-preview {
	display: grid;
	grid-template-columns: 88px 1fr;
	align-items: center;
	gap: 16px;
	padding: 12px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius-md);
	background: var(--fc-surface-soft);
}

.instagram-template-preview__thumb {
	width: 88px;
	height: 116px;
	border-radius: 12px;
	object-fit: cover;
	background: var(--fc-line);
}

.instagram-template-preview__meta {
	min-width: 0;
}

.instagram-template-preview__author {
	margin-bottom: 4px;
	color: var(--fc-subtle);
	font-size: 13px;
	font-weight: 600;
}

.instagram-template-preview__desc {
	display: -webkit-box;
	overflow: hidden;
	color: var(--fc-ink);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.instagram-template-preview__sub {
	margin-top: 6px;
	color: var(--fc-subtle);
	font-size: 13px;
	line-height: 1.5;
}

.instagram-template-actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 8px;
}

.instagram-template-action-btn,
.instagram-template-image-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	margin: 0;
	padding: 0 20px;
	border: 1px solid var(--fc-line-strong);
	border-radius: var(--fc-radius-sm);
	background: var(--fc-surface);
	color: var(--fc-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color .2s var(--fc-ease), border-color .2s var(--fc-ease), transform .2s var(--fc-ease);
}

.instagram-template-action-btn:hover,
.instagram-template-image-btn:hover {
	border-color: var(--fc-ink);
	color: var(--fc-ink);
}

.instagram-template-action-btn:active,
.instagram-template-image-btn:active {
	transform: scale(0.98);
}

.instagram-template-action-btn--primary,
.instagram-template-action-btn--primary:hover {
	border-color: var(--fc-accent);
	background: var(--fc-accent);
	color: #ffffff;
}

.instagram-template-action-btn--primary:hover {
	border-color: var(--fc-accent-hover);
	background: var(--fc-accent-hover);
}

.instagram-template-image-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.instagram-template-image-card {
	margin: 0;
	padding: 8px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius-md);
	background: var(--fc-surface-soft);
}

.instagram-template-image-card img {
	display: block;
	width: 100%;
	margin-bottom: 8px;
	border-radius: 12px;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	background: var(--fc-line);
}

.instagram-template-image-btn {
	width: 100%;
	min-height: 44px;
	font-size: 14px;
}

/* --- Tool tabs (below the box) --- */
.fc-tabs {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--fc-line);
}

.fc-tabs__list {
	display: flex;
	gap: 8px;
	margin: 0 -16px;
	padding: 2px 16px 4px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-padding-inline: 16px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	/* Fade the edges so it reads as scrollable on phones. */
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
}

.fc-tabs__list::-webkit-scrollbar {
	display: none;
}

.fc-tabs__item {
	flex: 0 0 auto;
	margin: 0;
	scroll-snap-align: start;
}

.fc-tab,
.fc-tab:visited {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 16px 0 12px;
	border: 1px solid var(--fc-line);
	border-radius: 999px;
	background: var(--fc-surface);
	color: var(--fc-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color .2s var(--fc-ease), border-color .2s var(--fc-ease), color .2s var(--fc-ease), transform .2s var(--fc-ease);
}

.fc-tab .fc-icon {
	font-size: 18px;
	color: var(--fc-subtle);
	transition: color .2s var(--fc-ease);
}

.fc-tab:hover,
.fc-tab:focus-visible {
	border-color: var(--fc-line-strong);
	background: var(--fc-surface-soft);
	color: var(--fc-ink);
	text-decoration: none;
}

.fc-tab:hover .fc-icon {
	color: var(--fc-accent);
}

.fc-tab:focus-visible {
	outline: 2px solid var(--fc-accent);
	outline-offset: 2px;
}

.fc-tab:active {
	transform: scale(0.97);
}

.fc-tab.is-current,
.fc-tab.is-current:hover {
	border-color: var(--fc-ink);
	background: var(--fc-ink);
	color: #ffffff;
}

.fc-tab.is-current .fc-icon {
	color: #ffffff;
}

/* --- Entry motion: badges, box and tabs rise in after the H1 (the H1 itself
 * does not animate, so it paints immediately for LCP). --- */
@media (prefers-reduced-motion: no-preference) {
	.fc-badges,
	.fc-box,
	.fc-tabs {
		animation: fc-rise .6s var(--fc-ease) both;
	}

	.fc-badges {
		animation-delay: .05s;
	}

	.fc-box {
		animation-delay: .12s;
	}

	.fc-tabs {
		animation-delay: .2s;
	}

	.fc-badge {
		animation: fc-rise .5s var(--fc-ease) both;
		animation-delay: calc(.05s + var(--fc-i, 0) * 40ms);
	}

	.fc-badge:nth-child(2) { --fc-i: 1; }
	.fc-badge:nth-child(3) { --fc-i: 2; }
	.fc-badge:nth-child(4) { --fc-i: 3; }
	.fc-badge:nth-child(5) { --fc-i: 4; }
	.fc-badge:nth-child(6) { --fc-i: 5; }
}

@media (prefers-reduced-motion: reduce) {
	.fc-box__submit.is-loading::after,
	.instagram-template-status.loading::before {
		animation: none;
	}
}

@keyframes fc-rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* --- Tablet and up --- */
@media only screen and (min-width: 48em) {
	.instagram-template-page {
		padding: 28px 0 72px;
	}

	.fc-hero {
		padding: 52px 48px 32px;
	}

	.fc-hero__title {
		font-size: 44px;
	}

	.fc-hero__subtitle {
		font-size: 16px;
	}

	.fc-badges {
		gap: 8px;
		margin-top: 24px;
	}

	.fc-badge {
		padding: 6px 12px 6px 10px;
		font-size: 13px;
	}

	.fc-badge .fc-icon {
		width: 16px;
		height: 16px;
	}

	.fc-box {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		margin-top: 16px;
		padding: 8px;
	}

	.fc-box__field {
		height: 60px;
	}

	.fc-box__submit {
		height: 60px;
		min-width: 172px;
		padding: 0 30px;
	}

	.instagram-template-image-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.instagram-template-preview {
		grid-template-columns: 96px 1fr;
	}

	.instagram-template-preview__thumb {
		width: 96px;
		height: 128px;
	}

	.fc-tabs__list {
		flex-wrap: wrap;
		margin: 0;
		padding: 0;
		overflow: visible;
		-webkit-mask-image: none;
		mask-image: none;
	}
}

@media only screen and (min-width: 64em) {
	.fc-hero {
		padding: 64px 64px 36px;
	}

	.fc-hero__title {
		font-size: 50px;
	}
}
