/* TextForge Admin Styles
   Modern, clean two-column text tools interface
*/

:root {
	--tf-primary: #2271b1;
	--tf-primary-hover: #135e96;
	--tf-success: #00a32a;
	--tf-bg: #f0f0f1;
	--tf-card: #ffffff;
	--tf-border: #c3c4c7;
	--tf-text: #1d2327;
	--tf-muted: #646970;
	--tf-radius: 8px;
	--tf-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.textforge-wrap {
	max-width: 1400px;
	margin: 20px 20px 40px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header */
.textforge-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--tf-border);
}

.textforge-header h1 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--tf-text);
}

.textforge-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: linear-gradient(135deg, #2271b1, #135e96);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	border-radius: 8px;
	letter-spacing: -0.5px;
}

.textforge-version {
	font-size: 12px;
	font-weight: 500;
	color: var(--tf-muted);
	background: #f0f0f1;
	padding: 2px 8px;
	border-radius: 12px;
}

.textforge-subtitle {
	margin: 4px 0 0;
	color: var(--tf-muted);
	font-size: 13px;
}

/* Tabs */
.textforge-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
	padding: 6px;
	background: var(--tf-card);
	border: 1px solid var(--tf-border);
	border-radius: var(--tf-radius);
	box-shadow: var(--tf-shadow);
}

.textforge-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: none;
	background: transparent;
	color: var(--tf-muted);
	font-size: 13px;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.textforge-tab:hover {
	background: #f0f6fc;
	color: var(--tf-primary);
}

.textforge-tab.active {
	background: var(--tf-primary);
	color: #fff;
}

.textforge-tab .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Main two-column layout */
.textforge-main {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}

/* Single column when Output is hidden (analyzer / find-replace shortcodes) */
.textforge-main.textforge-main--no-output {
	grid-template-columns: 1fr;
}

@media (max-width: 960px) {
	.textforge-main {
		grid-template-columns: 1fr;
	}
}

.textforge-column {
	background: var(--tf-card);
	border: 1px solid var(--tf-border);
	border-radius: var(--tf-radius);
	box-shadow: var(--tf-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.textforge-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: #f6f7f7;
	border-bottom: 1px solid var(--tf-border);
}

.textforge-toolbar-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--tf-muted);
}

.textforge-toolbar-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.textforge-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	font-size: 12px !important;
	height: 30px !important;
	line-height: 1 !important;
	padding: 0 10px !important;
}

.textforge-btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.textforge-textarea {
	width: 100% !important;
	min-height: 320px;
	padding: 14px !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-family: "SF Mono", "Cascadia Code", "Consolas", "Monaco", monospace !important;
	font-size: 13px !important;
	line-height: 1.55 !important;
	resize: vertical;
	background: #fff !important;
	color: var(--tf-text) !important;
}

.textforge-textarea:focus {
	outline: none !important;
	box-shadow: none !important;
}

#tf-output {
	background: #fafbfc !important;
}

.textforge-live-stats {
	display: flex;
	gap: 16px;
	padding: 8px 14px;
	background: #f6f7f7;
	border-top: 1px solid var(--tf-border);
	font-size: 12px;
	color: var(--tf-muted);
}

.textforge-status {
	padding: 6px 14px;
	font-size: 12px;
	color: var(--tf-success);
	min-height: 28px;
	background: #f6f7f7;
	border-top: 1px solid var(--tf-border);
}

/* Panels */
.textforge-panels {
	background: var(--tf-card);
	border: 1px solid var(--tf-border);
	border-radius: var(--tf-radius);
	box-shadow: var(--tf-shadow);
	padding: 20px;
}

.textforge-panel {
	display: none;
}

.textforge-panel.active {
	display: block;
}

.textforge-section {
	margin-bottom: 24px;
}

.textforge-section:last-child {
	margin-bottom: 0;
}

.textforge-section h3 {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tf-text);
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
}

.textforge-btn-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.textforge-btn-grid .button {
	font-size: 13px;
	height: auto;
	padding: 6px 12px;
	line-height: 1.4;
}

.textforge-action:hover {
	border-color: var(--tf-primary);
	color: var(--tf-primary);
}

/* Stats cards */
.textforge-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
}

.stat-card {
	background: #f6f7f7;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 14px;
	text-align: center;
}

