@charset "UTF-8";
/**
 * Contact widget: "Напишите нам, Мы онлайн!" button and its windows.
 *
 * Sizes come from the Figma design "окна на сайте kessak". There the windows
 * are drawn at 79.47 % of a 512 px base, and the numbers below use that scale:
 * window 512 -> 407 px, font 24 -> 19 px. On top of it the button is 10 % smaller
 * and the contact options window 15 % smaller ($cw-button-scale, $cw-menu-scale).
 * The button sits in the screen corner, the windows 40 px from the edges.
 * Font is the site's Mulish.
 * Visible on screens from 993 px wide (the site's .hide-md breakpoint is 992 px).
 */
.contact-widget {
  display: none;
}

@media (min-width: 993px) {
  .contact-widget {
    display: block;
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 500;
    font-family: "Mulish", Arial, sans-serif;
  }
}
.contact-widget__defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Button */
.contact-widget__button {
  position: relative;
  display: flex;
  align-items: center;
  width: 367px;
  height: 66px;
  margin: 0;
  padding: 0 0 0 108px;
  border: 0;
  background: #472f2b;
  color: #fff;
  font: 400 17px/1.5 "Mulish", Arial, sans-serif;
  letter-spacing: -0.011em;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  appearance: none;
  clip-path: url(#contact-widget-shape);
  transform-origin: right bottom;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}
.contact-widget__button:hover, .contact-widget__button:focus-visible {
  filter: brightness(1.2);
}
.contact-widget__button:focus-visible {
  outline: none;
}
.contact-widget__button:focus-visible .contact-widget__button-text {
  text-decoration: underline;
}
.contact-widget--open .contact-widget__button {
  opacity: 0;
  transform: scale(0.85);
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

.contact-widget__button-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 94px;
  height: 94px;
  background: url("../img/button-online.svg") no-repeat 0 0/100% 100%;
  pointer-events: none;
}

/* Windows (native <dialog>, opened with show() while the button is hidden) */
.contact-widget__window {
  position: absolute;
  inset: auto 40px 40px auto;
  max-height: calc(100vh - 80px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 11px;
  background: #fff;
  color: #472f2b;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  transform-origin: right bottom;
}
.contact-widget__window[open] {
  animation: contact-widget-window-in 0.2s ease-out;
}

@keyframes contact-widget-window-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}
/* Window 1: contact options, 15 % smaller than the design scale */
.contact-widget__menu {
  width: 346px;
  border-radius: 9px;
}

.contact-widget__menu-title {
  height: 57px;
  padding: 19px 14px 0 40px;
  background: #472f2b;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.011em;
}

.contact-widget__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact-widget__list li + li {
  border-top: 1.5px solid #b5b5b5;
}

.contact-widget__item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 55px;
  margin: 0;
  padding: 0 14px 0 65px;
  border: 0;
  background: transparent;
  color: #472f2b;
  font: 500 16px/1.5 "Mulish", Arial, sans-serif;
  letter-spacing: -0.011em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.contact-widget__item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  background: no-repeat center/100% 100%;
}
.contact-widget__item:hover, .contact-widget__item:focus-visible {
  background-color: #f8f8f8;
  color: #472f2b;
  text-decoration: none;
}
.contact-widget__item:focus-visible {
  outline: 2px solid #472f2b;
  outline-offset: -2px;
}
.contact-widget__item--phone::before, .contact-widget__item--callback::before {
  width: 18px;
  height: 18px;
}
.contact-widget__item--phone::before {
  background-image: url("../img/phone.svg");
}
.contact-widget__item--callback::before {
  background-image: url("../img/callback.svg");
}
.contact-widget__item--whatsapp::before {
  background-image: url("../img/whatsapp.svg");
}
.contact-widget__item--telegram::before {
  background-image: url("../img/telegram.svg");
}
.contact-widget__item--max::before {
  background-image: url("/img/icons/contact-max.svg");
}
.contact-widget__item--vk::before {
  background-image: url("../img/vk.svg");
}
.contact-widget__item--cancel {
  min-height: 59px;
}

/* Window 2: callback request form */
.contact-widget__callback {
  width: 377px;
  padding: 22px 72px;
  border-radius: 10px;
  text-align: center;
}

.contact-widget__callback-title {
  margin-bottom: 16px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.011em;
}

.contact-widget__field {
  margin: 0 0 12px;
  text-align: left;
}

.contact-widget__input {
  display: block;
  width: 100%;
  height: 33px;
  padding: 0 10px;
  border: 1px solid #949494;
  border-radius: 8px;
  background: #fff;
  color: #472f2b;
  font: 500 19px/1.5 "Mulish", Arial, sans-serif;
  letter-spacing: -0.011em;
  text-align: center;
  outline: none;
}
.contact-widget__input::placeholder {
  color: #d0d0d0;
  opacity: 1;
}
.contact-widget__input:focus {
  border-color: #472f2b;
}
.has-error .contact-widget__input {
  border-color: #cb0000;
}

.contact-widget__field--consent label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #472f2b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
}
.contact-widget__field--consent input[type=checkbox] {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #472f2b;
}
.contact-widget__field--consent a {
  color: inherit;
  text-decoration: underline;
}
.contact-widget__field--consent.has-error label {
  color: #cb0000;
}
.contact-widget__field--consent.has-error input[type=checkbox] {
  outline: 1px solid #cb0000;
  outline-offset: 1px;
}

.contact-widget__error {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.contact-widget__submit {
  display: block;
  width: 100%;
  height: 36px;
  margin: 4px 0 0;
  border: 0;
  border-radius: 8px;
  background: #472f2b;
  color: #fff;
  font: 500 15px/1 "Mulish", Arial, sans-serif;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.contact-widget__submit:hover, .contact-widget__submit:focus-visible {
  filter: brightness(1.2);
}
.contact-widget__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.contact-widget__form-error {
  margin: 10px 0 0;
  color: #cb0000;
  font-size: 13px;
  line-height: 1.3;
}

.contact-widget__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Window 3: thank-you message */
.contact-widget__thanks {
  width: 377px;
  min-height: 132px;
  padding: 33px 16px 28px;
  background: #472f2b;
  color: #fff;
  text-align: center;
}

.contact-widget__thanks-title {
  font-size: 28.6px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.011em;
}

.contact-widget__thanks-text {
  margin-top: 5px;
  font-size: 14.3px;
  font-weight: 400;
}

@media (prefers-reduced-motion: reduce) {
  .contact-widget__button,
  .contact-widget--open .contact-widget__button {
    transition: none;
  }
  .contact-widget__window[open] {
    animation: none;
  }
}
