.wb-widget {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 999;
  font-family: "Inter", sans-serif;
}
@media (max-width: 480px) {
  .wb-widget {
    left: 16px;
    bottom: 16px;
  }
}

.wb-widget__capsule {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  padding: 6px 20px 6px 6px;
  background: linear-gradient(87.91deg, #42BBEB 0%, #3951DB 102.6%);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wb-widget__capsule:hover {
  transform: translateY(-2px);
}
.wb-widget.is-open .wb-widget__capsule {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

.wb-widget__capsule-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #fff;
  flex-shrink: 0;
}
.wb-widget__capsule-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.wb-widget__capsule-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
  color: #fff;
  text-align: left;
}
.wb-widget__capsule-text b {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.wb-widget__capsule-text i {
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
}
@media (max-width: 480px) {
  .wb-widget__capsule-text b {
    font-size: 13px;
  }
}

/* Обёртка капсулы + крестик сворачивания */
.wb-widget__capsule-wrap {
  position: relative;
  display: inline-block;
}

.wb-widget__minimize {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(19, 19, 19, 0.2);
  color: #121315;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.wb-widget__minimize:hover {
  transform: scale(1.1);
}
.wb-widget.is-open .wb-widget__minimize {
  opacity: 0;
  pointer-events: none;
}

/* Свёрнутое состояние: только круглая иконка, без текста и призывов */
.wb-widget.is-minimized .wb-widget__capsule {
  padding: 6px;
  gap: 0;
}
.wb-widget.is-minimized .wb-widget__capsule-text,
.wb-widget.is-minimized .wb-widget__minimize,
.wb-widget.is-minimized .wb-widget__bubble {
  display: none;
}

.wb-widget__bubble {
  position: absolute;
  left: 4px;
  bottom: calc(100% + 16px);
  width: max-content;
  max-width: 260px;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px 10px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.08)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12)) drop-shadow(0 9px 28px rgba(0, 0, 0, 0.05));
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transform-origin: bottom left;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.wb-widget__bubble::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 100%;
  border: 7px solid transparent;
  border-top-color: #fff;
}
.wb-widget__bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.wb-widget.is-open .wb-widget__bubble {
  display: none;
}

.wb-widget__bubble-title {
  display: block;
  font-family: "Inter", sans-serif;
  color: #121315;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.wb-widget__banner {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 380px;
  max-width: calc(100vw - 48px);
  box-sizing: border-box;
  padding: 28px;
  border-radius: 24px;
  background-color: #fff;
  box-shadow: 0 24px 60px rgba(19, 19, 19, 0.18);
  overflow: hidden;
}
.wb-widget__banner::before {
  content: "";
  position: absolute;
  top: 10%;
  right: -25%;
  left: auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: linear-gradient(185.24deg, rgba(255, 255, 255, 0.64) -25.87%, rgba(67, 108, 221, 0.64) 20.25%);
  filter: blur(10px);
  pointer-events: none;
  opacity: 0.15;
  z-index: 0;
}
.wb-widget__banner {
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transform-origin: bottom left;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.wb-widget.is-open .wb-widget__banner {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (max-width: 480px) {
  .wb-widget__banner {
    padding: 22px;
    border-radius: 20px;
  }
}

.wb-widget__banner-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.wb-widget__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  color: rgb(19, 19, 19);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.wb-widget__close:hover {
  background-color: #fff;
}

.wb-widget__badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(87.91deg, #42BBEB 0%, #3951DB 102.6%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.wb-widget__title {
  position: relative;
  z-index: 1;
  max-width: 90%;
  margin: 0 0 14px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: rgb(19, 19, 19);
}
.wb-widget .wb-gradient-text {
  background: linear-gradient(87.91deg, #42BBEB 0%, #3951DB 102.6%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 480px) {
  .wb-widget__title {
    font-size: 21px;
    max-width: 85%;
  }
}

.wb-widget__desc {
  position: relative;
  z-index: 1;
  max-width: 78%;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: rgba(19, 19, 19, 0.6);
}
.wb-widget__desc b {
  font-weight: 600;
  color: #3951DB;
}
.wb-widget__desc .wb-gradient-text {
  display: block;
}

.wb-widget__date {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(19, 19, 19, 0.08);
  font-size: 14px;
  letter-spacing: -0.02em;
  color: rgb(19, 19, 19);
}
.wb-widget__date img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.wb-widget__date b {
  font-weight: 700;
}

/* Фоновое изображение карточки (загружается из админки) */
.wb-widget__banner--bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.wb-widget__banner--bg::before {
  display: none;
}

/* Карточка без текстовых полей: показываем изображение целиком (квадрат 1:1) */
.wb-widget__banner--img-only {
  aspect-ratio: 1/1;
  padding: 0;
}

/* Блок «На вебинаре сделаем» */
.wb-widget__todo {
  position: relative;
  z-index: 1;
  background-color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 16px;
  box-shadow: 0 6px 18px rgba(19, 19, 19, 0.08);
}
.wb-widget__todo-title {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #3951DB;
}
.wb-widget__todo ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.wb-widget__todo li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #121315;
}
.wb-widget__todo li:last-child {
  margin-bottom: 0;
}
.wb-widget__todo li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%233951DB'/%3E%3Cpath d='M4.5 8.3l2.3 2.3 4.7-4.9' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/contain;
}