.stat-value {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: var(--tf-primary);
	line-height: 1.2;
}

.stat-label {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	color: var(--tf-muted);
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

/* Keyword density */
.textforge-density-wrap {
	margin-top: 8px;
}

.textforge-density-result {
	margin-top: 14px;
	overflow-x: auto;
}

.textforge-density-result table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.textforge-density-result th,
.textforge-density-result td {
	padding: 8px 12px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.textforge-density-result th {
	background: #f6f7f7;
	font-weight: 600;
	color: var(--tf-muted);
	font-size: 11px;
	text-transform: uppercase;
}

.textforge-density-result tr:hover td {
	background: #f0f6fc;
}

.density-bar {
	display: inline-block;
	height: 6px;
	background: var(--tf-primary);
	border-radius: 3px;
	vertical-align: middle;
	margin-right: 6px;
}

/* Find & Replace */
.textforge-find-replace {
	max-width: 560px;
}

.tf-fr-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.tf-fr-row label {
	min-width: 100px;
	font-weight: 500;
	font-size: 13px;
}

.tf-fr-row input[type="text"] {
	flex: 1;
}

.tf-fr-options {
	display: flex;
	gap: 20px;
	margin: 12px 0 16px;
	font-size: 13px;
}

.tf-fr-options label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

/* Footer */
.textforge-footer {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--tf-border);
	text-align: center;
}

.textforge-footer p {
	margin: 0;
	font-size: 12px;
	color: var(--tf-muted);
}

/* Toast / status feedback */
.textforge-status.has-message {
	color: var(--tf-success);
	font-weight: 500;
}

/* Responsive tweaks */
@media (max-width: 782px) {
	.textforge-tabs {
		flex-direction: column;
	}
	.textforge-tab {
		justify-content: flex-start;
	}
	.tf-fr-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.tf-fr-row label {
		min-width: auto;
	}
}

/* Frontend shortcode adjustments */
.textforge-context-frontend {
	margin: 20px 0;
	max-width: 100%;
}

.textforge-context-frontend .textforge-title {
	font-size: 1.4rem;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.textforge-context-frontend .button {
	cursor: pointer;
}

/* Ensure dashicons work on frontend */
.textforge-wrap .dashicons {
	font-family: dashicons !important;
	display: inline-block;
	line-height: 1;
	font-weight: normal;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	text-transform: none;
	text-rendering: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	width: 20px;
	height: 20px;
	font-size: 20px;
	vertical-align: top;
	text-align: center;
}

/* ===== Simple Blank Character UI (game names) ===== */
.tf-blank-wrap {
	max-width: 640px;
	margin: 16px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tf-blank-title {
	margin: 0 0 12px;
	font-size: 1.25rem;
}

.tf-blank-notice {
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-left: 4px solid #2271b1;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 16px;
	color: #1d2327;
}

.tf-blank-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 14px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tf-blank-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
}

.tf-blank-label {
	font-weight: 700;
	font-size: 15px;
	color: #1d2327;
}

.tf-blank-badge {
	font-size: 11px;
	font-weight: 600;
	background: #2271b1;
	color: #fff;
	padding: 3px 10px;
	border-radius: 20px;
	letter-spacing: 0.2px;
}

.tf-blank-badge-alt {
	background: #00a32a;
}

.tf-blank-desc {
	margin: 0 0 12px;
	font-size: 13px;
	color: #50575e;
	line-height: 1.5;
}

.tf-blank-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 8px;
}

.tf-blank-value {
	flex: 1;
	min-width: 0;
	padding: 8px 12px !important;
	font-size: 16px !important;
	border: 1px solid #c3c4c7 !important;
	border-radius: 6px !important;
	background: #f6f7f7 !important;
	letter-spacing: 2px;
	height: 40px !important;
}

.tf-blank-copy {
	height: 40px !important;
	padding: 0 20px !important;
	font-weight: 700 !important;
	font-size: 13px !important;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.tf-blank-tip {
	margin: 0;
	font-size: 12px;
	color: #646970;
	font-style: italic;
}

.tf-blank-status {
	min-height: 24px;
	font-size: 13px;
	font-weight: 600;
	color: #00a32a;
	margin-top: 4px;
}

.tf-blank-status.is-error {
	color: #d63638;
}

/* ==========================================================================
   Font Converter shortcode
   ========================================================================== */
.tf-font-wrap {
	max-width: 640px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tf-font-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
	font-weight: 600;
}

.tf-font-notice {
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
}

.tf-font-notice strong {
	display: block;
	margin-bottom: 4px;
}

.tf-font-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 16px;
	margin-bottom: 12px;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.tf-font-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.tf-font-label {
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
}

.tf-font-desc {
	margin: 0 0 12px;
	font-size: 13px;
	color: #646970;
}

.tf-font-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.tf-font-input {
	max-width: 100%;
}

.tf-font-filename {
	font-size: 13px;
	color: #2271b1;
	font-weight: 500;
}

.tf-font-formats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
}

.tf-font-format {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	cursor: pointer;
	user-select: none;
	color: #1d2327 !important;
}

.tf-font-format input {
	margin: 0;
}

.tf-font-tip {
	margin: 10px 0 0;
	font-size: 12px;
	color: #646970;
	font-style: italic;
}

.tf-font-status {
	min-height: 24px;
	font-size: 13px;
	font-weight: 600;
	color: #00a32a;
	margin-top: 8px;
}

.tf-font-status.is-error {
	color: #d63638;
}

.tf-font-results {
	margin-top: 12px;
}

.tf-font-results .tf-font-dl {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 4px 8px 4px 0;
	padding: 6px 12px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	text-decoration: none;
	color: #2271b1;
	font-size: 13px;
	font-weight: 500;
}

.tf-font-results .tf-font-dl:hover {
	background: #f0f0f1;
	color: #135e96;
}

/* ==========================================================================
   2FA / TOTP Generator shortcode
   ========================================================================== */
.tf-2fa-wrap {
	max-width: 480px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tf-2fa-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
	font-weight: 600;
}

.tf-2fa-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 16px;
	margin-bottom: 12px;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.tf-2fa-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.tf-2fa-label {
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
}

.tf-2fa-desc {
	margin: 0 0 12px;
	font-size: 13px;
	color: #646970;
}

.tf-2fa-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.tf-2fa-secret {
	flex: 1 1 220px;
	min-width: 0;
	height: 40px !important;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 14px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.tf-2fa-generate {
	height: 40px !important;
	padding: 0 16px !important;
	font-weight: 600 !important;
}

.tf-2fa-code-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 8px 0 12px;
}

.tf-2fa-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: 0.35em;
	color: #1d2327;
	line-height: 1.2;
	min-width: 8ch;
}

