/*
 * Defensive resets: the host theme's global styles (text-align, color) are
 * inherited by default and can make text invisible on this widget's own
 * white surfaces (input, cards). Set them explicitly instead of relying on
 * inheritance so the widget renders consistently regardless of theme.
 */
.kwa-wrapper {
	max-width: 900px;
	margin: 0 auto;
	width: 100%;
	text-align: left;
	box-sizing: border-box;
}

.kwa-wrapper * {
	box-sizing: border-box;
}

.kwa-form {
	margin-bottom: 24px;
	width: 100%;
	text-align: left;
}

.kwa-label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
}

.kwa-input-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	width: 100%;
}

.kwa-input {
	flex: 1 1 280px;
	padding: 10px 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 16px;
	box-sizing: border-box;
	color: #1d2327 !important;
	background-color: #ffffff !important;
	text-align: left;
}

.kwa-input::placeholder {
	color: #8c8f94;
	opacity: 1;
}

.kwa-button {
	padding: 10px 20px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	cursor: pointer;
}

.kwa-button:hover {
	background: #135e96;
}

.kwa-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.kwa-loading {
	padding: 16px;
	text-align: center;
	color: #555 !important;
}

.kwa-error {
	padding: 16px;
	background: #fdecea !important;
	border: 1px solid #f5c2c0;
	color: #7a1f1a !important;
	border-radius: 6px;
	text-align: left;
}

.kwa-card {
	background: #fff !important;
	color: #1d2327 !important;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 16px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	text-align: left;
}

.kwa-card * {
	color: inherit;
}

.kwa-card h3 {
	margin-top: 0;
	color: #1d2327 !important;
}

.kwa-score-card {
	text-align: center;
}

.kwa-score-number {
	font-size: 40px;
	font-weight: 700;
	line-height: 1.2;
}

.kwa-score-label {
	color: #555 !important;
}

.kwa-score-good .kwa-score-number {
	color: #1a7f37;
}

.kwa-score-ok .kwa-score-number {
	color: #b8860b;
}

.kwa-score-bad .kwa-score-number {
	color: #c0392b;
}

.kwa-table {
	width: 100%;
	border-collapse: collapse;
}

.kwa-table th,
.kwa-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #eee;
	vertical-align: top;
}

.kwa-table th {
	width: 180px;
	color: #555 !important;
	font-weight: 600;
}

.kwa-keywords-table {
	overflow-x: auto;
	display: block;
}

.kwa-keywords-table th,
.kwa-keywords-table td {
	width: auto;
	text-align: center;
	white-space: nowrap;
}

.kwa-keywords-table th:first-child,
.kwa-keywords-table td:first-child {
	text-align: left;
	white-space: normal;
}

.kwa-missing {
	color: #c0392b !important;
	font-style: italic;
}

.kwa-issues {
	padding-left: 20px;
	margin: 0;
}

.kwa-issues li {
	margin-bottom: 8px;
}

.kwa-hint {
	color: #555 !important;
	font-size: 14px;
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.kwa-input-row {
		flex-direction: column;
	}

	.kwa-table th {
		width: 120px;
	}
}
