/* FFCL Chat Widget – wygląd okna „Talk to FFCL”.
   Kolory zmieniasz w zmiennych poniżej. */

.ffclw {
	--ffclw-bg: #0c3c44;
	--ffclw-bg-raised: #114a53;
	--ffclw-line: rgba(255, 255, 255, 0.55);
	--ffclw-line-soft: rgba(255, 255, 255, 0.16);
	--ffclw-text: #ffffff;
	--ffclw-muted: rgba(255, 255, 255, 0.78);
	--ffclw-accent: #86b23f;
	--ffclw-accent-hover: #75a032;
	--ffclw-danger: #ff8a7a;
	--ffclw-input-bg: #ffffff;
	--ffclw-input-text: #10272b;
	--ffclw-radius: 12px;
	--ffclw-font: "Mulish", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	font-family: var(--ffclw-font);
	font-size: 15px;
	line-height: 1.45;
	color: var(--ffclw-text);
	-webkit-font-smoothing: antialiased;
}

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

/* Reset stylów motywu dla przycisków i pól wewnątrz widgetu */
.ffclw button,
.ffclw input,
.ffclw select,
.ffclw textarea {
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	margin: 0;
	box-shadow: none;
	min-height: 0;
}
.ffclw button {
	cursor: pointer;
	background: none;
	border: 0;
	color: inherit;
	padding: 0;
	line-height: inherit;
	text-decoration: none;
}
.ffclw button:focus-visible,
.ffclw a:focus-visible,
.ffclw input:focus-visible,
.ffclw select:focus-visible,
.ffclw textarea:focus-visible {
	outline: 2px solid var(--ffclw-accent);
	outline-offset: 2px;
}
.ffclw h2,
.ffclw p,
.ffclw dl,
.ffclw dd,
.ffclw blockquote {
	margin: 0;
	padding: 0;
	color: inherit;
}
.ffclw svg {
	display: block;
	flex: none;
}
.ffclw [hidden] {
	display: none !important;
}
.ffclw-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Przycisk „Talk to FFCL” ---------- */
.ffclw-launcher {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
	padding: 14px 26px 14px 22px !important;
	border-radius: 999px !important;
	background: var(--ffclw-bg) !important;
	color: var(--ffclw-text) !important;
	font-weight: 700;
	font-size: 16px;
	box-shadow: 0 10px 30px rgba(6, 30, 34, 0.35) !important;
	transition: transform 0.15s ease, background 0.15s ease;
}
.ffclw-launcher:hover {
	background: var(--ffclw-bg-raised) !important;
	transform: translateY(-1px);
}

/* ---------- Okno ---------- */
.ffclw-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 16px);
	width: 400px;
	max-height: min(680px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	background: var(--ffclw-bg);
	border-radius: var(--ffclw-radius);
	box-shadow: 0 24px 60px rgba(6, 30, 34, 0.4);
	overflow: hidden;
	animation: ffclw-in 0.18s ease-out;
}
@keyframes ffclw-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.ffclw-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 14px 18px;
	border-bottom: 3px solid var(--ffclw-accent);
	flex: none;
}
.ffclw-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.ffclw-logo {
	display: block;
	width: 34px;
	height: 34px;
	object-fit: contain;
	color: var(--ffclw-text);
	opacity: 0.9;
}
.ffclw-brand-name {
	font-weight: 800;
	font-size: 18px;
	letter-spacing: 0.02em;
}
.ffclw-brand-sep {
	width: 1px;
	height: 18px;
	background: var(--ffclw-text);
	opacity: 0.8;
}
.ffclw-brand-sub {
	font-weight: 700;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ffclw-head-actions {
	display: flex;
	gap: 4px;
}
.ffclw-icon-btn {
	width: 34px;
	height: 34px;
	display: grid !important;
	place-items: center;
	border-radius: 8px !important;
	color: var(--ffclw-text) !important;
}
.ffclw-icon-btn:hover {
	background: var(--ffclw-line-soft) !important;
}

.ffclw-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 26px 18px 22px;
	overscroll-behavior: contain;
}

.ffclw-title {
	font-size: 21px;
	font-weight: 800;
	line-height: 1.25;
	margin-bottom: 16px !important;
	color: var(--ffclw-text) !important;
}
.ffclw-title-lg {
	font-size: 31px;
	margin-bottom: 8px !important;
}
.ffclw-lead {
	color: var(--ffclw-muted) !important;
	font-size: 14.5px;
	margin-bottom: 20px !important;
}

