/* ============================================================
   FEEDBACK WIDGET — стили
   Приведено к единому визуальному стилю с модалками сайта
   (Usage Statistics и т.п.)
   Подключить в head.php рядом с остальными CSS-файлами,
   либо добавить в общий стилевой файл
   ============================================================ */

.feedback-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 360px;
  width: calc(100% - 40px);
  animation: feedback-slide-in 0.25s ease-out;
}

@keyframes feedback-slide-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.feedback-widget-inner {
  position: relative;
  background: #0f1420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 20px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: #eaeaea;
  font-size: 14px;
  box-sizing: border-box;
}

/* Жёсткий сброс form-элементов внутри виджета — на сайте есть
   глобальные стили input/label/button (display:block, width:100% и т.п.),
   которые иначе ломают разметку чекбоксов и кнопок */
#feedback-widget * {
  box-sizing: border-box;
}
#feedback-widget input,
#feedback-widget label,
#feedback-widget textarea,
#feedback-widget button {
  all: revert;
  box-sizing: border-box;
  font-family: inherit;
}

/* ---------------- Шапка (заголовок + подзаголовок + закрыть) ---------------- */

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.feedback-widget-inner h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.feedback-subtitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.feedback-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0 12px;
  width: 100%;
}

.feedback-question {
  margin: 10px 0 6px;
  font-weight: 600;
  color: #ddd;
}

#feedback-widget .feedback-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
}

#feedback-widget .feedback-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #ccc;
  width: 100%;
  text-align: left;
}
#feedback-widget .feedback-option input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 15px;
  height: 15px;
  min-width: 15px;
  flex: 0 0 15px;
  margin: 0;
  accent-color: #00e5a0;
  cursor: pointer;
}
#feedback-widget .feedback-option span {
  flex: 1 1 auto;
  line-height: 1.3;
}

.feedback-other-label {
  display: block;
  font-size: 13px;
  color: #ccc;
  margin-bottom: 4px;
}

#feedback-widget .feedback-other-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #eee;
  padding: 8px 10px;
  font-size: 13px;
  margin: 0 0 4px;
}
#feedback-widget .feedback-other-input:focus {
  outline: none;
  border-color: #00e5a0;
}

.feedback-nps-question {
  margin-top: 14px;
}

#feedback-widget .feedback-nps-scale {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 2px;
  margin: 0 0 4px;
  width: 100%;
}

#feedback-widget .feedback-nps-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ccc;
  font-size: 10px;
  line-height: 1;
  padding: 6px 0;
  margin: 0;
  min-width: 0;
  width: 100%;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.feedback-nps-btn:hover {
  border-color: #00e5a0;
}
.feedback-nps-btn.selected {
  background: #00e5a0;
  border-color: #00e5a0;
  color: #0a0a0a;
  font-weight: 700;
}

.feedback-nps-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #888;
  margin-bottom: 14px;
}

#feedback-widget .feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
}

#feedback-widget .feedback-btn {
  flex: 1 1 auto;
  border: none;
  border-radius: 10px;
  padding: 9px 10px;
  margin: 0;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
#feedback-widget .feedback-btn:hover { opacity: 0.85; }

#feedback-widget .feedback-btn-submit {
  background: #00e5a0;
  color: #0a0a0a;
  font-weight: 700;
  flex: 1 1 100%;
}

#feedback-widget .feedback-btn-later,
#feedback-widget .feedback-btn-never {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ccc;
  flex: 1 1 calc(50% - 3px);
}
#feedback-widget .feedback-btn-later:hover,
#feedback-widget .feedback-btn-never:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

/* ---------------- Кнопка закрытия — квадрат с рамкой, как в других модалках ---------------- */

#feedback-widget .feedback-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0;
  margin: 0;
  color: #999;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
#feedback-widget .feedback-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.feedback-thanks {
  text-align: center;
  color: #00e5a0;
  font-weight: 600;
  margin: 10px 0;
}

@media (max-width: 480px) {
  .feedback-widget {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
    width: auto;
  }
}