.callback-widget {
  --callback-navy: #11143f;
  --callback-blue: #2f3492;
  --callback-blue-light: #929bf2;
  --callback-blue-soft: #eff0ff;
  --callback-orange: #f58220;
  --callback-green: #128447;
  --callback-green-dark: #0d6938;
  --callback-ink: #181b4a;
  --callback-body: #505878;
  --callback-line: #dfe1f2;
  position: fixed;
  z-index: 1300;
  right: 22px;
  bottom: max(22px, env(safe-area-inset-bottom));
  width: min(370px, calc(100vw - 32px));
  color: var(--callback-ink);
  font-family: "DM Sans", Arial, sans-serif;
  pointer-events: none;
}

.callback-widget *,
.callback-widget *::before,
.callback-widget *::after {
  box-sizing: border-box;
}

.callback-toggle,
.callback-panel {
  pointer-events: auto;
}

.callback-toggle {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 9px 15px 9px 10px;
  color: #ffffff;
  background: var(--callback-green);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(17, 20, 63, 0.26);
  cursor: pointer;
  transition: background-color 240ms ease, transform 240ms ease, opacity 200ms ease;
}

.callback-toggle:hover {
  background: var(--callback-green-dark);
  transform: translateY(-2px);
}

.callback-toggle:focus-visible,
.callback-close:focus-visible,
.callback-submit:focus-visible,
.callback-form input:focus-visible {
  outline: 3px solid var(--callback-orange);
  outline-offset: 3px;
}

.callback-toggle-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  color: var(--callback-green);
  background: #ffffff;
  border-radius: 6px;
}

.callback-icon {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.callback-toggle-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.callback-toggle-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.callback-toggle-copy small {
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  line-height: 1.2;
}

.callback-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--callback-line);
  border-top: 4px solid var(--callback-blue);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(17, 20, 63, 0.28);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transform-origin: right bottom;
  transition: opacity 240ms ease, transform 240ms ease;
}

.callback-widget.is-open .callback-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.callback-widget.is-open .callback-toggle {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.callback-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--callback-blue);
  background: var(--callback-blue-soft);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color 220ms ease, background-color 220ms ease;
}

.callback-close:hover {
  color: #ffffff;
  background: var(--callback-blue);
}

.callback-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 48px 12px 0;
  color: var(--callback-blue);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.callback-kicker::before {
  width: 20px;
  height: 3px;
  background: var(--callback-orange);
  content: "";
}

.callback-panel h2 {
  margin: 0 42px 10px 0;
  color: var(--callback-ink);
  font-family: "Syne", Arial, sans-serif;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: 0;
}

.callback-panel > p {
  margin: 0 0 20px;
  color: var(--callback-body);
  font-size: 14px;
  line-height: 1.55;
}

.callback-form {
  display: grid;
  gap: 13px;
}

.callback-field {
  display: grid;
  gap: 6px;
}

.callback-field label {
  color: var(--callback-ink);
  font-size: 13px;
  font-weight: 800;
}

.callback-field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--callback-ink);
  background: #ffffff;
  border: 1px solid #cfd3e7;
  border-radius: 6px;
  font: inherit;
  font-size: 15px;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.callback-field input::placeholder {
  color: #7d85a6;
}

.callback-field input:focus {
  border-color: var(--callback-blue);
  box-shadow: 0 0 0 4px rgba(47, 52, 146, 0.1);
}

.callback-field input[aria-invalid="true"] {
  border-color: #b42318;
}

.callback-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: var(--callback-body);
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
}

.callback-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--callback-blue);
}

.callback-error {
  min-height: 0;
  color: #b42318;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.callback-error:empty {
  display: none;
}

.callback-submit {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  color: #ffffff;
  background: var(--callback-green);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(18, 132, 71, 0.22);
  transition: background-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.callback-submit:hover {
  background: var(--callback-green-dark);
  box-shadow: 0 15px 28px rgba(13, 105, 56, 0.28);
  transform: translateY(-1px);
}

.callback-status {
  margin: 0;
  color: var(--callback-green-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.callback-status:empty {
  display: none;
}

.callback-note {
  margin: 0;
  color: #737a9a;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 560px) {
  .callback-widget {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: calc(100vw - 28px);
  }

  .callback-toggle {
    min-height: 58px;
    padding: 8px 12px 8px 8px;
  }

  .callback-toggle-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .callback-panel {
    max-height: calc(100dvh - 28px);
    padding: 24px 20px 20px;
  }

  .callback-panel h2 {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .callback-toggle,
  .callback-panel,
  .callback-close,
  .callback-submit {
    transition-duration: 0.01ms !important;
  }
}