/* ---------- Karty na ekranie startowym ---------- */
.ffclw-cards {
	display: grid;
	gap: 12px;
}
.ffclw-card,
.ffclw-option {
	display: flex !important;
	align-items: center;
	gap: 16px;
	width: 100%;
	text-align: left;
	border: 1px solid var(--ffclw-line) !important;
	border-radius: 10px !important;
	color: var(--ffclw-text) !important;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.ffclw-card {
	padding: 20px 18px 20px 24px !important;
	font-weight: 700;
	font-size: 15.5px;
}
.ffclw-card:hover,
.ffclw-option:hover {
	background: var(--ffclw-bg-raised) !important;
	border-color: #fff !important;
}
.ffclw-card-icon {
	display: grid;
	place-items: center;
	width: 32px;
	opacity: 0.95;
}
.ffclw-card-label {
	flex: 1;
}
.ffclw-card-arrow,
.ffclw-option svg {
	opacity: 0.95;
}

/* ---------- Szybka wiadomość ---------- */
.ffclw-foot {
	flex: none;
	border-top: 1px solid var(--ffclw-line-soft);
	padding: 18px 18px 20px;
}
.ffclw-quick {
	display: flex;
	gap: 14px;
	align-items: flex-end;
}
.ffclw-quick-input {
	flex: 1;
	min-width: 0;
	resize: none;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--ffclw-input-bg) !important;
	color: var(--ffclw-input-text) !important;
	padding: 14px 16px !important;
	line-height: 1.4 !important;
	height: 50px;
	max-height: 120px;
}
.ffclw-quick .ffclw-btn {
	min-width: 82px;
	height: 50px;
}
.ffclw-quick-err {
	margin-top: 8px !important;
}

/* ---------- Przyciski ---------- */
.ffclw-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 20px !important;
	border-radius: 8px !important;
	font-weight: 700;
	font-size: 15.5px;
	transition: background 0.15s ease, opacity 0.15s ease;
}
.ffclw-btn-primary {
	background: var(--ffclw-accent) !important;
	color: #fff !important;
}
.ffclw-btn-primary:hover {
	background: var(--ffclw-accent-hover) !important;
}
.ffclw-btn-ghost {
	border: 1px solid var(--ffclw-line) !important;
	color: var(--ffclw-text) !important;
}
.ffclw-btn-ghost:hover {
	background: var(--ffclw-line-soft) !important;
}
.ffclw-btn-danger {
	background: #e5533f !important;
	color: #fff !important;
}
.ffclw-btn-block {
	width: 100%;
	margin-top: 18px !important;
}
.ffclw-btn[disabled] {
	opacity: 0.6;
	cursor: progress;
}

/* ---------- Pasek kroku ---------- */
.ffclw-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: -8px 0 10px;
}
.ffclw-back {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	padding: 6px 10px 6px 4px !important;
	margin-left: -4px !important;
	border-radius: 6px !important;
	color: var(--ffclw-text) !important;
	font-weight: 700;
	font-size: 14px;
}
.ffclw-back:hover {
	background: var(--ffclw-line-soft) !important;
}
.ffclw-progress {
	color: var(--ffclw-muted);
	font-size: 12.5px;
	text-align: right;
}
.ffclw-bar {
	height: 3px;
	border-radius: 3px;
	background: var(--ffclw-line-soft);
	margin-bottom: 22px;
	overflow: hidden;
}
.ffclw-bar span {
	display: block;
	height: 100%;
	background: var(--ffclw-accent);
	transition: width 0.25s ease;
}

/* ---------- Opcje wyboru ---------- */
.ffclw-options {
	display: grid;
	gap: 10px;
}
.ffclw-option {
	justify-content: space-between;
	padding: 14px 14px 14px 18px !important;
	font-weight: 600;
	font-size: 15px;
}
.ffclw-option.is-on {
	border-color: var(--ffclw-accent) !important;
	background: rgba(134, 178, 63, 0.14) !important;
}

