/* =========================================================================
   CTU.pl — Motyw formularzy produktów (redesign 2026)
   Scope: .rd-form  (BEZ globalnych resetow — nie rusza ukladu Bootstrapa)
   Tokeny (--brand itd.) pochodza z :root w redesign.css.
   Nie zmienia zadnych id/name/JS — wylacznie wyglad istniejacych klas.
   ========================================================================= */

.rd-form { font-family: var(--font); color: var(--ink); }
.rd-form .container-formularz { background: transparent; }

/* --- Sekcje jako karty --- */
.rd-form .fcard {
  background:#fff; border:1px solid var(--line); border-radius: var(--r-lg, 22px);
  box-shadow: var(--shadow-sm); padding: 26px 24px 28px; margin-bottom: 22px !important;
}

/* --- Naglowki sekcji (.line h7 / .title) --- */
.rd-form .line { border:0 !important; padding:0 !important; margin:0 0 16px 0 !important; }
.rd-form .line h7 { display:block; }
.rd-form .line h7 span { font-family: var(--font); font-weight: 800 !important; font-size: 1.18rem !important;
  color: var(--ink) !important; letter-spacing: -.01em; }
.rd-form .title { font-weight:800; font-size:1.18rem; color:var(--ink); margin-bottom:14px; }
.rd-form legend { font-weight:700; color: var(--ink-soft); }

