/**
 * «Нашли ошибку» — FAB + modal. Scoped only.
 * Does not touch custom.css / footer.php.
 */

body.cotinder-bug-report-open {
  overflow: hidden;
}

.cotinder-bug-report__fab {
  display: none !important;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10040;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(253, 119, 40, 0.4);
  border-radius: 999px;
  background: #fff;
  color: #2d2d2d;
  box-shadow: 0 8px 24px rgba(45, 45, 45, 0.16);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}

.cotinder-bug-report__fab:hover,
.cotinder-bug-report__fab:focus-visible {
  border-color: #fd7728;
  color: #fd7728;
  outline: none;
}

.cotinder-bug-report__fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff5ee;
}

.cotinder-bug-report__fab-label {
  white-space: nowrap;
}

#cotinder-bug-report-modal.cotinder-rating-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(45, 45, 45, 0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: auto;
}

#cotinder-bug-report-modal.cotinder-rating-popup-overlay[hidden] {
  display: none !important;
}

#cotinder-bug-report-modal.cotinder-rating-popup-overlay--visible {
  display: flex !important;
  opacity: 1 !important;
}

#cotinder-bug-report-modal.cotinder-rating-popup-overlay--visible .cotinder-bug-report__panel {
  opacity: 1 !important;
}

#cotinder-bug-report-modal .cotinder-bug-report__backdrop {
  position: absolute;
  inset: 0;
}

#cotinder-bug-report-modal .cotinder-bug-report__panel {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 480px;
  width: calc(100% - 8px);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 28px 24px 22px;
  box-sizing: border-box;
  transform: none;
  top: auto;
  left: auto;
  color: #2d2d2d;
  background: #fff;
  box-shadow: 0 16px 48px rgba(45, 45, 45, 0.22);
}

#cotinder-bug-report-modal .cotinder-rating-popup__close {
  color: #6b6b6b;
  background: rgba(45, 45, 45, 0.08);
}

#cotinder-bug-report-modal .cotinder-rating-popup__close:hover {
  color: #2d2d2d;
  background: rgba(253, 119, 40, 0.18);
}

#cotinder-bug-report-modal .cotinder-bug-report__title {
  margin: 0 32px 10px 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #2d2d2d;
}

#cotinder-bug-report-modal .cotinder-bug-report__lead {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #5a5a5a;
}

#cotinder-bug-report-modal .cotinder-bug-report__field,
#cotinder-bug-report-modal .cotinder-bug-report__file {
  display: block;
  margin-bottom: 14px;
  text-align: left;
}

#cotinder-bug-report-modal .cotinder-bug-report__label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #3d3d3d;
}

#cotinder-bug-report-modal .cotinder-bug-report__label em {
  font-style: normal;
  font-weight: 500;
  color: #8a8a8a;
}

#cotinder-bug-report-modal .cotinder-bug-report__textarea,
#cotinder-bug-report-modal .cotinder-bug-report__input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  color: #2d2d2d;
  background: #fff;
  resize: vertical;
}

#cotinder-bug-report-modal .cotinder-bug-report__textarea:focus,
#cotinder-bug-report-modal .cotinder-bug-report__input:focus {
  outline: none;
  border-color: #fd7728;
  box-shadow: 0 0 0 3px rgba(253, 119, 40, 0.2);
}

#cotinder-bug-report-modal .cotinder-bug-report__file input[type="file"] {
  display: block;
  width: 100%;
  font-size: 14px;
}

#cotinder-bug-report-modal .cotinder-bug-report__file-name {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #6b6b6b;
  word-break: break-word;
}

#cotinder-bug-report-modal .cotinder-bug-report__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f0;
  color: #b42318;
  font-size: 14px;
  text-align: center;
}

#cotinder-bug-report-modal .cotinder-bug-report__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #fd7728;
  border-radius: 12px;
  background: #fd7728;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

#cotinder-bug-report-modal .cotinder-bug-report__submit:hover,
#cotinder-bug-report-modal .cotinder-bug-report__submit:focus-visible {
  background: #e86a20;
  border-color: #e86a20;
  outline: none;
}

#cotinder-bug-report-modal .cotinder-bug-report__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

#cotinder-bug-report-modal .cotinder-bug-report__thanks-text {
  margin: 8px 0 18px;
  font-size: 16px;
  line-height: 1.5;
  color: #2d2d2d;
}

#cotinder-bug-report-modal .cotinder-bug-report__honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 1199.98px) {
  .cotinder-bug-report__fab {
    left: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 767.98px) {
  .cotinder-bug-report__fab {
    padding: 7px 12px 7px 7px;
    font-size: 13px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .cotinder-bug-report__fab-icon {
    width: 28px;
    height: 28px;
  }

  #cotinder-bug-report-modal.cotinder-rating-popup-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  #cotinder-bug-report-modal .cotinder-bug-report__panel {
    width: 100%;
    max-height: min(88vh, 680px);
    padding: 22px 16px 16px;
    border-radius: 16px 16px 12px 12px;
  }

  #cotinder-bug-report-modal .cotinder-bug-report__title {
    font-size: 18px;
  }

  #cotinder-bug-report-modal .cotinder-bug-report__lead {
    font-size: 14px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .cotinder-bug-report__fab {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  #cotinder-bug-report-modal .cotinder-bug-report__panel {
    width: min(480px, calc(100% - 24px));
  }
}

@media (min-width: 1024px) and (max-width: 1199.98px) {
  .cotinder-bug-report__fab {
    bottom: 20px;
  }
}

html.cotinder-in-pwa .cotinder-bug-report__fab {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1200px) {
  html.cotinder-in-pwa .cotinder-bug-report__fab {
    left: 20px;
    bottom: 20px;
  }
}
