/**
 * Funny Name Generator Pro — Public Styles
 *
 * Uses !important + a button reset on key elements because most WordPress
 * themes apply global button styles (rounded gold buttons, borders, etc.)
 * that otherwise override category tabs and copy buttons.
 */

.funny-name-generator {
	--fng-button-color: #f5a623;
	--fng-button-text-color: #1a202c;
	--fng-accent-color: #667eea;
	--fng-tab-bg: #ffffff;
	--fng-tab-border: #e2e8f0;
	--fng-tab-text: #4a5568;
	--fng-row-bg: #f7f7f8;
	--fng-copy-text: #6b7280;

	box-sizing: border-box;
	max-width: 640px;
	margin: 0 auto;
	padding: 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.funny-name-generator *,
.funny-name-generator *::before,
.funny-name-generator *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Button reset — neutralise theme button styles before re-styling     */
/* ------------------------------------------------------------------ */

.funny-name-generator button {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* Category tabs                                                       */
/* ------------------------------------------------------------------ */

.fng-category-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.fng-category-tab {
	padding: 8px 16px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	color: var(--fng-tab-text) !important;
	background: var(--fng-tab-bg) !important;
	background-image: none !important;
	border: 1px solid var(--fng-tab-border) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-decoration: none !important;
	text-transform: none !important;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fng-category-tab:hover {
	border-color: var(--fng-button-color) !important;
	color: #1a202c !important;
	background: var(--fng-tab-bg) !important;
}

.fng-category-tab.is-active {
	background: var(--fng-button-color) !important;
	border-color: var(--fng-button-color) !important;
	color: var(--fng-button-text-color) !important;
}

/* ------------------------------------------------------------------ */
/* Name list                                                            */
/* ------------------------------------------------------------------ */

.fng-list-container {
	margin-bottom: 16px;
	min-height: 60px;
}

.fng-name-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fng-name-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: var(--fng-row-bg);
	border-radius: 10px;
	animation: fng-slide-in 0.35s ease-out both;
}

.fng-name-item:nth-child(2) { animation-delay: 0.05s; }
.fng-name-item:nth-child(3) { animation-delay: 0.10s; }
.fng-name-item:nth-child(4) { animation-delay: 0.15s; }
.fng-name-item:nth-child(5) { animation-delay: 0.20s; }
.fng-name-item:nth-child(n+6) { animation-delay: 0.25s; }

@keyframes fng-slide-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fng-name-text {
	font-size: 17px;
	font-weight: 700;
	color: #1a202c;
}

/* ------------------------------------------------------------------ */
/* Copy button — plain text link style, like the original design       */
/* ------------------------------------------------------------------ */

.fng-copy-btn {
	flex-shrink: 0;
	padding: 4px 6px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	color: var(--fng-copy-text) !important;
	background: transparent !important;
	background-image: none !important;
	border: none !important;
	border-radius: 6px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-decoration: none !important;
	text-transform: none !important;
	transition: color 0.15s ease, background 0.15s ease;
}

.fng-copy-btn:hover {
	color: var(--fng-accent-color) !important;
	background: rgba(0, 0, 0, 0.04) !important;
}

.fng-copy-btn.is-copied {
	color: #38a169 !important;
}

.fng-copy-btn.is-error {
	color: #e53e3e !important;
}

/* ------------------------------------------------------------------ */
/* Generate button                                                      */
/* ------------------------------------------------------------------ */

.fng-generate-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100% !important;
	padding: 16px 24px !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	color: var(--fng-button-text-color) !important;
	background: var(--fng-button-color) !important;
	background-image: none !important;
	border: none !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-decoration: none !important;
	text-transform: none !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.fng-generate-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.fng-generate-btn:active {
	transform: translateY(0);
}

.fng-generate-btn:disabled,
.fng-generate-btn.is-loading {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

.fng-generate-btn .fng-btn-icon {
	font-size: 18px;
	display: inline-block;
}

.fng-generate-btn.is-loading .fng-btn-icon {
	animation: fng-spin 0.9s linear infinite;
}

@keyframes fng-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.fng-empty-state {
	text-align: center;
	color: #a0aec0;
	padding: 20px;
	font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 480px) {
	.funny-name-generator {
		padding: 16px;
		border-radius: 12px;
	}

	.fng-name-item {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		text-align: center;
	}

	.fng-copy-btn {
		align-self: center;
	}

	.fng-generate-btn {
		font-size: 15px !important;
		padding: 14px 20px !important;
	}
}
