/*!
 * Formularz zgłoszeniowy (Fluent Forms) w oprawie TradingBlueprint.
 *
 * Wtyczka wnosi własny arkusz przygotowany pod jasne tło, więc na ciemnym
 * landingu etykiety i listy wyborów mają zbyt niski kontrast, a kontrolki
 * używają fontów systemowych. Te reguły sprowadzają formularz do tokenów
 * motywu zdefiniowanych w `trading-blueprint.css`.
 *
 * Selektory są zawężone klasą `body.tbp-landing`, żeby wygrywać specyficznością
 * z arkuszem wtyczki niezależnie od kolejności wczytywania stylów.
 *
 * Pola wielokrotnego wyboru renderuje biblioteka choices.js dołączona przez
 * Fluent Forms — stąd osobna sekcja na klasy `.choices__*`.
 */

/* ==========================================================================
   Etykiety i grupy pól
   ========================================================================== */

body.tbp-landing .fluentform .ff-el-group {
	margin-bottom: 22px;
}

body.tbp-landing .fluentform .ff-el-input--label label {
	color: var(--tbp-heading);
	font-family: var(--tbp-font-display);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.4;
	margin-bottom: 8px;
}

/* Gwiazdkę wymagalności dorysowuje wtyczka; czerwień jest tu obcym kolorem. */
body.tbp-landing .fluentform .ff-el-is-required.asterisk-right label::after,
body.tbp-landing .fluentform .ff-el-is-required.asterisk-left label::before {
	color: var(--tbp-gold);
	opacity: 1;
}

/* ==========================================================================
   Pola tekstowe, listy i obszary tekstu
   ========================================================================== */

body.tbp-landing .fluentform .ff-el-form-control {
	background: var(--tbp-surface-2);
	border: 1px solid var(--tbp-line-muted);
	border-radius: var(--tbp-radius);
	box-shadow: none;
	color: var(--tbp-text);
	font-family: var(--tbp-font-body);
	font-size: 16px;
	line-height: 1.5;
	padding: 13px 15px;
	transition: border-color 0.15s ease, background-color 0.15s ease;
	width: 100%;
}

body.tbp-landing .fluentform .ff-el-form-control:hover {
	border-color: var(--tbp-line-light);
}

body.tbp-landing .fluentform .ff-el-form-control:focus {
	background: var(--tbp-surface);
	border-color: var(--tbp-gold);
	box-shadow: 0 0 0 1px var(--tbp-gold);
	color: var(--tbp-text);
	outline: none;
}

body.tbp-landing .fluentform .ff-el-form-control::placeholder {
	color: var(--tbp-faint);
	opacity: 1;
}

body.tbp-landing .fluentform textarea.ff-el-form-control {
	min-height: 110px;
	resize: vertical;
}

/* Strzałka listy rozwijanej rysowana samodzielnie — natywna bywa niewidoczna
   na ciemnym tle, bo kolorem steruje system, nie strona. */
body.tbp-landing .fluentform select.ff-el-form-control:not([multiple]) {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238d939b' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
	background-position: right 15px center;
	background-repeat: no-repeat;
	background-size: 12px 8px;
	cursor: pointer;
	padding-right: 40px;
}

/* Rozwiniętą listę natywnego selecta maluje przeglądarka — bez tego pozostaje
   biała, mimo ciemnego pola. */
body.tbp-landing .fluentform select.ff-el-form-control option {
	background: var(--tbp-surface);
	color: var(--tbp-text);
}

/* ==========================================================================
   Wielokrotny wybór (choices.js)
   ========================================================================== */

body.tbp-landing .fluentform .choices {
	margin-bottom: 0;
}

body.tbp-landing .fluentform .choices__inner {
	background: var(--tbp-surface-2);
	border: 1px solid var(--tbp-line-muted);
	border-radius: var(--tbp-radius);
	color: var(--tbp-text);
	font-family: var(--tbp-font-body);
	font-size: 16px;
	min-height: 50px;
	padding: 8px 15px 4px;
}

body.tbp-landing .fluentform .choices:hover .choices__inner {
	border-color: var(--tbp-line-light);
}

body.tbp-landing .fluentform .choices.is-focused .choices__inner,
body.tbp-landing .fluentform .choices.is-open .choices__inner {
	background: var(--tbp-surface);
	border-color: var(--tbp-gold);
	box-shadow: 0 0 0 1px var(--tbp-gold);
}

body.tbp-landing .fluentform .choices__input {
	background: transparent;
	color: var(--tbp-text);
	font-family: var(--tbp-font-body);
	font-size: 16px;
	margin-bottom: 4px;
}

body.tbp-landing .fluentform .choices__placeholder {
	color: var(--tbp-faint);
	opacity: 1;
}

/* Lista rozwijana: to ona była najsłabiej czytelna — jasny tekst wtyczki
   na jasnym tle. */
body.tbp-landing .fluentform .choices__list--dropdown,
body.tbp-landing .fluentform .choices__list[aria-expanded] {
	background: var(--tbp-surface);
	border: 1px solid var(--tbp-line-light);
	border-radius: var(--tbp-radius);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
	color: var(--tbp-text);
}

