/**
 * FashionNewsGF Tools — shared chrome for every native tool.
 * Scoped under .fngf-tool so it cannot leak into the theme.
 * (.fngf-amazon-module / .fngf-card-grid live in the GeneratePress child
 * theme's style.css since they're also used outside tool results.)
 */

.fngf-tool {
	--fngf-accent: #ce181e;
	--fngf-accent-dark: #a01216;
	--fngf-accent-050: #fdf2f2;
	--fngf-accent-100: #fbdcdd;
	--fngf-ink: #1f2937;
	--fngf-muted: #4b5563;
	--fngf-line: #e5e7eb;
	--fngf-card: #ffffff;
	--fngf-radius: 14px;

	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--fngf-ink);
	line-height: 1.6;
	max-width: 760px;
	margin: 0 auto;
}

.fngf-tool, .fngf-tool *, .fngf-tool *::before, .fngf-tool *::after { box-sizing: border-box; }
.fngf-tool h1, .fngf-tool h2, .fngf-tool h3, .fngf-tool p, .fngf-tool ul, .fngf-tool ol { margin: 0; padding: 0; }
.fngf-tool ul, .fngf-tool ol { list-style: none; }
.fngf-tool [hidden] { display: none !important; }

/* ── Form card ── */
.fngf-tool-card {
	background: var(--fngf-card);
	border: 1px solid var(--fngf-line);
	border-radius: var(--fngf-radius);
	padding: 28px;
	box-shadow: 0 4px 20px rgba(0,0,0,.05);
}
.fngf-tool-card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.fngf-tool-card-sub { color: var(--fngf-muted); font-size: .9rem; margin-bottom: 20px; }

.fngf-field { margin-bottom: 18px; }
.fngf-field-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--fngf-muted);
	margin-bottom: 7px;
}
.fngf-field-hint { font-weight: 400; text-transform: none; color: #9ca3af; letter-spacing: 0; }

.fngf-input, .fngf-select, .fngf-textarea {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1.5px solid var(--fngf-line);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14.5px;
	color: var(--fngf-ink);
	background: #fafafa;
	outline: none;
	transition: border-color .15s, background .15s;
}
.fngf-textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.fngf-input:focus, .fngf-select:focus, .fngf-textarea:focus {
	border-color: var(--fngf-accent);
	background: #fff;
}
.fngf-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
	cursor: pointer;
}

/* Pill radio/checkbox groups */
.fngf-pill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.fngf-pill { position: relative; }
.fngf-pill input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.fngf-pill label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border: 1.5px solid var(--fngf-line);
	border-radius: 100px;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s, background .15s, color .15s;
}
.fngf-pill input:checked + label {
	border-color: var(--fngf-accent);
	background: var(--fngf-accent-050);
	color: var(--fngf-accent-dark);
	font-weight: 700;
}
.fngf-pill input:focus-visible + label { outline: 2px solid var(--fngf-accent); outline-offset: 2px; }

.fngf-submit-btn {
	width: 100%;
	height: 48px;
	margin-top: 6px;
	background: linear-gradient(135deg, var(--fngf-accent-dark), var(--fngf-accent));
	color: #fff;
	border: none;
	border-radius: 10px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .15s, box-shadow .15s, opacity .15s;
	box-shadow: 0 4px 14px rgba(206,24,30,.3);
}
.fngf-submit-btn:hover { transform: translateY(-1px); }
.fngf-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Loading ── */
.fngf-tool-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 44px 0; }
.fngf-tool-spinner {
	width: 42px; height: 42px;
	border: 4px solid var(--fngf-accent-100);
	border-top-color: var(--fngf-accent);
	border-radius: 50%;
	animation: fngf-tool-spin .8s linear infinite;
}
.fngf-tool-loading-text { color: var(--fngf-accent-dark); font-weight: 600; font-size: .92rem; }
@keyframes fngf-tool-spin { to { transform: rotate(360deg); } }

/* ── Results / errors ── */
.fngf-tool-results { margin-top: 26px; }
.fngf-tool-error {
	background: #fef2f2;
	border: 1.5px solid #fecaca;
	color: #b91c1c;
	border-radius: 10px;
	padding: 14px 18px;
	font-size: .9rem;
}
.fngf-tool-recalc { text-align: center; margin-top: 18px; }
.fngf-tool-recalc-btn {
	background: none;
	border: 1.5px solid var(--fngf-line);
	border-radius: 100px;
	color: var(--fngf-muted);
	font: inherit;
	font-size: .85rem;
	font-weight: 600;
	padding: 9px 20px;
	cursor: pointer;
}
.fngf-tool-recalc-btn:hover { border-color: var(--fngf-accent); color: var(--fngf-accent-dark); }

/* AI result content structural defaults */
.fngf-tool-result-body h2, .fngf-tool-result-body h3 {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 20px 0 10px;
	padding-bottom: 8px;
	border-bottom: 1.5px solid var(--fngf-accent-100);
}
.fngf-tool-result-body ul { list-style: disc; margin-left: 1.2em; margin-bottom: 10px; }
.fngf-tool-result-body li { margin-bottom: 4px; }
.fngf-tool-result-body p { margin-bottom: 10px; color: var(--fngf-muted); }

@media (max-width: 520px) {
	.fngf-tool-card { padding: 20px; }
}
