.hksm-survey {
  --survey-blue: #2487ce;
  --survey-blue-dark: #1769a2;
  --survey-navy: #123f5f;
  --survey-ink: #17384f;
  --survey-text: #536976;
  --survey-line: #dce8ef;
  --survey-soft: #f5f9fc;
  --survey-white: #fff;
  --survey-danger: #b42318;
  color: var(--survey-ink);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.5;
  position: relative;
  z-index: 1040;
}

.hksm-survey[hidden] { display: none !important; }

.hksm-survey--floating {
  bottom: 22px;
  max-width: min(390px, calc(100vw - 28px));
  opacity: 0;
  position: fixed;
  right: 22px;
  transform: translateY(18px);
  transition: opacity .18s ease, transform .18s ease;
  width: 100%;
}

.hksm-survey--floating.hksm-survey--visible {
  opacity: 1;
  transform: translateY(0);
}

.hksm-survey--inline { margin: 0 0 1.5rem; }

.hksm-survey--modal-dismissible,
.hksm-survey--modal-blocking,
.hksm-survey--resource-gate {
  align-items: center;
  background: rgba(8, 35, 53, .62);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 20px;
  position: fixed;
  transition: opacity .18s ease;
  z-index: 1080;
}

.hksm-survey--modal-dismissible.hksm-survey--visible,
.hksm-survey--modal-blocking.hksm-survey--visible,
.hksm-survey--resource-gate.hksm-survey--visible { opacity: 1; }

.hksm-survey--modal-dismissible .hksm-survey__panel,
.hksm-survey--modal-blocking .hksm-survey__panel,
.hksm-survey--resource-gate .hksm-survey__panel { max-width: 560px; width: 100%; }

.hksm-survey__panel {
  background: var(--survey-white);
  border: 1px solid var(--survey-line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(18, 63, 95, .18);
  overflow: hidden;
}

.hksm-survey--inline .hksm-survey__panel {
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.hksm-survey__header {
  align-items: center;
  background: linear-gradient(135deg, var(--survey-navy), #17638f);
  color: var(--survey-white);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 17px 18px;
}

.hksm-survey__identity { align-items: center; display: flex; gap: 12px; min-width: 0; }

.hksm-survey__icon {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 38px;
  font-family: "Poppins", sans-serif;
  font-size: 21px;
  font-weight: 700;
  height: 38px;
  justify-content: center;
}

.hksm-survey__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  opacity: .76;
  text-transform: uppercase;
}

.hksm-survey__title {
  color: inherit;
  font-family: "Poppins", "Raleway", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  margin: 2px 0 0;
}

.hksm-survey__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--survey-white);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 25px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  opacity: .8;
}

.hksm-survey__close:hover,
.hksm-survey__close:focus-visible { background: rgba(255, 255, 255, .14); opacity: 1; }

.hksm-survey__body { padding: 20px; }
.hksm-survey__intro { color: var(--survey-text); font-size: 14px; margin: 0 0 17px; }
.hksm-survey__fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }

.hksm-survey__question {
  color: var(--survey-ink);
  float: none;
  font-family: "Poppins", "Raleway", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 12px;
  padding: 0;
  width: 100%;
}

.hksm-survey__help { color: var(--survey-text); font-size: 12px; margin: -5px 0 12px; }
.hksm-survey__choices { display: grid; gap: 9px; }

.hksm-survey__choice {
  align-items: flex-start;
  background: var(--survey-soft);
  border: 1px solid var(--survey-line);
  border-radius: 10px;
  color: var(--survey-ink);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  gap: 10px;
  padding: 10px 12px;
  transition: border-color .15s ease, background .15s ease;
}

.hksm-survey__choice:hover { background: #eef7fd; border-color: #a9d1ec; }
.hksm-survey__choice:has(input:checked) { background: #e7f4fc; border-color: var(--survey-blue); }
.hksm-survey__choice input { accent-color: var(--survey-blue); margin-top: 3px; }

.hksm-survey__text {
  background: var(--survey-white);
  border: 1px solid #bdcfda;
  border-radius: 10px;
  color: var(--survey-ink);
  display: block;
  font: inherit;
  font-size: 14px;
  padding: 11px 12px;
  resize: vertical;
  width: 100%;
}

.hksm-survey__text:focus,
.hksm-survey__choice:focus-within {
  border-color: var(--survey-blue);
  box-shadow: 0 0 0 3px rgba(36, 135, 206, .14);
  outline: 0;
}

.hksm-survey__actions { display: flex; justify-content: flex-end; margin-top: 16px; }

.hksm-survey__submit,
.hksm-survey__outcome-link {
  background: var(--survey-blue);
  border: 1px solid var(--survey-blue);
  border-radius: 8px;
  color: var(--survey-white);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  justify-content: center;
  padding: 9px 18px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.hksm-survey__submit:hover,
.hksm-survey__submit:focus-visible,
.hksm-survey__outcome-link:hover,
.hksm-survey__outcome-link:focus-visible {
  background: var(--survey-blue-dark);
  border-color: var(--survey-blue-dark);
  color: var(--survey-white);
}

.hksm-survey__submit:disabled { cursor: wait; opacity: .66; }
.hksm-survey__error { color: var(--survey-danger); font-size: 13px; margin-top: 12px; }
.hksm-survey__website { left: -10000px !important; position: absolute !important; }

.hksm-survey__success-icon {
  align-items: center;
  background: #e8f7ef;
  border-radius: 50%;
  color: #18794e;
  display: flex;
  font-size: 22px;
  font-weight: 700;
  height: 46px;
  justify-content: center;
  margin-bottom: 13px;
  width: 46px;
}

.hksm-survey__outcome-title {
  color: var(--survey-ink);
  font-family: "Poppins", "Raleway", sans-serif;
  font-size: 18px;
  margin: 0 0 7px;
}

.hksm-survey__outcome-body { color: var(--survey-text); font-size: 14px; margin: 0; white-space: pre-line; }
.hksm-survey__outcome-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }

@media (max-width: 575.98px) {
  .hksm-survey--floating { bottom: 12px; left: 12px; max-width: none; right: 12px; width: auto; }
  .hksm-survey__header { padding: 14px 15px; }
  .hksm-survey__body { max-height: min(62vh, 520px); overflow-y: auto; padding: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .hksm-survey--floating { transition: none; }
}