/* ---------- Pola ---------- */
.ffclw-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 12px;
}
.ffclw-field {
	grid-column: 1 / -1;
	min-width: 0;
}
.ffclw-field.is-half {
	grid-column: span 1;
}
.ffclw-label {
	display: block;
	font-weight: 700;
	font-size: 13.5px;
	margin-bottom: 6px;
	color: var(--ffclw-text);
}
.ffclw-req {
	color: var(--ffclw-accent);
}
.ffclw-hint {
	font-weight: 400;
	color: var(--ffclw-muted);
}
.ffclw-input {
	display: block;
	width: 100% !important;
	max-width: none !important;
	border: 2px solid transparent !important;
	border-radius: 8px !important;
	background: var(--ffclw-input-bg) !important;
	color: var(--ffclw-input-text) !important;
	padding: 10px 12px !important;
	font-size: 15px !important;
	line-height: 1.35 !important;
	height: auto !important;
}
.ffclw-input::placeholder,
.ffclw-quick-input::placeholder {
	color: #7a8a8d;
	opacity: 1;
}
textarea.ffclw-input {
	resize: vertical;
	min-height: 64px;
}
select.ffclw-input {
	appearance: auto;
}
.ffclw-input[disabled] {
	opacity: 0.45;
}
.ffclw-field.is-invalid .ffclw-input {
	border-color: var(--ffclw-danger) !important;
}
.ffclw-err {
	color: var(--ffclw-danger) !important;
	font-size: 13px;
	margin-top: 6px !important;
}
.ffclw-date {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.ffclw-date .ffclw-input {
	flex: 1 1 160px;
	width: auto !important;
}
.ffclw-check {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
	color: var(--ffclw-text);
}
.ffclw-check input {
	width: 18px;
	height: 18px;
	margin-top: 1px !important;
	accent-color: var(--ffclw-accent);
	flex: none;
}
.ffclw-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ffclw-chip {
	padding: 8px 16px !important;
	border: 1px solid var(--ffclw-line) !important;
	border-radius: 999px !important;
	font-weight: 600;
	font-size: 14px;
	color: var(--ffclw-text) !important;
}
.ffclw-chip:hover {
	background: var(--ffclw-line-soft) !important;
}
.ffclw-chip.is-on {
	background: var(--ffclw-accent) !important;
	border-color: var(--ffclw-accent) !important;
}
.ffclw-field.is-invalid .ffclw-chip {
	border-color: var(--ffclw-danger) !important;
}

/* ---------- Podsumowanie ---------- */
.ffclw .ffclw-summary {
	border: 1px solid var(--ffclw-line-soft);
	border-radius: 10px;
	padding: 4px 14px;
	margin-bottom: 16px !important;
}
.ffclw-summary > div {
	display: grid;
	grid-template-columns: 42% 1fr;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--ffclw-line-soft);
	font-size: 14px;
}
.ffclw-summary > div:last-child {
	border-bottom: 0;
}
.ffclw-summary dt {
	color: var(--ffclw-muted);
}
.ffclw-summary dd {
	font-weight: 600;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.ffclw-note {
	background: rgba(134, 178, 63, 0.14);
	border-left: 3px solid var(--ffclw-accent);
	border-radius: 6px;
	padding: 10px 12px !important;
	font-size: 14px;
	margin-bottom: 16px !important;
}
.ffclw-field[data-field="consent"] {
	margin-top: 16px;
}
.ffclw-consent {
	font-size: 13px;
	color: var(--ffclw-muted);
	line-height: 1.45;
}
.ffclw-consent a {
	color: var(--ffclw-text) !important;
	text-decoration: underline !important;
}
.ffclw-ts {
	margin-top: 14px;
}
.ffclw-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.ffclw-submit-err {
	margin-top: 14px !important;
}
.ffclw-quote {
	border-left: 3px solid var(--ffclw-accent);
	background: var(--ffclw-bg-raised);
	border-radius: 6px;
	padding: 10px 12px !important;
	margin-bottom: 18px !important;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	max-height: 120px;
	overflow-y: auto;
	font-size: 14px;
}

/* ---------- Potwierdzenie ---------- */
.ffclw-success {
	text-align: center;
	padding-top: 6px;
}
.ffclw-success-icon {
	display: inline-grid;
	color: var(--ffclw-accent);
	margin-bottom: 14px;
}
.ffclw-success .ffclw-title {
	margin-bottom: 8px !important;
}
.ffclw-ref {
	display: grid;
	gap: 4px;
	border: 1px dashed var(--ffclw-line);
	border-radius: 10px;
	padding: 14px !important;
	margin-bottom: 16px;
}
.ffclw-ref span {
	color: var(--ffclw-muted);
	font-size: 13px;
}
.ffclw-ref strong {
	font-size: 22px;
	letter-spacing: 0.04em;
}
.ffclw-urgent {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--ffclw-muted) !important;
}
.ffclw-urgent a {
	color: var(--ffclw-text) !important;
	font-weight: 700;
	text-decoration: underline !important;
}

/* ---------- Okno „Discard your message?” ---------- */
.ffclw-confirm {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(4, 22, 25, 0.72);
}
.ffclw-confirm-box {
	width: 100%;
	background: var(--ffclw-bg-raised);
	border: 1px solid var(--ffclw-line-soft);
	border-radius: 12px;
	padding: 22px;
	text-align: center;
}
.ffclw-confirm-title {
	font-size: 18px;
	font-weight: 800;
	margin-bottom: 6px !important;
}
.ffclw-confirm-lead {
	color: var(--ffclw-muted) !important;
	font-size: 14px;
	margin-bottom: 18px !important;
}
.ffclw-confirm-actions {
	display: flex;
	gap: 10px;
}
.ffclw-confirm-actions .ffclw-btn {
	flex: 1;
}

/* ---------- Telefon ---------- */
@media (max-width: 480px) {
	.ffclw {
		right: 12px;
		bottom: 12px;
	}
	.ffclw-panel {
		position: fixed;
		left: 8px;
		right: 8px;
		top: 8px;
		bottom: 80px;
		width: auto;
		max-height: none;
	}
	.ffclw-title-lg {
		font-size: 27px;
	}
	.ffclw-brand-sub {
		font-size: 11px;
	}
	.ffclw-launcher {
		padding: 12px 20px 12px 16px !important;
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffclw-panel {
		animation: none;
	}
	.ffclw-bar span,
	.ffclw-launcher {
		transition: none;
	}
}
