/* ============================================================
   Survey Pages — SmartUrbanity
   ============================================================ */

/* Language Toggle */
.lang-toggle {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.lang-toggle button {
  padding: 5px 13px;
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  font-family: var(--nav-font);
}

.lang-toggle button.active,
.lang-toggle button:hover {
  background: var(--accent-color);
  color: #fff;
}

/* Survey intro block */
.survey-intro-block {
  background: #fff;
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem 1.75rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 2.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.survey-intro-block h2 {
  font-size: 1.4rem;
  color: var(--heading-color);
  margin-bottom: 0.75rem;
}

.survey-intro-block p {
  color: #555;
  font-size: 0.97rem;
  line-height: 1.7;
  margin: 0;
}

/* Survey Cards */
.survey-card {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.survey-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.survey-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}

.survey-number {
  width: 34px;
  height: 34px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.survey-card-title {
  flex: 1;
  min-width: 0;
}

.category-badge {
  font-size: 0.72rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.survey-card-title h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toggle-icon {
  transition: transform 0.25s;
  color: #888;
  font-size: 1rem;
  flex-shrink: 0;
}

.survey-card.open .toggle-icon {
  transform: rotate(180deg);
}

.survey-card-body {
  border-top: 1px solid #ececec;
  padding: 1.25rem 1.5rem;
  background: #fafafa;
  display: none;
}

.survey-card.open .survey-card-body {
  display: block;
}

.survey-card-body .description {
  color: #555;
  margin-bottom: 1.1rem;
  font-size: 0.94rem;
  line-height: 1.65;
}

.survey-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-fill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 8px 18px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-fill:hover {
  background: #007a4e;
  color: #fff;
}

.btn-schema {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 8px 18px;
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-schema:hover {
  background: var(--accent-color);
  color: #fff;
}

/* Language fallback notice on survey cards */
.lang-fallback-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #7a6200;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 5px;
  padding: 6px 10px;
  margin-bottom: 0.9rem;
}

/* Loading / error states */
.survey-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
}

/* ============================================================
   Survey Form Page
   ============================================================ */

.survey-form-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #666;
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent-color);
}

.form-survey-title {
  font-size: 1.5rem;
  color: var(--heading-color);
  margin-bottom: 1.5rem;
}

/* Progress bar */
.form-progress {
  margin-bottom: 2rem;
}

.progress-label {
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 6px;
}

.progress-bar-outer {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: var(--accent-color);
  border-radius: 3px;
  transition: width 0.35s ease;
}

/* Section header */
.section-header {
  padding: 1.4rem 1.6rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #222;
}

.section-header p {
  color: #555;
  font-size: 0.93rem;
  line-height: 1.65;
  margin: 0;
}

/* Question blocks */
.question-block {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
}

.question-text {
  font-weight: 500;
  margin-bottom: 0.9rem;
  line-height: 1.55;
  color: #1e1e1e;
  font-size: 0.97rem;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1.45;
  font-size: 0.93rem;
  color: #333;
}

.option-label:hover {
  background: #f3faf7;
}

.option-label input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 10px 24px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 0.93rem;
  font-weight: 500;
  transition: all 0.2s;
  font-family: var(--default-font);
}

.btn-prev {
  background: #f0f0f0;
  color: #444;
}

.btn-prev:hover {
  background: #e0e0e0;
}

.btn-next {
  background: var(--accent-color);
  color: #fff;
}

.btn-next:hover {
  background: #007a4e;
}

.btn-submit {
  background: var(--accent-color);
  color: #fff;
  padding: 11px 30px;
  font-size: 0.97rem;
}

.btn-submit:hover:not(:disabled) {
  background: #007a4e;
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Thank you screen */
.thank-you-screen {
  text-align: center;
  padding: 4rem 2rem;
}

.thank-you-screen .checkmark-icon {
  font-size: 4rem;
  color: var(--accent-color);
  display: block;
  margin-bottom: 1rem;
}

.thank-you-screen h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--heading-color);
}

.thank-you-screen p {
  color: #555;
  max-width: 480px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 576px) {
  .survey-card-header {
    padding: 0.85rem 1rem;
  }
  .survey-card-body {
    padding: 1rem;
  }
  .survey-actions {
    flex-direction: column;
  }
  .btn-fill, .btn-schema {
    width: 100%;
    justify-content: center;
  }
  .form-navigation {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
  .btn-nav {
    width: 100%;
    justify-content: center;
  }
}