body.tbp-landing .fluentform .choices__list--dropdown .choices__item {
	color: var(--tbp-list);
	font-family: var(--tbp-font-body);
	font-size: 15.5px;
	padding: 11px 15px;
}

body.tbp-landing .fluentform .choices__list--dropdown .choices__item--selectable.is-highlighted {
	background: var(--tbp-line-strong);
	color: var(--tbp-heading);
}

body.tbp-landing .fluentform .choices__list--dropdown .choices__item--selectable::after {
	display: none;
}

/* Zaznaczone odpowiedzi jako złote znaczniki — czytelny sygnał wyboru. */
body.tbp-landing .fluentform .choices__list--multiple .choices__item {
	background: var(--tbp-gold);
	border: none;
	border-radius: var(--tbp-radius);
	color: var(--tbp-bg);
	font-family: var(--tbp-font-body);
	font-size: 14.5px;
	font-weight: 500;
	margin: 0 6px 6px 0;
	padding: 6px 10px;
}

body.tbp-landing .fluentform .choices__list--multiple .choices__item.is-highlighted {
	background: var(--tbp-gold-hover);
}

body.tbp-landing .fluentform .choices[data-type*="select-multiple"] .choices__button {
	border-left: 1px solid rgba(11, 12, 14, 0.35);
	margin-left: 8px;
	opacity: 0.65;
}

body.tbp-landing .fluentform .choices[data-type*="select-multiple"] .choices__button:hover {
	opacity: 1;
}

/* ==========================================================================
   Pola wyboru: radio i zgoda
   ========================================================================== */

body.tbp-landing .fluentform .ff-el-form-check-label {
	align-items: center;
	color: var(--tbp-list);
	cursor: pointer;
	display: flex;
	font-family: var(--tbp-font-body);
	font-size: 16px;
	gap: 10px;
}

body.tbp-landing .fluentform .ff-el-form-check-input {
	accent-color: var(--tbp-gold);
	height: 18px;
	margin: 0;
	width: 18px;
}

body.tbp-landing .fluentform .ff-el-form-check {
	margin-bottom: 10px;
}

body.tbp-landing .fluentform .ff_t_c {
	color: var(--tbp-body);
	font-family: var(--tbp-font-body);
	font-size: 15px;
	line-height: 1.55;
}

body.tbp-landing .fluentform .ff_t_c a {
	color: var(--tbp-gold);
	text-decoration: underline;
}

body.tbp-landing .fluentform .ff_t_c a:hover {
	color: var(--tbp-gold-hover);
}

/* ==========================================================================
   Przycisk wysyłki — ten sam język co przyciski oferty
   ========================================================================== */

/* Kolor wiodący wtyczki jest domyślnie niebieski i steruje nie tylko
   przyciskiem — podmiana zmiennej ujednolica wszystkie jego wystąpienia. */
body.tbp-landing .fluentform {
	--fluentform-primary: var(--tbp-gold);
}

body.tbp-landing .fluentform .ff-btn-submit {
	border: 1px solid transparent;
	border-radius: var(--tbp-radius);
	font-family: var(--tbp-font-display);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.06em;
	padding: 15px 34px;
	text-transform: uppercase;
	transition: background-color 0.15s ease, color 0.15s ease;
	width: auto;
}

/* Fluent Forms dokłada do strony własny blok <style> z regułą
   `form.fluent_form_<id> .ff-btn-submit:not(.ff_btn_no_style)`, która ma tę
   samą specyficzność co zwykły zapis i stoi później w źródle — dlatego
   wygrywała. Dokładamy `form.frm-fluent-form`, bo ta klasa nie zawiera
   numeru formularza: po imporcie na produkcji dostanie on inne id i selektor
   przywiązany do `fluent_form_3` przestałby działać. */
body.tbp-landing .fluentform form.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style) {
	background-color: var(--tbp-gold);
	color: var(--tbp-bg);
}

body.tbp-landing .fluentform form.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style):hover,
body.tbp-landing .fluentform form.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style):focus {
	background-color: var(--tbp-gold-hover);
	color: var(--tbp-bg);
}

/* ==========================================================================
   Walidacja
   ========================================================================== */

body.tbp-landing .fluentform .ff-el-is-error .ff-el-form-control,
body.tbp-landing .fluentform .ff-el-is-error .choices__inner {
	border-color: #d9584a;
}

body.tbp-landing .fluentform .error,
body.tbp-landing .fluentform .text-danger,
body.tbp-landing .fluentform .ff-el-is-error .error-text {
	color: #f08074;
	font-family: var(--tbp-font-body);
	font-size: 14.5px;
	margin-top: 6px;
}

body.tbp-landing .ff-errors-in-stack .error {
	color: #f08074;
}

body.tbp-landing .ff-message-success {
	background: var(--tbp-surface);
	border: 1px solid var(--tbp-line-light);
	border-left: 3px solid var(--tbp-gold);
	color: var(--tbp-text);
	font-family: var(--tbp-font-body);
	padding: 18px 20px;
}

/* ==========================================================================
   Układ kolumn na wąskich ekranach
   ========================================================================== */

@media (max-width: 767px) {

	body.tbp-landing .fluentform .ff-t-cell {
		flex-basis: 100% !important;
	}

	body.tbp-landing .fluentform .ff-el-form-control {
		font-size: 16px;
	}
}
