.smart-guide {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9999;
  width: min(380px, calc(100vw - 28px));
  pointer-events: none;
  font-family: "Poppins", sans-serif;
}

.pbmit-progress-wrap {
  right: 34px !important;
  bottom: 176px !important;
}

.smart-guide * {
  box-sizing: border-box;
}

.smart-guide__panel,
.smart-guide__toggle {
  pointer-events: auto;
}

.smart-guide__panel {
  position: relative;
  margin: 0 28px 112px 0;
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(13, 33, 71, 0.1);
  box-shadow:
    0 26px 70px rgba(9, 20, 43, 0.18),
    0 10px 28px rgba(9, 20, 43, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s ease;
}

.smart-guide.is-open .smart-guide__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.smart-guide__header {
  position: relative;
  padding: 22px 24px 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(135deg, #1d4694 0%, #17336b 52%, #0f2348 100%);
  color: #ffffff;
}

.smart-guide__header::after {
  content: "";
  position: absolute;
  inset: auto 24px 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.smart-guide__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.smart-guide__kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f1c27d;
  box-shadow: 0 0 0 6px rgba(241, 194, 125, 0.14);
}

.smart-guide__title {
  margin: 0;
  font-size: 29px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.smart-guide__subtitle {
  margin: 8px 54px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.smart-guide__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.smart-guide__close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.smart-guide__body {
  padding: 22px 22px 18px;
}

.smart-guide__thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.smart-guide__bubble {
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
  border: 1px solid rgba(23, 51, 107, 0.08);
  color: #1f3358;
  font-size: 15px;
  line-height: 1.65;
  box-shadow: 0 8px 22px rgba(13, 33, 71, 0.05);
}

.smart-guide__bubble--soft {
  background: #f6f8fd;
  box-shadow: none;
}

.smart-guide__question {
  margin: 2px 2px 10px;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
  color: #4c5f81;
}

.smart-guide__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.smart-guide__chip {
  appearance: none;
  border: 1px solid rgba(30, 58, 112, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #17336b;
  padding: 11px 15px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.smart-guide__chip:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 70, 148, 0.3);
  box-shadow: 0 8px 16px rgba(23, 51, 107, 0.08);
}

.smart-guide__chip.is-active {
  background: linear-gradient(135deg, #1d4694 0%, #17336b 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 20px rgba(29, 70, 148, 0.22);
}

.smart-guide__summary {
  padding: 16px 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(29, 70, 148, 0.09) 0%, rgba(241, 194, 125, 0.12) 100%),
    #f8faff;
  border: 1px solid rgba(29, 70, 148, 0.08);
}

.smart-guide__summary-title {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: #17336b;
}

.smart-guide__summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-guide__summary-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #30476f;
  font-size: 13px;
  font-weight: 600;
}

.smart-guide__actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.smart-guide__primary,
.smart-guide__secondary {
  appearance: none;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.smart-guide__primary {
  flex: 1 1 auto;
  border: 0;
  background: linear-gradient(135deg, #1d4694 0%, #17336b 100%);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(29, 70, 148, 0.24);
}

.smart-guide__primary:hover {
  transform: translateY(-1px);
}

.smart-guide__secondary {
  flex: 0 0 auto;
  border: 1px solid rgba(23, 51, 107, 0.1);
  background: #ffffff;
  color: #30476f;
}

.smart-guide__secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(23, 51, 107, 0.08);
}

.smart-guide__footer-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: #7f8ca3;
}

.smart-guide__toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 118px;
  height: 128px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  overflow: visible;
}

.smart-guide__toggle-card {
  position: absolute;
  inset: 0;
  border-radius: 28px 28px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 247, 255, 0.98) 100%);
  border: 2px solid rgba(29, 70, 148, 0.2);
  box-shadow:
    0 18px 34px rgba(13, 33, 71, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  z-index: 1;
}

.smart-guide__toggle-card::before {
  content: "";
  position: absolute;
  inset: 14px 14px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #eef3ff 100%);
}

.smart-guide__toggle-ring {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #0bb783;
  box-shadow: 0 0 0 7px rgba(11, 183, 131, 0.16);
  z-index: 3;
}

.smart-guide__toggle-image {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 6px;
  height: 120px;
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
}

.smart-guide__toggle-badge {
  position: absolute;
  right: -6px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d4694 0%, #17336b 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 16px 28px rgba(29, 70, 148, 0.28);
  z-index: 4;
}

.smart-guide__toggle-label {
  position: absolute;
  top: -30px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(12, 24, 48, 0.88);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 12px 20px rgba(10, 22, 44, 0.2);
  z-index: 5;
}

.smart-guide:not(.is-open) .smart-guide__toggle-card {
  animation: smartGuideFloat 3.6s ease-in-out infinite;
}

.smart-guide__form-note {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(29, 70, 148, 0.08) 0%, rgba(241, 194, 125, 0.12) 100%),
    #f8fbff;
  border: 1px solid rgba(29, 70, 148, 0.08);
}

.smart-guide__form-note strong {
  display: block;
  margin-bottom: 6px;
  color: #17336b;
  font-size: 14px;
}

.smart-guide__form-note span {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #476089;
  font-size: 13px;
  line-height: 1.55;
}

#contact-form.smart-guide-form-ready {
  box-shadow: 0 0 0 4px rgba(29, 70, 148, 0.08);
  border-radius: 20px;
}

@keyframes smartGuideFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 1199px) {
  .smart-guide {
    width: min(360px, calc(100vw - 24px));
  }

  .smart-guide__panel {
    margin-right: 18px;
  }
}

@media (max-width: 767px) {
  .smart-guide {
    right: 12px;
    bottom: 12px;
    width: min(340px, calc(100vw - 20px));
  }

  .pbmit-progress-wrap {
    right: 24px !important;
    bottom: 146px !important;
  }

  .smart-guide__panel {
    margin: 0 0 98px;
  }

  .smart-guide__header {
    padding: 20px 20px 18px;
  }

  .smart-guide__title {
    font-size: 24px;
  }

  .smart-guide__subtitle {
    margin-right: 48px;
    font-size: 13px;
  }

  .smart-guide__body {
    padding: 18px 18px 16px;
  }

  .smart-guide__actions {
    flex-direction: column;
  }

  .smart-guide__secondary {
    width: 100%;
  }

  .smart-guide__toggle {
    width: 96px;
    height: 108px;
  }

  .smart-guide__toggle-card::before {
    inset: 10px 10px 18px;
  }

  .smart-guide__toggle-image {
    left: 4px;
    right: 4px;
    height: 100px;
  }

  .smart-guide__toggle-badge {
    right: -4px;
    bottom: 10px;
    min-width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .smart-guide__toggle-label {
    top: -24px;
  }
}
