/* SnapWordz site-wide modern skin (loaded from includes/header.php on every page).
   Restyles the shared building blocks of the tool pages: page hero (section with h1.title),
   tool card (.contact-form + .grammar-panel), mode select, .main-btn buttons, article
   sections (.section-title), language chips, and re-themes the SEO tools (--tt-* vars).
   The homepage uses its own .swh classes and is not targeted here. */

:root {
	--sw-ink: #0f172a;
	--sw-ink-2: #334155;
	--sw-muted: #64748b;
	--sw-line: #e2e8f0;
	--sw-soft: #f8fafc;
	--sw-brand: #4f46e5;
	--sw-brand-2: #7c3aed;
	--sw-pink: #ed1f57;
	--sw-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .18);

	/* SEO tool theme (seo/content/trending-topics.css) -> brand colours */
	--tt-orange: #6366f1;
	--tt-orange-dark: #4f46e5;
	--tt-purple: #7c3aed;
	--tt-purple-dark: #5b21b6;
	--tt-ink: #0f172a;
	--tt-muted: #64748b;
	--tt-border: #e2e8f0;
	--tt-bg: #f8fafc;
	--tt-radius: 18px;
	--tt-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .18);
}

/* ---------- Page hero: the section that holds the page h1 ---------- */
section.blog-area:has(h1.title) {
	position: relative;
	padding-top: 64px !important;
	padding-bottom: 56px !important;
	background:
		radial-gradient(55% 70% at 8% 0%, rgba(99, 102, 241, .14), transparent 60%),
		radial-gradient(45% 60% at 95% 5%, rgba(249, 115, 22, .10), transparent 60%),
		linear-gradient(180deg, #fbfbff 0%, #fff 75%);
}
section.blog-area:has(h1.title)::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45;
	background-image: linear-gradient(rgba(15, 23, 42, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, .05) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: radial-gradient(60% 45% at 50% 0%, #000 25%, transparent 75%);
	mask-image: radial-gradient(60% 45% at 50% 0%, #000 25%, transparent 75%);
}
section.blog-area:has(h1.title) > .container { position: relative; }
.section-title h1.title {
	font-size: clamp(32px, 4.4vw, 52px) !important;
	font-weight: 800 !important;
	line-height: 1.12 !important;
	letter-spacing: -.025em;
	color: var(--sw-ink) !important;
}
.section-title h1.title + p.text,
.section-title h1.title ~ p.text {
	max-width: 760px;
	margin: 18px auto 0 !important;
	font-size: 17px !important;
	line-height: 1.7 !important;
	color: var(--sw-muted) !important;
}

/* ---------- Tool card (rewriters + grammar tools) ---------- */
.contact-form {
	max-width: 1120px;
	margin: 28px auto 0;
	padding: 26px 26px 30px !important;
	background: #fff;
	border: 1px solid var(--sw-line);
	border-radius: 24px;
	box-shadow: 0 30px 70px -36px rgba(30, 27, 75, .35);
}
.contact-form > center:first-child p,
.contact-form p:has(#wordCount) {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--sw-soft);
	border: 1px solid var(--sw-line);
	font-size: 13.5px !important;
	color: var(--sw-ink-2) !important;
}
.contact-form #wordCount { font-weight: 700; color: var(--sw-brand); }
.contact-form > br, .contact-form > center + br { display: none; }

.grammar-panel { margin-bottom: 18px; }
.grammar-panel-label,
.grammar-panel-head {
	text-align: left !important;
	font-size: 12.5px !important;
	font-weight: 700 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sw-muted) !important;
	background: var(--sw-soft) !important;
	border: 1px solid var(--sw-line) !important;
	border-bottom: 0 !important;
	border-radius: 16px 16px 0 0 !important;
	padding: 12px 18px !important;
}
.grammar-panel .grammar-input,
.grammar-panel .grammar-output,
.grammar-panel textarea.form-control {
	border: 1px solid var(--sw-line) !important;
	border-radius: 0 0 16px 16px !important;
	padding: 16px 18px !important;
	font-size: 15.5px !important;
	line-height: 1.7 !important;
	color: var(--sw-ink) !important;
	background: #fff;
	box-shadow: none !important;
	transition: border-color .2s, box-shadow .2s;
}
.grammar-panel .grammar-input:focus,
.grammar-panel .grammar-output:focus,
.grammar-panel textarea.form-control:focus {
	outline: none;
	border-color: #a5b4fc !important;
	box-shadow: 0 0 0 4px rgba(99, 102, 241, .14) !important;
}
.grammar-panel textarea::placeholder { color: #94a3b8; }

/* Mode select */
#modes,
.contact-form select {
	-webkit-appearance: none;
	appearance: none;
	min-width: 220px;
	height: 48px;
	margin-top: 8px;
	padding: 0 44px 0 16px;
	border: 1px solid var(--sw-line);
	border-radius: 14px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--sw-ink);
	cursor: pointer;
	box-shadow: var(--sw-shadow);
}
#modes:focus, .contact-form select:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99, 102, 241, .14); }
.contact-form center > b:first-child { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--sw-muted); }

/* Buttons */
.blog-area .main-btn.rounded-three,
.blog-area .main-btn.rounded-one,
.tt-btn-submit {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	height: 52px !important;
	line-height: 52px;
	padding: 0 28px !important;
	border-radius: 14px !important;
	font-size: 15.5px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease !important;
}
.blog-area .main-btn.rounded-three,
.tt-btn-submit {
	color: #fff !important;
	border: 0 !important;
	background: linear-gradient(135deg, var(--sw-brand), var(--sw-brand-2)) !important;
	box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .7) !important;
}
.blog-area .main-btn.rounded-three:hover,
.tt-btn-submit:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 16px 30px -12px rgba(79, 70, 229, .8) !important;
	color: #fff !important;
}
.blog-area .main-btn.rounded-one {
	color: var(--sw-ink) !important;
	background: #fff !important;
	border: 1px solid var(--sw-line) !important;
	box-shadow: none !important;
}
.blog-area .main-btn.rounded-one:hover {
	border-color: #c7d2fe !important;
	background: #f5f7ff !important;
	transform: translateY(-2px);
}
.blog-area .main-btn.rounded-three::before, .blog-area .main-btn.rounded-one::before { display: none !important; }

