.feedback-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
}

.feedback-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 14px 18px;
  font: 500 14px/1.2 'Montserrat', sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.feedback-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
  background: #222;
}

.feedback-trigger__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feedback-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.16);
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.feedback-panel::-webkit-scrollbar {
  width: 6px;
}

.feedback-panel::-webkit-scrollbar-track {
  background: transparent;
}

.feedback-panel::-webkit-scrollbar-thumb {
  background: #d1d1d1;
  border-radius: 999px;
}

.feedback-panel::-webkit-scrollbar-thumb:hover {
  background: #b8b8b8;
}

.feedback-widget.is-open .feedback-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.feedback-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.feedback-panel__eyebrow {
  margin-bottom: 8px;
  color: #7a7a7a;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.feedback-panel__title {
  font: 700 24px/1.15 'Montserrat', sans-serif;
  color: #111;
  margin-bottom: 6px;
}

.feedback-panel__subtitle {
  font: 400 14px/1.55 'Montserrat', sans-serif;
  color: #666;
}

.feedback-panel__close {
  border: 0;
  background: transparent;
  color: #555;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.feedback-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 4px;
}

.feedback-tab {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #666;
  font: 600 13px/1.2 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.feedback-tab.is-active {
  background: #fff;
  color: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.feedback-mode-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f7f7f7;
  color: #555;
  font-size: 12px;
}

.feedback-form__group {
  margin-bottom: 12px;
}

.feedback-form .form-control {
  width: 100%;
  border: 1px solid #dedede;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px 14px;
  font: 400 14px/1.4 'Montserrat', sans-serif;
  color: #111;
  background: #fff;
  outline: 0;
  box-shadow: none;
}

.feedback-form textarea.form-control {
  min-height: 104px;
  resize: vertical;
}

.feedback-form .form-control:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.06);
}

.feedback-upload {
  border: 1px dashed #cfcfcf;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

.feedback-upload.is-hidden {
  display: none;
}

.feedback-upload__label {
  display: block;
  font: 600 13px/1.4 'Montserrat', sans-serif;
  color: #111;
  margin-bottom: 8px;
}

.feedback-upload__hint {
  display: block;
  margin-top: 8px;
  font: 400 12px/1.55 'Montserrat', sans-serif;
  color: #7a7a7a;
}

.feedback-form__policy {
  margin: 14px 0 16px;
  font: 400 12px/1.6 'Montserrat', sans-serif;
  color: #777;
}

.feedback-form__policy a {
  color: #111;
  text-decoration: underline;
}

.feedback-form__recaptcha {
  margin: -8px 0 16px;
  font: 400 11px/1.5 'Montserrat', sans-serif;
  color: #999;
}

.feedback-form__recaptcha a {
  color: #777;
  text-decoration: underline;
}

.feedback-form__submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font: 600 15px/1.2 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background .2s ease;
}

.feedback-form__submit:hover {
  background: #222;
}

#contact-widget-success-popup.custom-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1300;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .3s ease;
}

#contact-widget-success-popup .custom-popup {
  position: relative;
  max-width: 420px;
  width: calc(100% - 32px);
  padding: 34px 28px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}

#contact-widget-success-popup .contact-widget-close-popup {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #555;
}

#contact-widget-success-popup p {
  margin: 18px 0 0;
  color: #111;
  font: 500 16px/1.5 'Montserrat', sans-serif;
}

.grecaptcha-badge {
  visibility: hidden !important;
}

/* Низкие экраны: ноутбуки, маленькие мониторы */
@media (max-height: 760px) and (min-width: 768px) {
  .feedback-panel {
    bottom: 64px;
    max-height: calc(100vh - 88px);
    padding: 18px;
  }

  .feedback-panel__header {
    margin-bottom: 12px;
  }

  .feedback-panel__title {
    font-size: 21px;
  }

  .feedback-panel__subtitle {
    font-size: 13px;
    line-height: 1.45;
  }

  .feedback-tabs {
    margin-bottom: 10px;
  }

  .feedback-tab {
    min-height: 38px;
  }

  .feedback-mode-badge {
    margin-bottom: 8px;
    padding: 7px 10px;
  }

  .feedback-form__group {
    margin-bottom: 9px;
  }

  .feedback-form .form-control {
    min-height: 44px;
    padding: 10px 12px;
  }

  .feedback-form textarea.form-control {
    min-height: 78px;
  }

  .feedback-upload {
    padding: 10px;
  }

  .feedback-form__policy {
    margin: 10px 0 12px;
  }

  .feedback-form__recaptcha {
    margin: -4px 0 12px;
  }

  .feedback-form__submit {
    min-height: 46px;
  }
}

/* Мобильные */
@media (max-width: 767px) {
  .feedback-widget {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .feedback-trigger {
    width: 100%;
    justify-content: center;
  }

  .feedback-panel {
    right: 0;
    left: 0;
    bottom: 72px;
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 18px;
    border-radius: 16px;
  }

  .feedback-panel__title {
    font-size: 21px;
  }

  .feedback-panel__subtitle {
    font-size: 13px;
  }

  .feedback-tabs {
    grid-template-columns: 1fr;
  }
}

/* Очень низкие мобильные экраны */
@media (max-width: 767px) and (max-height: 680px) {
  .feedback-panel {
    bottom: 66px;
    max-height: calc(100vh - 82px);
    padding: 16px;
  }

  .feedback-panel__header {
    margin-bottom: 10px;
  }

  .feedback-form textarea.form-control {
    min-height: 76px;
  }

  .feedback-form__policy,
  .feedback-form__recaptcha {
    font-size: 10.5px;
  }
}