.tf-2fa-copy {
	height: 40px !important;
	padding: 0 16px !important;
	font-weight: 700 !important;
	white-space: nowrap;
}

.tf-2fa-timer {
	font-size: 13px;
	font-weight: 600;
	color: #2271b1;
	font-variant-numeric: tabular-nums;
}

.tf-2fa-progress-wrap {
	height: 4px;
	background: #dcdcde;
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: 8px;
}

.tf-2fa-progress {
	height: 100%;
	width: 100%;
	background: #2271b1;
	border-radius: 2px;
	transition: width 0.25s linear;
}

.tf-2fa-progress.is-warn {
	background: #dba617;
}

.tf-2fa-progress.is-danger {
	background: #d63638;
}

.tf-2fa-tip {
	margin: 0;
	font-size: 12px;
	color: #646970;
	font-style: italic;
}

.tf-2fa-status {
	min-height: 24px;
	font-size: 13px;
	font-weight: 600;
	color: #00a32a;
	margin-top: 4px;
}

.tf-2fa-status.is-error {
	color: #d63638;
}

/* =====================================================================
 * Anchor / Link Generator
 * ===================================================================== */

.tf-anchor-wrap {
	max-width: 720px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tf-anchor-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
	font-weight: 600;
}

.tf-anchor-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 18px;
	margin-bottom: 14px;
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.tf-anchor-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.tf-anchor-label {
	font-weight: 600;
	font-size: 15px;
	color: #1d2327;
}

