/* ESW: generator bindow i configu CS2. Ladowane tylko na stronie generatora. */
.esw-bd {
	--b-card: #20212b;
	--b-raised: #2a2b37;
	--b-line: rgba(255, 255, 255, 0.1);
	--b-muted: #a3a6b4;
	padding: 22px 0 10px;
	background: #14151b;
	border-bottom: 1px solid var(--b-line);
	color: #e8e9ee;
}
.esw-bd__wrap {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
}
.esw-bd button,
.esw-bd select {
	font-family: inherit;
	cursor: pointer;
}
.esw-bd button:focus-visible,
.esw-bd select:focus-visible,
.esw-bd textarea:focus-visible,
.esw-bd label:focus-within {
	outline: 2px solid var(--esw-accent-soft, #a594ff);
	outline-offset: 2px;
}
.esw-bd .google-auto-placed,
.esw-bd ins.adsbygoogle {
	display: none !important;
}
.esw-bd__app {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 460px;
	gap: 20px;
	align-items: start;
}
.esw-bd__groups {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	align-items: start;
}
.esw-bd__group {
	padding: 14px 16px 8px;
	background: var(--b-card);
	border: 1px solid var(--b-line);
	border-radius: 8px;
}
.esw-bd .esw-bd__group h2 {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.2;
	color: #fff;
}
.esw-bd__note {
	margin: -2px 0 8px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--b-muted);
}
.esw-bd__item {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid var(--b-line);
}
.esw-bd__item:first-of-type {
	border-top: 0;
}
.esw-bd__txt strong {
	display: block;
	font-size: 14px;
	line-height: 1.3;
}
.esw-bd__txt small {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.35;
	color: var(--b-muted);
}
.esw-bd__item:not(.is-on) .esw-bd__txt,
.esw-bd__item:not(.is-on) .esw-bd__key {
	opacity: 0.5;
}
.esw-bd__txt select {
	width: 100%;
	padding: 6px 8px;
	background: #14151b;
	border: 1px solid var(--b-line);
	border-radius: 5px;
	color: #fff;
	font-size: 14px;
}

/* przelacznik */
.esw-bd__sw {
	position: relative;
	display: inline-block;
	width: 38px;
	height: 22px;
	cursor: pointer;
}
.esw-bd__sw input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}
.esw-bd__sw span {
	position: absolute;
	inset: 0;
	background: #3a3c4a;
	border-radius: 22px;
	transition: background 0.15s;
}
.esw-bd__sw span::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.15s;
}
.esw-bd__sw input:checked + span {
	background: var(--esw-accent, #5c39f2);
}
.esw-bd__sw input:checked + span::after {
	transform: translateX(16px);
}

/* klawisz */
.esw-bd__key {
	min-width: 64px;
	max-width: 150px;
	padding: 7px 10px;
	background: #14151b;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-bottom-width: 3px;
	border-radius: 6px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.esw-bd__key:hover {
	border-color: var(--esw-accent-soft, #a594ff);
}
.esw-bd__key.is-listen {
	background: #2b2552;
	border-color: var(--esw-accent, #5c39f2);
	animation: esw-bd-pulse 1s infinite;
}
.esw-bd__key.is-dupe {
	border-color: #ff6b6b;
	color: #ffb3b3;
}
@keyframes esw-bd-pulse {
	50% {
		background: #3a2f78;
	}
}

/* wynik */
.esw-bd__out {
	position: sticky;
	top: 90px;
	display: grid;
	gap: 14px;
}
.esw-bd__card {
	padding: 14px 16px;
	background: var(--b-card);
	border: 1px solid var(--b-line);
	border-top: 2px solid var(--esw-accent, #5c39f2);
	border-radius: 8px;
}
.esw-bd__tabs {
	display: flex;
	margin-bottom: 10px;
	background: var(--b-raised);
	border: 1px solid var(--b-line);
	border-radius: 6px;
	overflow: hidden;
}
.esw-bd__tabs button {
	flex: 1;
	padding: 8px 10px;
	background: none;
	border: 0;
	color: #e8e9ee;
	font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.esw-bd__tabs button.is-on {
	background: var(--esw-accent, #5c39f2);
	color: #fff;
}
.esw-bd textarea {
	box-sizing: border-box;
	width: 100%;
	height: 340px;
	padding: 10px 12px;
	background: #0f1015;
	border: 1px solid var(--b-line);
	border-radius: 6px;
	color: #d6f5e6;
	font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	resize: vertical;
	white-space: pre;
}
.esw-bd__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.esw-bd__btn {
	padding: 9px 13px;
	background: var(--b-raised);
	border: 1px solid var(--b-line);
	border-radius: 6px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}
.esw-bd__btn:hover {
	border-color: var(--esw-accent-soft, #a594ff);
}
.esw-bd__btn--main {
	background: var(--esw-accent, #5c39f2);
	border-color: var(--esw-accent, #5c39f2);
}
.esw-bd__btn.is-done {
	background: #1f7a4d;
	border-color: #1f7a4d;
}
.esw-bd__hint {
	min-height: 1.2em;
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--b-muted);
}
.esw-bd__hint.is-warn {
	color: #ffc66b;
}
.esw-bd .esw-bd__how h2 {
	margin: 0 0 8px;
	font-size: 16px;
	color: #fff;
}
.esw-bd__how ol {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	line-height: 1.5;
}
.esw-bd__how li + li {
	margin-top: 6px;
}
.esw-bd__how code {
	font-size: 12px;
	word-break: break-all;
}

@media only screen and (max-width: 1199px) {
	.esw-bd__app {
		grid-template-columns: minmax(0, 1fr);
	}
	.esw-bd__out {
		position: static;
	}
}
@media only screen and (max-width: 760px) {
	.esw-bd__wrap {
		padding: 0 16px;
	}
	.esw-bd__groups {
		grid-template-columns: minmax(0, 1fr);
	}
	.esw-bd textarea {
		height: 260px;
	}
	.esw-bd__actions .esw-bd__btn {
		flex: 1 1 100%;
	}
}

/* karty w kolumnach (mozaika) zamiast siatki z pustymi przerwami */
.esw-bd__groups {
	display: block;
	columns: 2;
	column-gap: 14px;
}
.esw-bd__group {
	break-inside: avoid;
	margin-bottom: 14px;
}
.esw-bd__how code {
	display: inline-block;
	padding: 1px 6px;
	background: #0f1015;
	border: 1px solid var(--b-line);
	border-radius: 4px;
	color: #d6f5e6;
}
@media only screen and (max-width: 760px) {
	.esw-bd__groups {
		columns: 1;
	}
}
