/* ===================================================================
   File: client-survey.css
   Description: Client survey layout and step styling scoped to #ll-client-survey.
   =================================================================== */

#ll-client-survey {
  --ll-survey-accent: var(--ll-accent, #075dcc);
  --ll-survey-accent-dark: #073763;
  --ll-survey-muted: #64748b;
  --ll-survey-border: #d9e1ec;
  --ll-survey-text: #111827;
  --ll-survey-heading: #12345a;
  --ll-survey-option-width: 630px;
}

/* Steps */
#ll-client-survey .ll-step {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#ll-client-survey .ll-step.ll-step-active {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  opacity: 1;
  animation: llSurveyFadeIn 0.3s ease;
}

@keyframes llSurveyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Progress */
#ll-client-survey .ll-step-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

#ll-client-survey .ll-step-labels li {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #999;
}

#ll-client-survey .ll-step-labels li.active,
#ll-client-survey .ll-step-labels li.completed {
  color: var(--ll-survey-accent);
}

#ll-client-survey .ll-step-labels li.completed {
  opacity: 0.6;
}

#ll-client-survey .ll-step-labels li::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 4px auto 0;
  background: currentColor;
  border-radius: 50%;
}

#ll-client-survey .ll-progress-bar {
  width: 100%;
  height: 8px;
  margin-bottom: 18px;
  overflow: hidden;
  background: #eee;
  border-radius: 5px;
}

#ll-client-survey .ll-progress-indicator {
  width: 0;
  height: 100%;
  background: var(--ll-survey-accent);
  transition: width 0.3s ease;
}

/* Shared text */
#ll-client-survey .ll-question-heading {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

#ll-client-survey .ll-sub-note {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  font-style: italic;
  line-height: 1.25;
  text-align: center;
}

/* Standard checkbox/radio groups */
#ll-client-survey .ll-checkbox-wrapper,
#ll-client-survey .ll-answer-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: var(--ll-survey-option-width);
  margin: 0 auto 1rem;
}

#ll-client-survey .ll-checkbox-wrapper label,
#ll-client-survey .ll-answer-group label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  width: 100%;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

#ll-client-survey .ll-checkbox-wrapper input[type="checkbox"],
#ll-client-survey .ll-checkbox-wrapper input[type="radio"],
#ll-client-survey .ll-answer-group input[type="checkbox"],
#ll-client-survey .ll-answer-group input[type="radio"] {
  margin: 4px 0 0;
  transform: scale(1.05);
}

#ll-client-survey .ll-checkbox-wrapper strong {
  color: #0073e6;
  font-weight: 700;
  white-space: nowrap;
}

/* Error state */
#ll-client-survey .ll-answer-group.ll-has-error {
  outline: 2px solid #dc2626;
  outline-offset: 4px;
  border-radius: 8px;
}

#ll-client-survey .ll-answer-group.ll-has-error::after {
  content: attr(data-error-msg);
  display: block;
  margin-top: 8px;
  color: #b91c1c;
  font-size: 0.95rem;
}

/* Intro */
#ll-client-survey .ll-survey-intro {
  text-align: center;
}

#ll-client-survey .ll-survey-intro p:not(.ll-question-heading):not(.ll-sub-note) {
  text-align: left;
}

#ll-client-survey .ll-survey-intro .ll-intro-buttons {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 2rem;
}

/* Buttons */
#ll-client-survey .ll-step-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

#ll-client-survey .ll-step-buttons button {
  flex: 0 0 auto;
}

/* Community Card */
#ll-client-survey .ll-community-card-step {
  padding: 18px 20px 8px;
}

#ll-client-survey .ll-community-card-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  gap: 32px;
  align-items: center;
  margin: 12px 0 26px;
}

#ll-client-survey .ll-community-card-hero__copy h2 {
  margin: 0 0 16px;
  color: var(--ll-survey-heading);
  font-size: 34px;
  line-height: 1.18;
  font-weight: 800;
}

#ll-client-survey .ll-community-card-hero__copy h2::after {
  content: "";
  display: block;
  width: 74px;
  height: 4px;
  margin-top: 16px;
  background: #f5b82e;
  border-radius: 999px;
}

#ll-client-survey .ll-community-card-hero__lead {
  max-width: 520px;
  margin: 0 0 20px;
  color: #102033;
  font-size: 19px;
  line-height: 1.45;
}

#ll-client-survey .ll-community-card-benefits {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  color: #17233a;
  font-size: 17px;
  list-style: none;
}

#ll-client-survey .ll-community-card-benefits li {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* CSS-drawn benefit icons */
#ll-client-survey .ll-benefit-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ll-survey-accent);
}

#ll-client-survey .ll-benefit-icon::before,
#ll-client-survey .ll-benefit-icon::after {
  content: "";
  position: absolute;
  display: block;
}