.tf-anchor-desc {
	margin: 0 0 14px;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.tf-anchor-fields {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 14px;
}

.tf-anchor-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tf-anchor-field-label {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

.tf-anchor-url,
.tf-anchor-keyword,
.tf-anchor-desc {
	width: 100%;
	height: 40px !important;
	padding: 0 12px !important;
	font-size: 14px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-sizing: border-box;
}

.tf-anchor-url:focus,
.tf-anchor-keyword:focus,
.tf-anchor-desc:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.tf-anchor-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.tf-anchor-get {
	height: 40px !important;
	padding: 0 18px !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
}

.tf-anchor-clear {
	height: 40px !important;
	padding: 0 14px !important;
}

.tf-anchor-results {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tf-anchor-section {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 14px 16px;
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.tf-anchor-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f0f0f1;
}

.tf-anchor-section-title {
	font-weight: 700;
	font-size: 14px;
	color: #1d2327;
	letter-spacing: 0.02em;
}

.tf-anchor-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	background: #e7f5ff;
	color: #2271b1;
}

.tf-anchor-badge-alt {
	background: #f0f6e8;
	color: #3d7a1f;
}

.tf-anchor-result-row {
	margin-bottom: 10px;
}

.tf-anchor-result-row:last-child {
	margin-bottom: 0;
}

.tf-anchor-result-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #646970;
	margin-bottom: 4px;
}

.tf-anchor-result-box {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.tf-anchor-out {
	flex: 1 1 auto;
	min-width: 0;
	height: 38px !important;
	padding: 0 10px !important;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 13px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	color: #1d2327;
	box-sizing: border-box;
}

.tf-anchor-copy {
	height: 38px !important;
	padding: 0 12px !important;
	font-weight: 600 !important;
	white-space: nowrap;
	display: inline-flex !important;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tf-anchor-copy .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	margin-top: 1px;
}

.tf-anchor-copy.is-copied {
	background: #00a32a !important;
	border-color: #008a20 !important;
	color: #fff !important;
	box-shadow: 0 0 0 1px #00a32a;
	pointer-events: none;
}

.tf-anchor-copy.is-copied .dashicons {
	color: #fff !important;
}

.tf-anchor-status {
	min-height: 24px;
	font-size: 13px;
	font-weight: 600;
	color: #00a32a;
	margin-top: 8px;
}

.tf-anchor-status.is-error {
	color: #d63638;
}

@media (max-width: 600px) {
	.tf-anchor-result-box {
		flex-direction: column;
	}
	.tf-anchor-copy {
		width: 100%;
		justify-content: center;
	}
}

/* ==========================================================================
   Dark theme compatibility (Flatsome .dark, etc.)
   Theme rules like .dark label / .dark p / .dark span set color:#fff, which
   makes text invisible inside white tool cards. Force dark text on all
   descendants of every frontend tool wrapper.
   ========================================================================== */

/* --- Catch-all: every text node inside tool wraps stays dark --- */
/* Covers Flatsome .dark label / .dark p / .dark span etc. that force white text */
/* .tf-word-remover intentionally uses white text – excluded via later higher-specificity rules */
.tf-font-wrap,
.tf-font-wrap *:not(.button):not(.button-primary):not(.tf-blank-badge):not(.tf-font-dl),
.tf-blank-wrap,
.tf-blank-wrap *:not(.button):not(.button-primary):not(.tf-blank-badge),
.tf-2fa-wrap,
.tf-2fa-wrap *:not(.button):not(.button-primary),
.tf-anchor-wrap,
.tf-anchor-wrap *:not(.button):not(.button-primary):not(.tf-anchor-copy.is-copied),
.tf-linkmatch-wrap,
.tf-linkmatch-wrap *:not(.button):not(.button-primary):not(.tf-lm-btn-primary),
.textforge-context-frontend:not(.tf-word-remover),
.textforge-context-frontend:not(.tf-word-remover) *:not(.button):not(.button-primary):not(.textforge-tab.active),
.textforge-wrap:not(.tf-word-remover),
.textforge-wrap:not(.tf-word-remover) *:not(.button):not(.button-primary):not(.textforge-tab.active):not(.tf-blank-badge),
.textforge-wrap label,
.tf-fr-row label,
.tf-fr-options label,
.textforge-toolbar-label,
.stat-label,
.tf-font-format {
	color: #1d2327 !important;
}

/* Explicit 2FA elements (highest priority against .dark p/span) */
.tf-2fa-wrap,
.tf-2fa-wrap p,
.tf-2fa-wrap span,
.tf-2fa-wrap label,
.tf-2fa-wrap input,
.tf-2fa-wrap h3,
.tf-2fa-title,
.tf-2fa-label,
.tf-2fa-desc,
.tf-2fa-tip,
.tf-2fa-code,
.tf-2fa-timer,
.tf-2fa-secret,
.tf-2fa-card,
.tf-2fa-card * {
	color: #1d2327 !important;
}

.tf-2fa-timer {
	color: #2271b1 !important;
}

.tf-2fa-status {
	color: #00a32a !important;
}

.tf-2fa-status.is-error {
	color: #d63638 !important;
}

/* Muted secondary text */
.tf-font-desc,
.tf-font-tip,
.tf-blank-desc,
.tf-blank-tip,
.tf-2fa-desc,
.tf-2fa-tip,
.tf-anchor-tip {
	color: #50575e !important;
}

.tf-font-filename,
.tf-2fa-timer {
	color: #2271b1 !important;
}

.tf-font-status,
.tf-blank-status,
.tf-anchor-status {
	color: #00a32a !important;
}

.tf-font-status.is-error,
.tf-blank-status.is-error,
.tf-anchor-status.is-error {
	color: #d63638 !important;
}

/* White text where intended (badges, primary buttons, active tabs) */
.tf-blank-badge,
.tf-2fa-wrap .button-primary,
.tf-2fa-wrap .button.button-primary,
.tf-font-wrap .button-primary,
.tf-blank-wrap .button-primary,
.tf-anchor-wrap .button-primary,
.textforge-context-frontend .textforge-tab.active,
.textforge-wrap .textforge-tab.active,
.textforge-context-frontend .button-primary,
.textforge-wrap .button-primary {
	color: #fff !important;
}

.tf-font-results .tf-font-dl {
	color: #2271b1 !important;
}

.tf-font-results .tf-font-dl:hover {
	color: #135e96 !important;
}

/* Inputs + placeholders inside white cards */
.tf-font-card input,
.tf-font-card select,
.tf-font-card textarea,
.tf-blank-card input,
.tf-blank-card select,
.tf-blank-card textarea,
.tf-2fa-card input,
.tf-2fa-card select,
.tf-2fa-card textarea,
.tf-2fa-secret,
.tf-anchor-card input,
.tf-anchor-card select,
.tf-anchor-card textarea {
	color: #1d2327 !important;
}

.tf-2fa-secret::placeholder,
.tf-font-card input::placeholder,
.tf-blank-card input::placeholder,
.tf-anchor-card input::placeholder {
	color: #98a2b3 !important;
	opacity: 1;
}

/* ==========================================================================
   Social Media Character Counter
   ========================================================================== */

.tf-smc-wrap {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	max-height: none !important;
	height: auto !important;
	overflow: visible !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1d2327;
	box-sizing: border-box;
}

.tf-smc-wrap *,
.tf-smc-wrap *::before,
.tf-smc-wrap *::after {
	box-sizing: border-box;
}

.tf-smc-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1d2327 !important;
}

.tf-smc-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
}

