/**
 * Generator stopek e-mail — arkusz stylów frontendu.
 *
 * Wszystkie reguły są opatrzone prefiksem .pkgs-, aby nie kolidowały
 * ze stylami motywu WordPressa.
 *
 * @package PK_Generator_Stopek
 * @author  Centrum Cyfryzacji
 */

.pkgs-app {
	--pkgs-navy: #003571;
	--pkgs-accent: #c8102e;
	--pkgs-ink: #1a1f2b;
	--pkgs-muted: #5b6472;
	--pkgs-line: #e2e6ec;
	--pkgs-bg: #f5f7fa;
	--pkgs-panel: #ffffff;
	--pkgs-ok: #1c8a4c;
	--pkgs-radius: 10px;

	box-sizing: border-box;
	font-family: Aptos, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--pkgs-ink);
	background: var(--pkgs-bg);
	border: 1px solid var(--pkgs-line);
	border-radius: var(--pkgs-radius);
	overflow: hidden;
	max-width: 100%;
}

.pkgs-app *,
.pkgs-app *::before,
.pkgs-app *::after {
	box-sizing: border-box;
}

/* Pasek nagłówka */
.pkgs-topbar {
	background: var(--pkgs-navy);
	color: #fff;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.pkgs-topbar__title {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
	padding: 0;
	color: #fff;
	letter-spacing: .2px;
}

.pkgs-topbar__subtitle {
	font-size: 12.5px;
	color: #c9d6ea;
}

/* Układ */
.pkgs-layout {
	display: grid;
	grid-template-columns: 380px 1fr;
	align-items: start;
}

.pkgs-app--stacked .pkgs-layout {
	grid-template-columns: 1fr;
}

@media (max-width: 860px) {
	.pkgs-layout {
		grid-template-columns: 1fr;
	}
}

.pkgs-form-panel {
	background: var(--pkgs-panel);
	padding: 22px 24px;
	border-right: 1px solid var(--pkgs-line);
}

.pkgs-app--stacked .pkgs-form-panel,
@media (max-width: 860px) {
	.pkgs-form-panel {
		border-right: none;
		border-bottom: 1px solid var(--pkgs-line);
	}
}

.pkgs-preview-panel {
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/* Pola formularza */
.pkgs-required-note {
	font-size: 11.5px;
	color: var(--pkgs-muted);
	margin: 0 0 18px 0;
	line-height: 1.5;
}

.pkgs-section-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--pkgs-navy);
	margin: 22px 0 12px 0;
	padding-top: 16px;
	border-top: 1px solid var(--pkgs-line);
	text-transform: uppercase;
	letter-spacing: .4px;
}

.pkgs-section-title:first-of-type,
.pkgs-required-note + .pkgs-section-title {
	border-top: none;
	padding-top: 0;
	margin-top: 0;
}

.pkgs-field {
	margin-bottom: 14px;
}

.pkgs-app label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--pkgs-muted);
	margin-bottom: 5px;
	text-transform: uppercase;
	letter-spacing: .3px;
	line-height: 1.4;
}

.pkgs-app input[type="text"],
.pkgs-app input[type="email"],
.pkgs-app input[type="tel"],
.pkgs-app select {
	width: 100%;
	max-width: 100%;
	padding: 9px 11px;
	margin: 0;
	border: 1.5px solid var(--pkgs-line);
	border-radius: 7px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.4;
	color: var(--pkgs-ink);
	background: #fff;
	box-shadow: none;
	transition: border-color .15s ease;
}

.pkgs-app input:focus,
.pkgs-app select:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
	border-color: var(--pkgs-navy);
	box-shadow: 0 0 0 3px rgba(0, 53, 113, .12);
}

.pkgs-hint {
	font-size: 11.5px;
	color: var(--pkgs-muted);
	margin-top: 4px;
	line-height: 1.45;
}

/* Podgląd */
.pkgs-preview-card {
	background: #fff;
	border: 1px solid var(--pkgs-line);
	border-radius: var(--pkgs-radius);
	padding: 20px 24px;
	box-shadow: 0 1px 3px rgba(20, 30, 50, .06);
	overflow-x: auto;
}