/* SEO tool card + inputs */
.tt-form-card { padding: 30px 30px 26px !important; }
.tt-field input[type="text"],
.tt-field input[type="url"],
.tt-field input:not([type]) {
	width: 100%;
	min-height: 50px;
	padding: 10px 16px !important;
	border: 1px solid var(--sw-line) !important;
	border-radius: 14px !important;
	font-size: 15.5px !important;
	color: var(--sw-ink);
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
}
.tt-field input:focus { outline: none; border-color: #a5b4fc !important; box-shadow: 0 0 0 4px rgba(99, 102, 241, .14) !important; }
.tt-field select:not(.tt-country-select),
.tt-tool .select2-container--default .select2-selection--single { border-width: 1px !important; border-color: var(--sw-line) !important; border-radius: 14px !important; }

/* ---------- Article sections ---------- */
section.blog-area:not(:has(h1.title)) .section-title,
.seo-article .section-title {
	max-width: 880px;
	margin-left: auto;
	margin-right: auto;
}
section.blog-area:not(:has(h1.title)) .section-title h2,
section.blog-area:not(:has(h1.title)) .section-title h3,
.seo-article h2, .seo-article h3 {
	color: var(--sw-ink);
	letter-spacing: -.015em;
}
section.blog-area:not(:has(h1.title)) .section-title h2 {
	font-size: clamp(24px, 2.6vw, 30px) !important;
	font-weight: 700 !important;
	line-height: 1.25;
	margin-bottom: 14px !important;
}
section.blog-area:not(:has(h1.title)) .section-title h3 {
	font-size: 19px !important;
	font-weight: 700 !important;
	line-height: 1.35;
	margin: 22px 0 8px !important;
}
section.blog-area:not(:has(h1.title)) .section-title p.text,
section.blog-area:not(:has(h1.title)) .section-title .text,
section.blog-area:not(:has(h1.title)) .section-title li {
	font-size: 16px !important;
	line-height: 1.8 !important;
	color: var(--sw-ink-2) !important;
}
section.blog-area:not(:has(h1.title)) .section-title a:not(.main-btn) { color: var(--sw-brand); }
section.blog-area:not(:has(h1.title)) .section-title a:not(.main-btn):hover { text-decoration: underline; }
section.blog-area:not(:has(h1.title)) .section-title code {
	padding: 2px 6px; border-radius: 6px; background: #eef2ff; color: #3730a3; font-size: .9em;
}
section.blog-area:not(:has(h1.title)) .section-title table {
	width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden;
	border: 1px solid var(--sw-line); border-radius: 14px; font-size: 15px;
}
section.blog-area:not(:has(h1.title)) .section-title th { background: var(--sw-soft); color: var(--sw-ink); font-weight: 600; }
section.blog-area:not(:has(h1.title)) .section-title th,
section.blog-area:not(:has(h1.title)) .section-title td { padding: 10px 14px; border-bottom: 1px solid var(--sw-line); text-align: left; }
section.blog-area:not(:has(h1.title)) .section-title tr:last-child td { border-bottom: 0; }

/* Divider between consecutive article blocks */
section.blog-area:not(:has(h1.title)) .col-lg-12 + .col-lg-12 > .section-title {
	padding-top: 28px;
	border-top: 1px solid #eef2f7;
}

/* Related-language chips (includes/lang-content.php) */
.lang-related { gap: 10px !important; }
.lang-related a {
	display: inline-flex !important;
	align-items: center;
	padding: 9px 16px !important;
	border: 1px solid var(--sw-line) !important;
	border-radius: 999px !important;
	background: #fff;
	color: var(--sw-ink) !important;
	font-size: 14.5px !important;
	font-weight: 500;
	text-decoration: none !important;
	transition: border-color .2s, transform .2s, box-shadow .2s;
}
.lang-related a:hover { border-color: #a5b4fc !important; transform: translateY(-2px); box-shadow: var(--sw-shadow); }
.lang-related a:last-child { background: var(--sw-ink); border-color: var(--sw-ink) !important; color: #fff !important; }

@media (max-width: 767px) {
	section.blog-area:has(h1.title) { padding-top: 40px !important; padding-bottom: 36px !important; }
	.section-title h1.title + p.text { font-size: 16px !important; }
	.contact-form { padding: 16px 14px 22px !important; border-radius: 20px; margin-top: 18px; }
	.grammar-panel .grammar-input, .grammar-panel .grammar-output, .grammar-panel textarea.form-control { min-height: 220px !important; height: 220px !important; }
	#modes, .contact-form select { width: 100%; min-width: 0; }
	.blog-area .main-btn.rounded-three, .blog-area .main-btn.rounded-one { padding: 0 20px !important; }
	.tt-form-card { padding: 22px 18px 20px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.main-btn, .tt-btn-submit, .lang-related a { transition: none !important; }
}

/* All Rewriters language grid (all-rewriters.php) */
.swr { margin-top: 26px; }
.swr-search { display: flex; align-items: center; gap: 10px; max-width: 560px; height: 56px; margin: 0 auto 26px; padding: 0 16px; background: #fff; border: 1px solid var(--sw-line); border-radius: 16px; box-shadow: var(--sw-shadow); cursor: text; }
.swr-search:focus-within { border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99, 102, 241, .15), var(--sw-shadow); }
.swr-search svg { width: 20px; height: 20px; color: var(--sw-muted); flex: none; }
.swr-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--sw-ink); }
.swr-count { font-size: 13px; color: var(--sw-muted); white-space: nowrap; }
.swr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.swr-grid li[hidden] { display: none; }
.swr-grid a { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border: 1px solid var(--sw-line); border-radius: 14px; background: #fff; color: var(--sw-ink) !important; text-decoration: none !important; transition: border-color .2s, transform .2s, box-shadow .2s; }
.swr-grid a:hover { border-color: #a5b4fc; transform: translateY(-2px); box-shadow: var(--sw-shadow); }
.swr-n { font-size: 14.5px; font-weight: 600; }
.swr-native { font-size: 13.5px; color: var(--sw-muted); white-space: nowrap; }
.swr-empty { text-align: center; color: var(--sw-muted); margin-top: 16px; }