@media (max-width: 780px) {
	.tf-smc-layout {
		grid-template-columns: 1fr;
	}
}

/* Left card */
.tf-smc-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tf-smc-card-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.tf-smc-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: #7c3aed;
	color: #fff;
	flex-shrink: 0;
}

.tf-smc-icon svg {
	display: block;
}

.tf-smc-label {
	font-weight: 600;
	font-size: 0.95rem;
	color: #1d2327 !important;
}

.tf-smc-input {
	width: 100%;
	min-height: 180px;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #1d2327 !important;
	background: #fafafa;
	resize: vertical;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	font-family: inherit;
}

.tf-smc-input:focus {
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
	background: #fff;
}

.tf-smc-input::placeholder {
	color: #98a2b3 !important;
	opacity: 1;
}

.tf-smc-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 14px;
}

@media (max-width: 480px) {
	.tf-smc-stats {
		grid-template-columns: repeat(2, 1fr);
	}
}

.tf-smc-stat {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px 8px;
	text-align: center;
}

.tf-smc-stat-num {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1d2327 !important;
	line-height: 1.2;
}

.tf-smc-stat-label {
	display: block;
	font-size: 0.7rem;
	color: #6b7280 !important;
	margin-top: 2px;
	text-transform: capitalize;
}

.tf-smc-tip {
	margin: 12px 0 0;
	font-size: 0.8rem;
	color: #9ca3af !important;
	text-align: center;
}