/* Home icon */
#ll-client-survey .ll-benefit-icon--home::before {
  width: 14px;
  height: 11px;
  bottom: 9px;
  background: #fff;
  border-radius: 2px;
}

#ll-client-survey .ll-benefit-icon--home::after {
  width: 13px;
  height: 13px;
  top: 8px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

/* Mail icon */
#ll-client-survey .ll-benefit-icon--mail::before {
  width: 17px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 2px;
}

#ll-client-survey .ll-benefit-icon--mail::after {
  width: 12px;
  height: 12px;
  top: 9px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* People icon */
#ll-client-survey .ll-benefit-icon--people::before {
  width: 8px;
  height: 8px;
  top: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: -7px 5px 0 -2px #fff, 7px 5px 0 -2px #fff;
}

#ll-client-survey .ll-benefit-icon--people::after {
  width: 18px;
  height: 8px;
  bottom: 8px;
  background: #fff;
  border-radius: 10px 10px 4px 4px;
}

#ll-client-survey .ll-community-card-hero__image-wrap {
  position: relative;
}

#ll-client-survey .ll-community-card-hero__image {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: cover;
  border-radius: 8px;
}

#ll-client-survey .ll-community-card-callout {
  position: absolute;
  right: -30px;
  bottom: -20px;
  max-width: 255px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #dc2626;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

/* Community Card question cards */
#ll-client-survey .ll-survey-question-card {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--ll-survey-border);
  border-radius: 12px;
  background: #fff;
}

#ll-client-survey .ll-survey-question-card__heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

#ll-client-survey .ll-survey-question-number {
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ll-survey-accent);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

#ll-client-survey .ll-survey-question-card h3 {
  margin: 4px 0 0;
  color: var(--ll-survey-text);
  font-size: 19px;
  line-height: 1.35;
}

#ll-client-survey .ll-survey-question-card h3 span {
  font-size: 15px;
  font-weight: 400;
}

/* Price cards */
#ll-client-survey .ll-price-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 14px;
}

#ll-client-survey .ll-price-card-option {
  display: grid;
  min-height: 92px;
  padding: 12px 10px;
  place-items: center;
  border: 1px solid var(--ll-survey-border);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

#ll-client-survey .ll-price-card-option input {
  margin: 0 0 8px;
}

#ll-client-survey .ll-price-card-option:has(input:checked) {
  border-color: var(--ll-survey-accent);
  box-shadow: 0 0 0 1px var(--ll-survey-accent) inset;
}

/* Area grid */
#ll-client-survey .ll-postcard-city-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px 26px;
  width: 100%;
  max-width: none;
  margin: 0;
}

#ll-client-survey .ll-postcard-city-grid .ll-city-option {
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

#ll-client-survey .ll-postcard-city-grid .ll-city-option input[type="checkbox"] {
  margin: 0;
  transform: scale(1.05);
}

#ll-client-survey .ll-city-option__text {
  line-height: 1.25;
}

/* Final footer */
#ll-client-survey .ll-community-card-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 20px 0 4px;
}

#ll-client-survey .ll-survey-privacy-note {
  max-width: 540px;
  margin: 0 auto;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

/* Small utility classes still used by survey steps */
#ll-client-survey .ll-left {
  text-align: left !important;
}

#ll-client-survey .ll-center {
  text-align: center;
}

#ll-client-survey .ll-img-rounded {
  display: block;
  height: auto;
  margin: 20px auto 30px;
  border-radius: 12px;
}

#dashboard-modal ol li {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  #ll-client-survey .ll-survey-intro .ll-intro-buttons {
    justify-content: center;
  }

  #ll-client-survey .ll-survey-intro .ll-intro-buttons .ll-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive */
@media (max-width: 900px) {
  #ll-client-survey .ll-community-card-hero,
  #ll-client-survey .ll-community-card-footer {
    grid-template-columns: 1fr;
  }

  #ll-client-survey .ll-price-card-grid,
  #ll-client-survey .ll-postcard-city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #ll-client-survey .ll-community-card-callout {
    position: static;
    max-width: none;
    margin-top: 10px;
  }
}

@media (max-width: 560px) {
  #ll-client-survey .ll-community-card-step {
    padding: 12px 10px 4px;
  }

  #ll-client-survey .ll-community-card-hero__copy h2 {
    font-size: 27px;
  }

  #ll-client-survey .ll-community-card-hero__lead {
    font-size: 17px;
  }

  #ll-client-survey .ll-price-card-grid,
  #ll-client-survey .ll-postcard-city-grid {
    grid-template-columns: 1fr;
  }

  #ll-client-survey .ll-step-labels li {
    font-size: 12px;
  }
}