/* Fancy Text Generator — full-width + Kadence + stylish colors */

/* ── Kadence & theme reset ────────────────────────────────── */

body.ftg-active .entry-content,
body.ftg-active .content-wrap,
body.ftg-active .kadence-entry-content,
body.ftg-active .wp-block-post-content {
	overflow: visible !important;
}

.entry-content .ftg-wrapper,
.content-wrap .ftg-wrapper,
.kadence-entry-content .ftg-wrapper,
.wp-block-post-content .ftg-wrapper,
.site-main .ftg-wrapper {
	clear: both;
}

.ftg-wrapper h2.ftg-title,
.ftg-wrapper p.ftg-subtitle,
.ftg-wrapper label.ftg-label,
.ftg-wrapper span.ftg-categories-label {
	margin-top: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
	line-height: 1.5 !important;
	text-transform: none !important;
	letter-spacing: normal;
}

.ftg-wrapper input.ftg-input,
.ftg-wrapper input.ftg-search {
	font-family: inherit !important;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.ftg-wrapper button.ftg-category,
.ftg-wrapper button.ftg-copy-btn,
.ftg-wrapper button.ftg-load-more {
	font-family: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: normal !important;
}

/* ── Full-width wrapper ───────────────────────────────────── */

.ftg-wrapper {
	box-sizing: border-box;
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	max-width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #111827;
	background: linear-gradient(180deg, #fdf2f8 0%, #f0f9ff 35%, #f9fafb 100%);
	border: none;
	border-radius: 0;
	box-shadow: none;
	overflow-x: hidden;
}

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

.ftg-inner {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 2.5rem;
}

/* ── Header — gradient title ──────────────────────────────── */

.ftg-header {
	margin-bottom: 1.5rem;
	text-align: center;
}

.ftg-title {
	margin: 0 0 0.5rem !important;
	padding: 0 !important;
	font-size: clamp(1.75rem, 4.5vw, 2.75rem) !important;
	font-weight: 900 !important;
	background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 35%, #3b82f6 65%, #06b6d4 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	color: transparent !important;
	letter-spacing: -0.02em;
}

.ftg-subtitle {
	margin: 0 auto !important;
	max-width: 680px;
	font-size: clamp(0.9rem, 2.5vw, 1.05rem);
	color: #64748b !important;
}

/* ── Input section ────────────────────────────────────────── */

.ftg-input-section {
	background: #ffffff;
	border: 2px solid transparent;
	border-radius: 16px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.25rem;
	box-shadow: 0 4px 24px rgba(139, 92, 246, 0.1);
	background-clip: padding-box;
	position: relative;
}

.ftg-input-section::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 16px;
	padding: 2px;
	background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6, #06b6d4);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.ftg-label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: #7c3aed !important;
}

.ftg-input {
	display: block;
	width: 100%;
	padding: 1rem 1.15rem;
	font-size: clamp(1.05rem, 3vw, 1.35rem);
	font-weight: 600;
	color: #1e1b4b !important;
	background: #faf5ff !important;
	border: 2px solid #ddd6fe !important;
	border-radius: 12px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ftg-input:focus {
	background: #ffffff !important;
	border-color: #8b5cf6 !important;
	box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15) !important;
}

.ftg-input-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.5rem;
	gap: 0.75rem;
}

.ftg-char-count {
	font-size: 0.8rem;
	color: #a78bfa;
	flex-shrink: 0;
	font-weight: 600;
}

/* ── Toolbar ──────────────────────────────────────────────── */

.ftg-toolbar {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1rem;
	align-items: end;
	margin-bottom: 1rem;
}

.ftg-search-wrap {
	min-width: 0;
}