/* Right: platforms */
.tf-smc-platforms-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	padding: 0 2px;
}

.tf-smc-platforms-title {
	font-weight: 600;
	font-size: 0.95rem;
	color: #1d2327 !important;
}

.tf-smc-platforms-count {
	font-size: 0.8rem;
	color: #9ca3af !important;
}

.tf-smc-left,
.tf-smc-right {
	max-height: none !important;
	overflow: visible !important;
	height: auto !important;
}

.tf-smc-platforms {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: none !important;
	height: auto !important;
	overflow: visible !important;
	overflow-y: visible !important;
	overflow-x: visible !important;
}

.tf-smc-platform {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px 14px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.tf-smc-platform.is-over {
	border-color: #fca5a5;
	background: #fffafa;
}

.tf-smc-platform-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.tf-smc-platform-name {
	font-weight: 600;
	font-size: 0.875rem;
	color: #1d2327 !important;
}

.tf-smc-platform-status {
	font-size: 0.8rem;
	font-weight: 500;
	color: #059669 !important;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 4px;
}

.tf-smc-platform.is-over .tf-smc-platform-status {
	color: #dc2626 !important;
}

.tf-smc-check {
	font-size: 0.85rem;
	line-height: 1;
}

.tf-smc-platform.is-over .tf-smc-check {
	display: none;
}

.tf-smc-bar-wrap {
	height: 6px;
	background: #f3f4f6;
	border-radius: 99px;
	overflow: hidden;
	margin-bottom: 4px;
}

.tf-smc-bar {
	height: 100%;
	border-radius: 99px;
	background: #7c3aed;
	width: 0%;
	transition: width 0.2s ease, background 0.2s ease;
	max-width: 100%;
}

.tf-smc-platform.is-over .tf-smc-bar {
	background: #ef4444;
	max-width: 100%;
}

.tf-smc-platform-meta {
	font-size: 0.75rem;
	color: #9ca3af !important;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.tf-smc-note {
	color: #d97706 !important;
	font-weight: 500;
}

/* Dark theme safety */
.tf-smc-wrap,
.tf-smc-wrap h3,
.tf-smc-title,
.tf-smc-label,
.tf-smc-platform-name,
.tf-smc-stat-num,
.tf-smc-platforms-title {
	color: #1d2327 !important;
}

.tf-smc-card,
.tf-smc-platform {
	background: #fff !important;
}

.tf-smc-input {
	color: #1d2327 !important;
	background: #fafafa !important;
}

.tf-smc-input:focus {
	background: #fff !important;
}

/* =====================================================================
 * Word Remover [word_remover]
 * ===================================================================== */
.tf-word-remover .tf-wr-layout {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 16px 0;
}

.tf-word-remover .tf-wr-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tf-word-remover .tf-wr-label {
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.02em;
	color: #f0f0f1;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.tf-word-remover .tf-wr-options {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 28px;
	align-items: center;
	padding: 10px 14px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.tf-word-remover .tf-wr-options label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #ffffff !important;
	cursor: pointer;
	user-select: none;
}

.tf-word-remover .tf-wr-options input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #3b82f6;
	cursor: pointer;
}

.tf-word-remover .tf-wr-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 4px;
}

.tf-word-remover .tf-wr-actions .button,
.tf-word-remover .tf-wr-result-bar .button {
	font-size: 14px !important;
	font-weight: 600 !important;
	padding: 10px 22px !important;
	height: auto !important;
	line-height: 1.4 !important;
	border-radius: 6px !important;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tf-word-remover .tf-wr-actions .button:hover,
.tf-word-remover .tf-wr-result-bar .button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.tf-word-remover .tf-wr-remove {
	background: #3b82f6 !important;
	border-color: #3b82f6 !important;
	color: #fff !important;
}

.tf-word-remover .tf-wr-remove:hover {
	background: #2563eb !important;
	border-color: #2563eb !important;
	color: #fff !important;
}

.tf-word-remover .tf-wr-clear {
	background: #60a5fa !important;
	border-color: #60a5fa !important;
	color: #fff !important;
}

.tf-word-remover .tf-wr-clear:hover {
	background: #3b82f6 !important;
	border-color: #3b82f6 !important;
	color: #fff !important;
}

.tf-word-remover .tf-wr-result-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 18px;
	margin-top: 10px;
}

