/* B2B side popup (landing_b2b_popup). Self-contained: landing pages differ
   in base CSS, so nothing here relies on Tailwind or daisyUI. */

.bp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: min(23rem, calc(100vw - 2rem));
  padding: 1.25rem 1.25rem 1.15rem;
  border: 1px solid rgba(43, 38, 68, 0.12);
  border-radius: 1.1rem;
  background: #fff;
  color: #17151e;
  font-family: "Golos Text", system-ui, sans-serif;
  box-shadow: 0 28px 70px -30px rgba(43, 38, 68, 0.45), 0 2px 8px rgba(43, 38, 68, 0.06);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bp[hidden] {
  display: none;
}

.bp.is-open {
  opacity: 1;
  transform: none;
}

.bp-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(23, 21, 30, 0.45);
  cursor: pointer;
}

.bp-close:hover {
  background: #f2f1f6;
  color: #17151e;
}

.bp-close svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.bp-step {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.bp-step[hidden] {
  display: none;
}

.bp-title {
  margin: 0;
  padding-right: 2rem;
  color: #000;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.bp-text {
  margin: 0;
  color: rgba(23, 21, 30, 0.62);
  font-size: 0.85rem;
  line-height: 1.5;
}

.bp-label {
  margin: 0.25rem 0 0;
  color: rgba(23, 21, 30, 0.8);
  font-size: 0.82rem;
  font-weight: 600;
}

.bp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bp-chip {
  min-height: 2.25rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(43, 38, 68, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #17151e;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.bp-chip:hover {
  border-color: rgba(43, 38, 68, 0.32);
}

.bp-chip[aria-checked="true"] {
  border-color: #17151e;
  background: #17151e;
  color: #fff;
}

.bp-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.bp-btn {
  min-height: 2.6rem;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(43, 38, 68, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #17151e;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.bp-btn-primary {
  flex: 1;
  border-color: #000;
  background: #000;
  color: #fff;
}

.bp-btn-primary:hover:not(:disabled) {
  background: #2d2d2d;
}

.bp-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.bp-btn:focus-visible,
.bp-chip:focus-visible,
.bp-close:focus-visible {
  outline: 2px solid #5d51b4;
  outline-offset: 2px;
}

.bp-field {
  display: grid;
  gap: 0.3rem;
  color: rgba(23, 21, 30, 0.8);
  font-size: 0.78rem;
  font-weight: 600;
}

.bp-field em {
  color: rgba(23, 21, 30, 0.42);
  font-style: normal;
  font-weight: 400;
}

.bp-field input {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(43, 38, 68, 0.16);
  border-radius: 0.65rem;
  background: #fff;
  color: #17151e;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  outline: none;
}

.bp-field input:focus {
  border-color: #5d51b4;
  box-shadow: 0 0 0 3px rgba(93, 81, 180, 0.12);
}

.bp-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  color: rgba(23, 21, 30, 0.56);
  font-size: 0.72rem;
  line-height: 1.45;
  cursor: pointer;
}

/* Drawn checkbox: landing pages restyle native inputs (one rendered it as a
   dark grey block), so the box is painted here in full. */
.bp-consent input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.05rem 0 0;
  padding: 0;
  border: 1.5px solid rgba(43, 38, 68, 0.28);
  border-radius: 0.3rem;
  background: #fff;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.bp-consent input::after {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  background: #fff;
  clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 85% 8%, 39% 69%);
  transform: scale(0);
  transition: transform 120ms ease;
}

.bp-consent input:hover {
  border-color: rgba(43, 38, 68, 0.5);
}

.bp-consent input:checked {
  border-color: #5d51b4;
  background: #5d51b4;
}

.bp-consent input:checked::after {
  transform: scale(1);
}

.bp-consent input:focus-visible {
  outline: 2px solid #5d51b4;
  outline-offset: 2px;
}

.bp-consent a {
  color: #5d51b4;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.bp-error {
  margin: 0;
  color: #9b2c2c;
  font-size: 0.78rem;
}

.bp-error[hidden] {
  display: none;
}

@media (max-width: 639px) {
  .bp {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bp {
    transition: none;
    transform: none;
  }
}
