.survey-modal .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(21, 114, 232, 0.18);
}

.survey-modal .modal-dialog {
  max-width: 640px;
}

.survey-hero {
  background: linear-gradient(135deg, #1572e8 0%, #48abf7 100%);
  color: #fff;
  padding: 1.5rem 1.75rem 1.25rem;
}

.survey-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.survey-hero h3 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.survey-hero p {
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  font-size: 0.95rem;
}

.survey-progress-wrap {
  margin-top: 1rem;
}

.survey-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.95);
}

.survey-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.survey-progress-bar {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.survey-body {
  padding: 1.25rem 1.25rem 0.5rem;
  background: #f8fbff;
  max-height: min(58vh, 520px);
  overflow-y: auto;
}

.survey-card {
  background: #fff;
  border: 1px solid #e8eef7;
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.survey-card.is-answered {
  border-color: #b9dbff;
  box-shadow: 0 6px 18px rgba(21, 114, 232, 0.08);
}

.survey-card.is-error {
  border-color: #f3b0b8;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.survey-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.survey-card-no {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #edf4ff;
  color: #1572e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.survey-card.is-answered .survey-card-no {
  background: #1572e8;
  color: #fff;
}

.survey-card-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.45;
  margin: 0;
}

.survey-card-optional {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #7b8794;
  font-weight: 400;
}

.survey-scale-hint {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #8a96a3;
  margin-bottom: 0.55rem;
}

.survey-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}

.survey-scale-btn {
  appearance: none;
  border: 2px solid #dbe6f5;
  background: #fff;
  border-radius: 12px;
  min-height: 72px;
  padding: 0.45rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  transition: all 0.18s ease;
  color: #4f5d6b;
}

.survey-scale-btn:hover {
  border-color: #9ec7ff;
  transform: translateY(-1px);
}

.survey-scale-btn.is-selected {
  border-color: #1572e8;
  background: #edf4ff;
  color: #1572e8;
  box-shadow: 0 8px 18px rgba(21, 114, 232, 0.15);
}

.survey-scale-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.survey-scale-score {
  font-size: 0.95rem;
  font-weight: 700;
}

.survey-scale-label {
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

.survey-textarea {
  width: 100%;
  border: 2px solid #dbe6f5;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  min-height: 96px;
  resize: vertical;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.survey-textarea:focus {
  outline: none;
  border-color: #1572e8;
  box-shadow: 0 0 0 3px rgba(21, 114, 232, 0.12);
}

.survey-footer {
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
  border-top: 1px solid #edf2f8;
}

.survey-footer-hint {
  text-align: center;
  font-size: 0.85rem;
  color: #7b8794;
  margin-bottom: 0.75rem;
}

.survey-footer-hint.is-ready {
  color: #1f8f4e;
}

.survey-btn-download {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #1572e8 0%, #48abf7 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.survey-btn-download:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.survey-btn-download:not(:disabled):hover {
  transform: translateY(-1px);
}

.survey-btn-skip {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  border: 0;
  background: transparent;
  color: #9aa5b1;
  font-size: 0.88rem;
  text-decoration: underline;
  padding: 0.35rem;
}

.survey-btn-skip:hover {
  color: #6c757d;
}

@media (max-width: 575.98px) {
  .survey-modal .modal-dialog {
    margin: 0;
    max-width: 100%;
    min-height: 100%;
  }

  .survey-modal .modal-content {
    min-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .survey-body {
    flex: 1 1 auto;
    max-height: none;
  }

  .survey-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .survey-scale-btn {
    min-height: 64px;
    padding: 0.35rem 0.15rem;
  }

  .survey-scale-label {
    display: none;
  }
}