.pkgs-preview-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--pkgs-muted);
	text-transform: uppercase;
	letter-spacing: .3px;
	margin-bottom: 12px;
}

.pkgs-preview {
	font-family: Aptos, Arial, Helvetica, sans-serif;
}

.pkgs-preview table {
	border-collapse: collapse;
	margin: 0;
	width: auto;
	max-width: none;
	background: transparent;
	border: none;
}

.pkgs-preview td {
	border: none;
	padding: 0;
	background: transparent;
}

.pkgs-preview img {
	max-width: 100%;
	height: auto;
}

/* Przyciski */
.pkgs-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.pkgs-app .pkgs-btn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	padding: 11px 18px;
	border-radius: 7px;
	border: 1.5px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: opacity .15s ease, transform .1s ease, background-color .15s ease;
}

.pkgs-app .pkgs-btn:active {
	transform: scale(.98);
}

.pkgs-app .pkgs-btn--primary {
	background: var(--pkgs-navy);
	color: #fff;
	border-color: var(--pkgs-navy);
}

.pkgs-app .pkgs-btn--primary:hover {
	opacity: .92;
	color: #fff;
}

.pkgs-app .pkgs-btn--secondary {
	background: #fff;
	color: var(--pkgs-navy);
	border-color: var(--pkgs-navy);
}

.pkgs-app .pkgs-btn--secondary:hover {
	background: #f0f4fa;
}

.pkgs-app .pkgs-btn--ghost {
	background: transparent;
	color: var(--pkgs-muted);
	border-color: var(--pkgs-line);
}

.pkgs-app .pkgs-btn--ghost:hover {
	background: #fff;
	color: var(--pkgs-ink);
}

.pkgs-status {
	font-size: 13px;
	font-weight: 600;
	color: var(--pkgs-ok);
	display: none;
	align-items: center;
	gap: 6px;
}

.pkgs-status.is-visible {
	display: inline-flex;
}

.pkgs-status.is-error {
	color: var(--pkgs-accent);
}

/* Instrukcja */
.pkgs-instructions {
	background: #eef3fa;
	border: 1px solid #d7e2f0;
	border-radius: var(--pkgs-radius);
	padding: 16px 20px;
	font-size: 13px;
	color: var(--pkgs-ink);
	line-height: 1.55;
}

.pkgs-instructions strong {
	color: var(--pkgs-navy);
}

.pkgs-instructions ol {
	margin: 8px 0 0 18px;
	padding: 0;
}

.pkgs-instructions li {
	margin: 0 0 4px 0;
}

.pkgs-instructions li:last-child {
	margin-bottom: 0;
}

/* Komunikaty */
.pkgs-notice {
	padding: 14px 18px;
	border-radius: 8px;
	border-left: 4px solid #d7e2f0;
	background: #eef3fa;
	font-size: 14px;
	line-height: 1.5;
	color: #1a1f2b;
}

.pkgs-notice--warning {
	border-left-color: #d99b00;
	background: #fff8e5;
}

/* Przełącznik języka */
.pkgs-topbar__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pkgs-lang {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.pkgs-lang__label {
	font-size: 12px;
	color: rgba(255, 255, 255, .78);
	margin-right: 2px;
}

.pkgs-lang__btn {
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .4px;
	line-height: 1;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .45);
	background: transparent;
	color: #fff;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.pkgs-lang__btn:hover,
.pkgs-lang__btn:focus-visible {
	background: rgba(255, 255, 255, .18);
}

.pkgs-lang__btn.is-active {
	background: #fff;
	border-color: #fff;
	color: var(--pkgs-navy);
}

.pkgs-instructions p {
	margin: 0 0 6px;
}

.pkgs-instructions p:last-child {
	margin-bottom: 0;
}

.pkgs-instructions ul {
	margin: 8px 0 0 18px;
	padding: 0;
}

@media (max-width: 600px) {
	.pkgs-lang {
		width: 100%;
		justify-content: flex-start;
	}
}