.tf-word-remover .tf-wr-copy {
	background: #3b82f6 !important;
	border-color: #3b82f6 !important;
	color: #fff !important;
}

.tf-word-remover .tf-wr-copy:hover {
	background: #2563eb !important;
	border-color: #2563eb !important;
	color: #fff !important;
}

.tf-word-remover .tf-wr-copy.is-copied {
	background: #00a32a !important;
	border-color: #00a32a !important;
	color: #fff !important;
}

.tf-word-remover .tf-wr-stats {
	font-size: 13px;
	color: #ffffff !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
}

.tf-word-remover .tf-wr-stat {
	font-weight: 700;
	color: #ffffff !important;
}

.tf-word-remover .tf-wr-stat-sep {
	color: #ffffff !important;
	margin: 0 4px;
}

/* Textareas – readable on dark pages */
.tf-word-remover .textforge-textarea {
	background: #fff !important;
	color: #1d2327 !important;
	border: 1px solid #8c8f94 !important;
	border-radius: 6px !important;
}

.tf-word-remover .textforge-textarea:focus {
	border-color: #3b82f6 !important;
	box-shadow: 0 0 0 1px #3b82f6 !important;
	outline: none;
}

/* ==========================================================================
   Link Match Checker [textforge_linkmatch] / [textforge_vip]
   Split from VIP LINKS tab – blue primary buttons
   ========================================================================== */
.tf-linkmatch-wrap {
	max-width: 1100px;
	margin: 0 auto 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tf-linkmatch-wrap .tf-lm-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 14px;
}

@media (max-width: 700px) {
	.tf-linkmatch-wrap .tf-lm-cols {
		grid-template-columns: 1fr;
	}
}

.tf-linkmatch-wrap .tf-lm-card {
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 16px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tf-linkmatch-wrap .tf-lm-card h3 {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327 !important;
}

.tf-linkmatch-wrap .tf-lm-hint {
	margin: 0 0 10px;
	font-size: 13px;
	color: #646970 !important;
	line-height: 1.4;
}

.tf-linkmatch-wrap .tf-lm-ta {
	width: 100%;
	font-family: Consolas, Monaco, "Courier New", monospace;
	font-size: 13px;
	line-height: 1.5;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	resize: vertical;
	box-sizing: border-box;
	background: #fff !important;
	color: #1d2327 !important;
	min-height: 180px;
}

.tf-linkmatch-wrap .tf-lm-ta:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.tf-linkmatch-wrap .tf-lm-ta.tf-lm-ro {
	background: #f6f7f7 !important;
}

.tf-linkmatch-wrap .tf-lm-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 4px 0 14px;
}

.tf-linkmatch-wrap .tf-lm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	line-height: 1.3;
}

/* Primary button – xanh dương (blue) */
.tf-linkmatch-wrap .tf-lm-btn-primary {
	background: #2271b1 !important;
	color: #fff !important;
	border-color: #2271b1 !important;
}

.tf-linkmatch-wrap .tf-lm-btn-primary:hover {
	background: #135e96 !important;
	border-color: #135e96 !important;
	color: #fff !important;
	box-shadow: 0 2px 8px rgba(34, 113, 177, 0.35);
}

.tf-linkmatch-wrap .tf-lm-btn-secondary {
	background: #f6f7f7 !important;
	color: #2c3338 !important;
	border-color: #dcdcde !important;
}

.tf-linkmatch-wrap .tf-lm-btn-secondary:hover {
	background: #f0f0f1 !important;
	border-color: #c3c4c7 !important;
}

.tf-linkmatch-wrap .tf-lm-btn-copy {
	background: #fff !important;
	color: #2271b1 !important;
	border: 1px solid #2271b1 !important;
	padding: 5px 12px;
	font-size: 12px;
}

.tf-linkmatch-wrap .tf-lm-btn-copy:hover {
	background: #f0f6fc !important;
}

.tf-linkmatch-wrap .tf-lm-btn-copy.is-copied {
	background: #00a32a !important;
	border-color: #00a32a !important;
	color: #fff !important;
}