/* --- Inputy / floating labels / selecty --- */
.rd-form .form-control {
  border:1.5px solid var(--line) !important; border-radius: var(--r-sm, 10px) !important;
  color: var(--ink); box-shadow:none !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rd-form .form-control:focus {
  border-color: var(--brand) !important; box-shadow: 0 0 0 4px var(--brand-050) !important;
}
.rd-form .form-control.is-valid { border-color: var(--ok) !important; }
.rd-form .form-control.is-invalid,
.rd-form .form-control.required-answer { border-color: var(--danger) !important; }
.rd-form .form-floating > label { color: var(--muted); font-weight:500; }
.rd-form .margin-form { margin-bottom: 16px; }
.rd-form .separate { display:flex; align-items:center; justify-content:center; color: var(--muted); font-weight:700; }

/* --- Kafelki zakresu (OC / AC / NNW / ASS / SZYBY / OPONY / OUZ) --- */
.rd-form section { display:flex; flex-wrap:wrap; gap:0; }
.rd-form .section-tile {
  display:inline-flex; align-items:center; gap:9px; background:#fff;
  border:1.5px solid var(--line); border-radius: var(--r-full, 999px);
  padding:9px 16px; margin:0 10px 10px 0; cursor:pointer; transition:.15s ease;
}
.rd-form .section-tile:hover { border-color: var(--brand-100); }
.rd-form .section-tile .form-check-input { float:none; margin:0; width:18px; height:18px; }
.rd-form .section-tile .form-check-label { font-weight:700; color: var(--ink-soft); cursor:pointer; margin:0; }
.rd-form .section-tile.checked-tile { border-color: var(--brand); background: var(--brand-050); }
.rd-form .section-tile.checked-tile .form-check-label { color: var(--brand); }

/* --- Toggle osoba prywatna / firma --- */
.rd-form .radio-btn-group {
  display:inline-flex; align-items:center; gap:5px; flex-wrap:wrap;
  background: var(--bg-tint); padding:5px; border-radius: var(--r-full, 999px);
}
.rd-form .radio-btn-group .radio { position:relative; margin:0; }
.rd-form .radio-btn-group .radio > input.radio { position:absolute; inset:0; opacity:0; cursor:pointer; }
.rd-form .radio-btn-group .label {
  display:flex !important; align-items:center; justify-content:center;
  height:auto !important; width:auto !important; min-width:96px;
  padding:10px 22px !important; margin:0; border-radius: var(--r-full, 999px);
  font-weight:700; color: var(--ink-soft); cursor:pointer; transition:.15s ease; white-space:nowrap;
}
.rd-form .radio-btn-group .radio > input.radio:checked + .label {
  background:#fff; color: var(--brand); box-shadow: var(--shadow-sm);
}
.rd-form .radio-btn-group .label.required-answer { color: var(--danger); }
/* select "dane z profilu" w tym pasku */
.rd-form .radio-btn-group select.form-control { height:auto !important; border-radius: var(--r-full,999px) !important; }

/* --- Zwykle checkboxy (garaz, wspolwlasciciel, brak nr rej.) --- */
.rd-form .form-check-input { accent-color: var(--brand); }
.rd-form .form-check-label { color: var(--ink-soft); }

/* --- Przyciski --- */
.rd-form .btn-podsumowanie,
.rd-form .btn-dalej {
  background: var(--brand) !important; color:#fff !important; border:0 !important;
  border-radius: var(--r-full, 999px) !important; font-weight:700 !important;
  padding: 14px 32px !important; box-shadow: var(--shadow-brand); transition: background .2s, transform .15s;
}
.rd-form .btn-dalej:hover,
.rd-form .btn-podsumowanie:hover { background: var(--brand-600) !important; transform: translateY(-1px); }
.rd-form .btn-powrot {
  background:#fff !important; color: var(--brand) !important;
  border:1.5px solid var(--brand-100) !important; box-shadow:none !important;
}
.rd-form .btn-powrot:hover { border-color: var(--brand) !important; background: var(--brand-050) !important; }

/* --- Sekcja tekstowa SEO --- */
.rd-form .text_lead p,
.rd-form .text_lead-hidden p { color: var(--ink-soft); }
.rd-form .text_lead a,
.rd-form .text_lead-hidden a { color: var(--brand); font-weight:700; }
.rd-form .text_lead-hidden h2 { font-size:1.25rem; margin:18px 0 8px; color: var(--ink); }
.rd-form .breadcrumb-info-agent i { color: var(--brand) !important; }

/* pomocnicze */
.rd-form .help-label { color: var(--brand); }

/* =========================================================================
   UX ENHANCEMENTS (2026) — nowoczesne kontrolki, nagłówki, grupy
   ========================================================================= */

/* --- Nagłówki sekcji: lewo + akcent (pasek brand→żółty) --- */
.rd-form .line { text-align:left !important; display:block !important; margin:6px 0 20px !important; }
.rd-form .line h7 { display:block !important; text-align:left !important; }
.rd-form .line h7 span,
.rd-form .title {
  display:inline-flex !important; align-items:center; gap:14px;
  font-family: var(--font); font-weight:800 !important; font-size:1.18rem !important;
  color: var(--ink) !important; letter-spacing:-.01em; text-align:left;
}
.rd-form .title { display:flex !important; margin-bottom:18px; }
.rd-form .line h7 span::before,
.rd-form .title::before {
  content:""; flex:none; width:6px; height:22px; border-radius:3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

/* --- Legenda (np. zakres w OC/AC) --- */
.rd-form legend { display:flex; align-items:center; gap:12px; font-weight:800; color:var(--ink); }

/* --- Custom checkbox / radio --- */
.rd-form .form-check { display:flex; align-items:center; gap:11px; padding-left:0; margin-bottom:11px; min-height:auto; }
.rd-form .form-check .form-check-input {
  appearance:none; -webkit-appearance:none; float:none; margin:0 !important; flex:none;
  width:21px !important; height:21px !important; min-width:21px; border:2px solid #cfd6e6; background-color:#fff;
  border-radius:7px; cursor:pointer; position:relative; transition:.15s ease;
}
.rd-form .form-check .form-check-input[type=radio] { border-radius:50%; }
.rd-form .form-check .form-check-input:hover { border-color: var(--brand); }
.rd-form .form-check .form-check-input:focus { outline:0; box-shadow:0 0 0 4px var(--brand-050); }
.rd-form .form-check .form-check-input:checked { background: var(--brand); border-color: var(--brand); }
.rd-form .form-check .form-check-input[type=checkbox]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 4.5 6.5 12 3 8.5'/%3E%3C/svg%3E");
  background-size:14px 14px; background-position:center; background-repeat:no-repeat;
}
.rd-form .form-check .form-check-input[type=radio]:checked {
  background-image: radial-gradient(circle at center, #fff 0 4px, transparent 5px);
}
.rd-form .form-check .form-check-label { cursor:pointer; margin:0; color: var(--ink-soft); font-weight:600; line-height:1.35; }
.rd-form .form-check .form-check-input:checked ~ .form-check-label { color: var(--ink); }

/* wyjątek: kafelki zakresu (section-tile) mają własny wygląd — nie ruszamy tam checkboxa układu */
.rd-form .section-tile { margin-bottom:10px; }
.rd-form .section-tile .form-check-input { width:19px !important; height:19px !important; }

/* =========================================================================
   OPINIE (dynamiczne z bazy) — scope .rd-reviews, bez globalnych resetow
   ========================================================================= */
.rd-reviews { font-family: var(--font); padding: 10px 0 56px; background: var(--bg-soft); }
.rd-reviews .container-opinie { max-width: 100%; }
.rd-reviews__trust { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:18px;
  padding: 6px 16px 30px; text-align:center; }
.rd-reviews__trust span { font-size:1rem; color: var(--ink-soft); }
.rd-reviews__trust b { color: var(--ink); }
.rd-reviews__trust img { height:26px; width:auto; }
.rd-reviews__trust a { display:inline-flex; align-items:center; transition: transform .15s ease; }
.rd-reviews__trust a:hover { transform: translateY(-2px); }

/* karuzela na pełną szerokość ekranu — przebija legacy #rating i .container */
.rd-reviews__track { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 6px 0 !important; box-sizing: border-box; }
.rd-reviews .card-rating {
  width: auto; min-width: 0 !important; box-sizing:border-box; margin: 10px 14px;
  height: auto !important; min-height: 200px !important; padding: 24px;
  background:#fff; border:1px solid var(--line) !important; border-radius: var(--r-lg, 22px) !important;
  box-shadow: var(--shadow-sm); cursor:pointer; transition: box-shadow .2s ease, transform .2s ease;
  white-space: normal; text-align:left;
}
/* slidesToShow: slajd = kontener/N; karta wypełnia slajd, margines robi odstęp.
   Równe wysokości kart (flex działa poprawnie z slidesToShow). */
.rd-reviews .slick-track { display:flex !important; }
.rd-reviews .slick-slide { height:auto !important; }
.rd-reviews .slick-slide > .card-rating { height:100%; }
.rd-reviews .card-rating:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.rd-reviews .card-rating__head { display:flex; align-items:center; gap:13px; margin-bottom:14px; }
.rd-reviews .person-img { flex:none; width:52px; height:52px; border-radius:50%; overflow:hidden;
  background: var(--brand-050); }
.rd-reviews .person-img img { width:100%; height:100%; object-fit:cover; display:block; }
.rd-reviews .person-name { font-weight:800; color: var(--ink); font-size:1rem; line-height:1.2; }
.rd-reviews .person-source { color: var(--muted); font-size:.82rem; }
.rd-reviews .rd-stars { color: var(--gold); letter-spacing:.02em; }
.rd-reviews .opinia { color: var(--ink-soft); font-size:.95rem; line-height:1.55; margin:0 !important;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