.ftg-search {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem 0.75rem 2.5rem;
	font-size: 0.95rem;
	color: #1e1b4b !important;
	background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238b5cf6' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 0.85rem center !important;
	border: 2px solid #e9d5ff !important;
	border-radius: 12px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ftg-search:focus {
	border-color: #8b5cf6 !important;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12) !important;
}

.ftg-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.15rem;
	font-size: 0.875rem;
	font-weight: 800;
	color: #ffffff !important;
	background: linear-gradient(135deg, #ec4899, #8b5cf6);
	border: none;
	border-radius: 12px;
	white-space: nowrap;
	flex-shrink: 0;
	box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.ftg-meta span {
	font-size: 1.1rem;
	margin-right: 0.2rem;
	color: #ffffff !important;
}

/* ── Categories ───────────────────────────────────────────── */

.ftg-categories-wrap {
	margin-bottom: 1.25rem;
	overflow: hidden;
}

.ftg-categories-label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.8rem;
	font-weight: 700;
	color: #8b5cf6 !important;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.ftg-categories {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.45rem;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 0.35rem;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #c4b5fd transparent;
}

.ftg-categories::-webkit-scrollbar {
	height: 4px;
}

.ftg-categories::-webkit-scrollbar-thumb {
	background: #c4b5fd;
	border-radius: 4px;
}

.ftg-category {
	flex-shrink: 0;
	padding: 0.55rem 1rem;
	min-height: 44px;
	font-size: 0.85rem;
	font-weight: 700;
	color: #6b21a8 !important;
	background: #ffffff !important;
	border: 2px solid #e9d5ff !important;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
	touch-action: manipulation;
}

.ftg-category:hover {
	background: #faf5ff !important;
	border-color: #c4b5fd !important;
	color: #581c87 !important;
}

.ftg-category--active {
	color: #ffffff !important;
	border-color: transparent !important;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.ftg-category[data-category="all"].ftg-category--active {
	background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
}

.ftg-category[data-category="star"].ftg-category--active {
	background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
}

.ftg-category[data-category="heart"].ftg-category--active {
	background: linear-gradient(135deg, #ec4899, #f43f5e) !important;
}

.ftg-category[data-category="flower"].ftg-category--active {
	background: linear-gradient(135deg, #10b981, #059669) !important;
}

.ftg-category[data-category="bracket"].ftg-category--active {
	background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
}

.ftg-category[data-category="gaming"].ftg-category--active {
	background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.ftg-category[data-category="weather"].ftg-category--active {
	background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
}

.ftg-category[data-category="emoji"].ftg-category--active {
	background: linear-gradient(135deg, #f97316, #eab308) !important;
}

.ftg-category[data-category="arrow"].ftg-category--active {
	background: linear-gradient(135deg, #14b8a6, #0d9488) !important;
}

.ftg-category[data-category="dots"].ftg-category--active {
	background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
}

.ftg-category[data-category="fonts"].ftg-category--active {
	background: linear-gradient(135deg, #a855f7, #9333ea) !important;
}

.ftg-category[data-category="transform"].ftg-category--active {
	background: linear-gradient(135deg, #d946ef, #c026d3) !important;
}

/* ── Results — colorful stylish text ──────────────────────── */

.ftg-results {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	width: 100%;
}

.ftg-result-row {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 1rem;
	width: 100%;
	padding: 0.9rem 1.15rem;
	background: #ffffff;
	border: 1px solid #e9d5ff;
	border-radius: 12px;
	border-left-width: 4px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ftg-result-row:hover {
	box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12);
	transform: translateY(-1px);
}

.ftg-row-star    { border-left-color: #f59e0b; }
.ftg-row-heart   { border-left-color: #ec4899; }
.ftg-row-flower  { border-left-color: #10b981; }
.ftg-row-bracket { border-left-color: #8b5cf6; }
.ftg-row-gaming  { border-left-color: #ef4444; }
.ftg-row-weather { border-left-color: #0ea5e9; }
.ftg-row-emoji   { border-left-color: #f97316; }
.ftg-row-arrow   { border-left-color: #14b8a6; }
.ftg-row-dots    { border-left-color: #6366f1; }
.ftg-row-fonts   { border-left-color: #a855f7; }
.ftg-row-transform { border-left-color: #d946ef; }

.ftg-result-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.ftg-result-name {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.ftg-name-star    { color: #d97706 !important; }
.ftg-name-heart   { color: #db2777 !important; }
.ftg-name-flower  { color: #059669 !important; }
.ftg-name-bracket { color: #7c3aed !important; }
.ftg-name-gaming  { color: #dc2626 !important; }
.ftg-name-weather { color: #0284c7 !important; }
.ftg-name-emoji   { color: #ea580c !important; }
.ftg-name-arrow   { color: #0d9488 !important; }
.ftg-name-dots    { color: #4f46e5 !important; }
.ftg-name-fonts   { color: #9333ea !important; }
.ftg-name-transform { color: #c026d3 !important; }

.ftg-result-text {
	font-size: clamp(1.05rem, 2.8vw, 1.35rem);
	font-weight: 700;
	word-break: break-word;
	overflow-wrap: anywhere;
	line-height: 1.5;
	letter-spacing: 0.01em;
}

/* Stylish per-category text colors + glow */
.ftg-text-star {
	color: #b45309 !important;
	text-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.ftg-text-heart {
	color: #be185d !important;
	text-shadow: 0 0 20px rgba(236, 72, 153, 0.25);
}

.ftg-text-flower {
	color: #047857 !important;
	text-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.ftg-text-bracket {
	color: #6d28d9 !important;
	text-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.ftg-text-gaming {
	color: #b91c1c !important;
	text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.ftg-text-weather {
	color: #0369a1 !important;
	text-shadow: 0 0 20px rgba(14, 165, 233, 0.25);
}

.ftg-text-emoji {
	color: #c2410c !important;
	text-shadow: 0 0 20px rgba(249, 115, 22, 0.25);
}

.ftg-text-arrow {
	color: #0f766e !important;
	text-shadow: 0 0 20px rgba(20, 184, 166, 0.25);
}

.ftg-text-dots {
	color: #4338ca !important;
	text-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.ftg-text-fonts {
	color: #7e22ce !important;
	text-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.ftg-text-transform {
	color: #a21caf !important;
	text-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
}

/* ── Copy button — colorful ───────────────────────────────── */

.ftg-copy-btn {
	flex-shrink: 0;
	min-width: 88px;
	min-height: 44px;
	padding: 0.55rem 1.15rem;
	font-size: 0.875rem;
	font-weight: 800;
	color: #ffffff !important;
	background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
	border: none !important;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.15s ease;
	touch-action: manipulation;
	box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

.ftg-copy-btn:hover {
	background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
	color: #ffffff !important;
	box-shadow: 0 5px 16px rgba(99, 102, 241, 0.4);
}

.ftg-copy-btn:active {
	transform: scale(0.97);
}

.ftg-copy-btn--copied {
	background: linear-gradient(135deg, #22c55e, #16a34a) !important;
	box-shadow: 0 3px 10px rgba(34, 197, 94, 0.4) !important;
}

/* ── Load more ────────────────────────────────────────────── */

.ftg-load-more-wrap {
	margin-top: 1.5rem;
	text-align: center;
	padding-bottom: 0.5rem;
}

.ftg-load-more {
	min-height: 50px;
	padding: 0.8rem 2.25rem;
	font-size: 1rem;
	font-weight: 800;
	color: #ffffff !important;
	background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6) !important;
	border: none !important;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.15s ease;
	touch-action: manipulation;
	box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.ftg-load-more:hover {
	background: linear-gradient(135deg, #db2777, #7c3aed, #2563eb) !important;
	box-shadow: 0 8px 28px rgba(139, 92, 246, 0.45);
}

.ftg-load-more:active {
	transform: scale(0.98);
}

.ftg-empty {
	padding: 3rem 1.5rem;
	text-align: center;
	font-size: 1rem;
	color: #a78bfa;
	background: #ffffff;
	border: 2px dashed #ddd6fe;
	border-radius: 12px;
}

/* ── Kadence-specific overrides ───────────────────────────── */

body.ftg-active.kadence-theme .content-bg,
body.ftg-active .content-bg.loop-entry {
	background: transparent;
}

body.ftg-active .entry-content > .ftg-wrapper:first-child,
body.ftg-active .kadence-entry-content > .ftg-wrapper:first-child {
	margin-top: 0;
}

body.ftg-active .content-container.container,
body.ftg-active .site-container {
	overflow-x: visible;
}

/* Kadence narrow content — force full bleed */
.content-width-narrow .ftg-wrapper,
.content-width-normal .ftg-wrapper,
.content-width-fullwidth .ftg-wrapper {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	left: auto !important;
	right: auto !important;
	position: relative !important;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (min-width: 768px) {
	.ftg-inner {
		padding: 2rem 2rem 3rem;
	}

	.ftg-categories {
		flex-wrap: wrap;
		overflow-x: visible;
	}

	.ftg-category {
		flex-shrink: 1;
	}
}

@media (min-width: 1024px) {
	.ftg-inner {
		padding: 2.5rem 2.5rem 3.5rem;
	}

	.ftg-input-section {
		padding: 1.5rem 2rem;
	}

	.ftg-result-row {
		padding: 1rem 1.5rem;
	}
}

@media (max-width: 640px) {
	.ftg-inner {
		padding: 1rem 0.85rem 2rem;
	}

	.ftg-input-section {
		padding: 1rem;
		border-radius: 12px;
	}

	.ftg-toolbar {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.ftg-meta {
		justify-content: center;
		width: 100%;
	}

	.ftg-result-row {
		grid-template-columns: 1fr;
		gap: 0.65rem;
		padding: 0.85rem 1rem;
	}

	.ftg-copy-btn {
		width: 100%;
		min-height: 48px;
		font-size: 0.95rem;
	}

	.ftg-category {
		font-size: 0.8rem;
		padding: 0.5rem 0.85rem;
	}
}

@media (max-width: 380px) {
	.ftg-inner {
		padding: 0.75rem 0.65rem 1.5rem;
	}
}