.tf-linkmatch-wrap .tf-lm-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
	margin: 14px 0;
}

.tf-linkmatch-wrap .tf-lm-stat {
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 14px;
	text-align: center;
}

.tf-linkmatch-wrap .tf-lm-stat strong {
	display: block;
	font-size: 24px;
	font-weight: 700;
	color: #1d2327 !important;
	line-height: 1.2;
}

.tf-linkmatch-wrap .tf-lm-stat span {
	font-size: 12px;
	color: #646970 !important;
	margin-top: 4px;
	display: block;
}

.tf-linkmatch-wrap .tf-lm-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	gap: 8px;
	flex-wrap: wrap;
}

.tf-linkmatch-wrap .tf-lm-head h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327 !important;
}

.tf-linkmatch-wrap .tf-lm-results {
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 8px;
}

.tf-linkmatch-wrap .tf-lm-results.is-visible {
	display: grid;
}

@media (max-width: 700px) {
	.tf-linkmatch-wrap .tf-lm-results.is-visible {
		grid-template-columns: 1fr;
	}
}

/* Simple single-action tools — full width */
.tf-simple-tool {
	max-width: 1280px !important;
	width: 100% !important;
	margin: 0 auto 20px;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.tf-simple-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	padding: 18px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	width: 100%;
	box-sizing: border-box;
}
.tf-simple-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327 !important;
	margin: 0 0 6px;
}
.tf-simple-input,
.tf-simple-output {
	width: 100% !important;
	min-height: 160px;
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.5;
	font-family: Consolas, Monaco, monospace;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	box-sizing: border-box;
	resize: vertical;
	background: #fff !important;
	color: #1d2327 !important;
}
.tf-simple-output { background: #f6f7f7 !important; }
.tf-simple-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}
.tf-simple-actions,
.tf-simple-out-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 12px 0 16px;
}
.tf-simple-out-actions { margin: 10px 0 0; }
.tf-simple-tool .button-primary,
.tf-simple-run,
.tf-simple-copy,
.tf-simple-clear {
	background: #2271b1 !important;
	border-color: #2271b1 !important;
	color: #fff !important;
	font-weight: 600 !important;
	padding: 8px 18px !important;
	height: auto !important;
	min-height: 38px;
	border-radius: 6px !important;
}
.tf-simple-tool .button-primary:hover,
.tf-simple-run:hover,
.tf-simple-copy:hover,
.tf-simple-clear:hover {
	background: #135e96 !important;
	border-color: #135e96 !important;
	color: #fff !important;
}
.tf-simple-status {
	min-height: 22px;
	margin: 10px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #00a32a;
}
.tf-simple-status.is-error { color: #d63638; }
.tf-simple-tool,
.tf-simple-tool *:not(.button):not(.button-primary):not(.tf-simple-run):not(.tf-simple-copy):not(.tf-simple-clear) {
	color: #1d2327 !important;
}
.tf-simple-run,
.tf-simple-copy,
.tf-simple-clear,
.tf-simple-tool .button-primary {
	color: #fff !important;
}

/* Text tools multi-button grid [textforge_texttools] */
.tf-texttools .tf-tt-btn-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 14px 0 10px;
}
.tf-texttools .tf-tt-btn,
.tf-texttools .tf-tt-clear,
.tf-texttools .tf-tt-copy {
	background: #2271b1 !important;
	border-color: #2271b1 !important;
	color: #fff !important;
	font-weight: 600 !important;
	padding: 10px 16px !important;
	height: auto !important;
	min-height: 40px;
	border-radius: 6px !important;
	cursor: pointer;
}
.tf-texttools .tf-tt-btn:hover,
.tf-texttools .tf-tt-clear:hover,
.tf-texttools .tf-tt-copy:hover {
	background: #135e96 !important;
	border-color: #135e96 !important;
	color: #fff !important;
}
.tf-texttools .tf-tt-btn-grid .tf-tt-btn {
	flex: 1 1 auto;
	min-width: 140px;
	text-align: center;
	justify-content: center;
}
@media (max-width: 600px) {
	.tf-texttools .tf-tt-btn-grid .tf-tt-btn {
		flex: 1 1 100%;
	}
}
