/* ==========================================================================
   SURVEY STYLES — KochajSię.pl
   ========================================================================== */

/* Kontener główny i tło */
.survey-body {
  background-color: var(--cream, #FBF7F4);
  color: var(--ink, #201014);
  font-family: var(--sans, 'Jost', sans-serif);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.survey-container {
  width: 100%;
  max-width: 680px;
  padding: 24px;
  box-sizing: border-box;
}

/* Karta ankiety */
.survey-card {
  background: var(--warm, #FEF9F6);
  border-radius: var(--r-card, 24px);
  padding: 48px;
  box-shadow: var(--shadow-card, 0 18px 52px rgba(158, 32, 56, .08));
  box-sizing: border-box;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

@media (max-width: 576px) {
  .survey-card {
    padding: 32px 20px;
    border-radius: 16px;
  }
}

/* Czcionki szeryfowe (dostosowane do witryny) */
.survey-serif {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  color: var(--r5, #B8334A);
  margin: 0;
  letter-spacing: -.02em;
}

.survey-serif-heading {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  color: var(--r5, #B8334A);
  margin: 0;
  letter-spacing: -.015em;
}

.survey-sans {
  font-family: var(--sans, 'Jost', sans-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink2, #42202A);
}

.survey-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--r5, #B8334A);
  text-transform: uppercase;
}

.survey-step-desc {
  font-size: 14px;
  color: var(--ink3, #7D4250);
  margin-top: 4px;
}

/* Wstęp */
.survey-intro-text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink2, #42202A);
  font-style: italic;
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
}

/* Pasek Postępu */
.survey-progress-wrapper {
  margin-bottom: 40px;
}

.survey-progress-bar {
  background: var(--parch, #F5EDE6);
  height: 6px;
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.survey-progress-fill {
  background: var(--r4, #D4566A);
  height: 100%;
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.survey-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3, #7D4250);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Przejścia kroków */
.survey-step {
  display: none;
}

.survey-step.active {
  display: block;
  animation: surveyFadeIn 0.4s ease forwards;
}

@keyframes surveyFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pytania i opcje */
.survey-question-group {
  margin-bottom: 40px;
}

.survey-question-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--r5, #B8334A);
  margin-bottom: 16px;
  line-height: 1.35;
  letter-spacing: -0.010em;
}

.survey-question-title span:not(.q-num) {
  display: block;
  width: 100%;
  font-family: var(--sans, 'Jost', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink3, #7D4250) !important;
  margin-top: 2px;
  margin-left: 0;
}


.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--r1, #FDF0F2);
  color: var(--r5, #B8334A);
  border-radius: 8px;
  font-family: var(--sans, 'Jost', sans-serif);
  font-size: 13px;
  font-weight: 700;
  margin-right: 12px;
  flex-shrink: 0;
  margin-top: -3px;
}



/* Kontrolki Radio */
/* Kontrolki Radio i Checkbox w białych boksach */
.survey-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 0;
  background: #ffffff;
  border: 1px solid var(--parch, #F5EDE6);
  border-radius: 16px;
  padding: 8px 24px;
  box-shadow: 0 4px 20px rgba(158, 32, 56, 0.015);
  box-sizing: border-box;
  margin-top: 12px;
}

@media (max-width: 480px) {
  .survey-options-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
}

.survey-options-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  border: 1px solid var(--parch, #F5EDE6);
  border-radius: 16px;
  padding: 8px 24px;
  box-shadow: 0 4px 20px rgba(158, 32, 56, 0.015);
  box-sizing: border-box;
  margin-top: 12px;
}

.survey-option-radio,
.survey-option-checkbox {
  display: block;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}

.survey-option-radio input,
.survey-option-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.radio-label,
.checkbox-label {
  display: block;
  padding: 12px 16px 12px 40px;
  background: transparent;
  border-bottom: 1px solid rgba(245, 237, 230, 0.8);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink2, #42202A);
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  margin: 4px 0;
}

/* Hover state */
.survey-option-radio:hover .radio-label,
.survey-option-checkbox:hover .checkbox-label {
  background: rgba(245, 237, 230, 0.4);
  color: var(--r6, #9E2038);
}

/* Checked state */
.survey-option-radio input:checked + .radio-label,
.survey-option-checkbox input:checked + .checkbox-label {
  background: var(--r1, #FDF0F2);
  color: var(--r6, #9E2038);
  font-weight: 600;
  border-bottom-color: transparent;
}

/* Wyskakujący czerwony ptaszek (checkmark w czerwonym kole po LEWEJ stronie) */
.radio-label::before,
.checkbox-label::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--r5, #B8334A);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 11px;
  background-repeat: no-repeat;
  background-position: center;
  transform: translateY(-50%) scale(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.survey-option-radio input:checked + .radio-label::before,
.survey-option-checkbox input:checked + .checkbox-label::before {
  transform: translateY(-50%) scale(1);
}

/* Usuwanie dolnego obramowania na ostatnich elementach wewnątrz boksów */
.survey-options-stack .survey-option-radio:last-child .radio-label,
.survey-options-stack .survey-option-checkbox:last-child .checkbox-label {
  border-bottom: none;
}

.survey-options-grid .survey-option-radio:nth-last-child(-n+2) .radio-label,
.survey-options-grid .survey-option-checkbox:nth-last-child(-n+2) .checkbox-label {
  border-bottom: none;
}

@media (max-width: 480px) {
  .survey-options-grid .survey-option-radio .radio-label,
  .survey-options-grid .survey-option-checkbox .checkbox-label {
    border-bottom: 1px solid rgba(245, 237, 230, 0.8) !important;
  }
  .survey-options-grid .survey-option-radio:last-child .radio-label,
  .survey-options-grid .survey-option-checkbox:last-child .checkbox-label {
    border-bottom: none !important;
  }
}




/* Pole tekstowe */
.survey-textarea {
  width: 100%;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--parch, #F5EDE6);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink, #201014);
  font-family: var(--sans, 'Jost', sans-serif);
  box-sizing: border-box;
  resize: vertical;
  transition: all 0.2s ease;
}

.survey-textarea:focus {
  outline: none;
  border-color: var(--r4, #D4566A);
  box-shadow: 0 0 0 3px rgba(212, 86, 106, 0.15);
}

/* Przyciski nawigacyjne */
.survey-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--parch, #F5EDE6);
  padding-top: 24px;
}

/* Dziedziczenie przycisków z motywu głównego */
.survey-nav-buttons .btn {
  font-family: var(--sans, 'Jost', sans-serif);
}

/* Ekrany błędów i sukcesu */
.text-center {
  text-align: center;
}

.error-card {
  padding: 60px 40px;
}

.error-icon {
  width: 60px;
  height: 60px;
  background: #fde8e8;
  color: #e53e3e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 24px;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: #def7ec;
  color: #057a55;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 24px;
}

.success-heart-icon {
  font-size: 64px;
  color: var(--r4, #D4566A);
  line-height: 1;
  margin-bottom: 16px;
  animation: heartBeating 1.2s infinite alternate;
}

@keyframes heartBeating {
  0% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1.05);
  }
}

.text-muted {
  color: var(--ink3, #7D4250);
}

.text-r5 {
  color: var(--r5, #B8334A);
}

.text-r6 {
  color: var(--r6, #9E2038);
}

.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mt32 { margin-top: 32px; }
.mb8  { margin-bottom: 8px; }
.mb24 { margin-bottom: 24px; }
.mb32 { margin-bottom: 32px; }

/* Ekran sukcesu */
.survey-final-manifest {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink2, #42202A);
}

.survey-email-optin {
  max-width: 400px;
  margin: 32px auto 0;
}

.survey-input-email {
  width: 100%;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--parch, #F5EDE6);
  border-radius: var(--r-pill, 100px);
  font-size: 15px;
  color: var(--ink, #201014);
  font-family: var(--sans, 'Jost', sans-serif);
  box-sizing: border-box;
  text-align: center;
  transition: all 0.2s ease;
}

.survey-input-email:focus {
  outline: none;
  border-color: var(--r4, #D4566A);
}

/* Walidacja błędu - alert */
.survey-error-message {
  background: #fde8e8;
  color: #e53e3e;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* Siatka parametrów i korzyści na ekranie startowym */
.survey-intro-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: transparent;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 237, 230, 0.7);
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--r5, #B8334A);
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-svg-icon {
  width: 100%;
  height: 100%;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.feature-text strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #201014);
}

.feature-text span {
  font-size: 13.5px;
  color: var(--ink3, #7D4250);
  line-height: 1.4;
}


