/* Keep the Bitrix contact widget aligned with the native scroll-to-top button. */
.b24-widget-button-wrapper.b24-widget-button-position-bottom-right {
  right: 24px !important;
  bottom: 88px !important;
  width: 52px !important;
  height: 52px !important;
  z-index: 10150 !important;
}

.b24-widget-button-wrapper .b24-widget-button-inner-container,
.b24-widget-button-wrapper .b24-widget-button-block,
.b24-widget-button-wrapper .b24-widget-button-inner-block,
.b24-widget-button-wrapper .b24-widget-button-icon-container,
.b24-widget-button-wrapper .b24-widget-button-inner-item {
  width: 52px !important;
  height: 52px !important;
}

.b24-widget-button-wrapper .b24-widget-button-inner-container {
  transform: none !important;
}

.b24-widget-button-wrapper .b24-widget-button-inner-mask {
  inset: 0 !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
  background: linear-gradient(157.969deg, #869af5 3.055%, #35345f 119.1%) !important;
  box-shadow: 0 14px 34px rgba(53, 52, 95, 0.24) !important;
}

.b24-widget-button-wrapper .b24-widget-button-inner-block,
.b24-widget-button-wrapper .b24-widget-button-block,
.b24-widget-button-wrapper .b24-widget-button-inner-item {
  border-radius: 14px !important;
}

.b24-widget-button-wrapper .b24-widget-button-inner-block {
  background: linear-gradient(157.969deg, #869af5 3.055%, #35345f 119.1%) !important;
}

.b24-widget-button-wrapper .b24-widget-button-inner-mask,
.b24-widget-button-wrapper .b24-widget-button-pulse,
.b24-widget-button-wrapper .b24-widget-button-shadow {
  display: none !important;
}

.b24-widget-button-wrapper .b24-crm-button-icon {
  width: 24px !important;
  height: 24px !important;
}

.b24-widget-button-wrapper .b24-crm-button-icon path {
  fill: #fff !important;
}

@media (max-width: 620px) {
  .b24-widget-button-wrapper.b24-widget-button-position-bottom-right {
    right: 16px !important;
    bottom: 74px !important;
    width: 46px !important;
    height: 46px !important;
  }

  .b24-widget-button-wrapper .b24-widget-button-inner-container,
  .b24-widget-button-wrapper .b24-widget-button-block,
  .b24-widget-button-wrapper .b24-widget-button-inner-block,
  .b24-widget-button-wrapper .b24-widget-button-icon-container,
  .b24-widget-button-wrapper .b24-widget-button-inner-item,
  .b24-widget-button-wrapper .b24-widget-button-inner-mask {
    width: 46px !important;
    height: 46px !important;
  }

  .b24-widget-button-wrapper .b24-widget-button-inner-mask,
  .b24-widget-button-wrapper .b24-widget-button-inner-block,
  .b24-widget-button-wrapper .b24-widget-button-block,
  .b24-widget-button-wrapper .b24-widget-button-inner-item {
    border-radius: 12px !important;
  }
}

/* Keep form text legible when the existing JS/CSS bundle is pinned in production. */
@media (hover: none) and (pointer: coarse) {
  input:not([type]),
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  input[type="password"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="time"],
  input[type="month"],
  input[type="week"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Keep Contact form validation from moving the consent row over the fields. */
.special-page-contact .special-contact-field-error {
  left: 12px;
  bottom: -13px;
  color: #ffb5bd;
  font-size: 9px;
  line-height: 1;
}

.special-page-contact .special-contact-consent > input[type="checkbox"] {
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2 !important;
  cursor: pointer;
  border: 1px solid #fff !important;
  border-radius: 2px !important;
  background: transparent !important;
}

.special-page-contact .special-contact-consent > input[type="checkbox"]:checked {
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' fill='none' stroke='%236f82e5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 14px 14px !important;
}

.special-page-contact .special-contact-consent > i {
  pointer-events: none;
  visibility: hidden;
}

.special-page-contact .special-contact-consent.is-invalid {
  top: 147px;
}

.special-page-contact .special-contact-consent-error {
  top: auto;
  bottom: -10px;
}

@media (max-width: 620px) {
  .special-page-contact .special-contact-form {
    height: 348px;
  }

  .special-page-contact .special-contact-consent.is-invalid {
    top: 259px;
  }
}

/*
 * Price updates resize the calculator scope and make its ResizeObserver
 * briefly remeasure the sticky result grid at the cards' full height. Do not
 * animate that internal 450px -> 168px measurement cycle: it otherwise looks
 * like both result cards jump whenever an option is changed.
 */
@media (min-width: 768px) {
  .special-page-kalkulyator
    .plans--calculator-results
    .plan-grid.is-calculator-sticky
    .plan-card {
    transition-property: border-radius, box-shadow !important;
  }
}

/* ООО has one more tax-system option than ИП. Reserve the taller state so the
 * calculator panel and every section below it stay put when the type changes. */
@media (min-width: 1101px) {
  .special-page-kalkulyator .tariff-calc-tax {
    min-height: 462px;
  }
}
