/* feedback-popup — всплывающая плашка «Как вам сервис?» + модалка
   «Есть проблема». Чистый ванильный модуль, без зависимостей от Vue.
   Все классы префиксуются .fb-* чтобы не конфликтовать с окружающей
   страницей (LK, IoT-портал, simulate). */

.fb-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 14px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 50px -12px rgba(15, 23, 42, 0.28),
              0 4px 16px -4px rgba(15, 23, 42, 0.14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: calc(100vw - 32px);
}
.fb-toast.fb-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.fb-toast-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb3b3, #ff7a7a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.08);
}
.fb-toast-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  padding-right: 4px;
}
.fb-toast-text-title {
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
}
.fb-toast-text-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}
.fb-toast-actions {
  display: flex;
  gap: 8px;
}
.fb-toast-btn {
  appearance: none;
  border: none;
  background: #f1f5f9;
  color: #0f172a;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  white-space: nowrap;
}
.fb-toast-btn:hover { background: #e2e8f0; }
.fb-toast-btn:active { transform: translateY(1px); }
.fb-toast-btn-primary {
  background: #1a73e8;
  color: #fff;
}
.fb-toast-btn-primary:hover { background: #1765c8; }
.fb-toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  opacity: .6;
}
.fb-toast-close:hover { opacity: 1; color: #0f172a; }

/* Модальное окно «Есть проблема» */
.fb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
}
.fb-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 12px;
}
.fb-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.fb-modal-close {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}
.fb-modal-close:hover { color: #0f172a; }
.fb-modal-body {
  padding: 0 22px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fb-modal-hint {
  font-size: 13px;
  color: #64748b;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.4;
}
.fb-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fb-modal-field label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.fb-modal-field input,
.fb-modal-field textarea {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
  resize: vertical;
}
.fb-modal-field textarea { min-height: 110px; }
.fb-modal-field input:focus,
.fb-modal-field textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}
.fb-modal-error {
  font-size: 13px;
  color: #dc2626;
}
.fb-modal-error:empty { display: none; }
.fb-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 22px 18px;
}
.fb-modal-btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.fb-modal-btn-cancel {
  background: #f1f5f9;
  color: #0f172a;
}
.fb-modal-btn-cancel:hover { background: #e2e8f0; }
.fb-modal-btn-submit {
  background: #1a73e8;
  color: #fff;
}
.fb-modal-btn-submit:hover { background: #1765c8; }
.fb-modal-btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Мини-уведомление об успешной/неуспешной отправке */
.fb-flash {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10001;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 12px 30px -12px rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.fb-flash.fb-flash-visible { opacity: 1; }
.fb-flash.fb-flash-error { background: #dc2626; }

@media (max-width: 520px) {
  .fb-toast {
    left: 12px;
    right: 12px;
    transform: translateY(20px);
    max-width: none;
    padding: 10px 12px;
  }
  .fb-toast.fb-toast-visible { transform: translateY(0); }
  .fb-toast-icon { width: 38px; height: 38px; font-size: 22px; }
  .fb-toast-text-title { font-size: 14px; }
  .fb-toast-text-sub { font-size: 12px; }
  .fb-toast-btn { padding: 8px 12px; font-size: 13px; }
}
