/* Опрос о платформе — плавающий glow-«?» + модалка. */

/* ── Значок «?» в правом нижнем углу (над FAB-ами видео/тьютора) ── */
.fbk-fab {
  position: fixed;
  right: 12px;
  bottom: 124px;
  z-index: 1200;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent, #be185d);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(190, 24, 93, 0.32);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}
.fbk-fab:hover { transform: scale(1.06); }
.fbk-fab:active { transform: scale(0.96); }

/* Нежный пульсирующий glow — притягивает взгляд, гаснет при открытии формы. */
.fbk-fab.fbk-glow { animation: fbk-fab-glow 2.4s ease-in-out infinite; }
@keyframes fbk-fab-glow {
  0%, 100% { box-shadow: 0 4px 14px rgba(190, 24, 93, 0.30), 0 0 0 0 rgba(190, 24, 93, 0.38); }
  50%      { box-shadow: 0 4px 20px rgba(190, 24, 93, 0.45), 0 0 0 10px rgba(190, 24, 93, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .fbk-fab.fbk-glow { animation: none; box-shadow: 0 4px 16px rgba(190, 24, 93, 0.4); }
}

/* ── Модалка ── */
.fbk-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(20, 14, 20, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.fbk-modal-overlay.open { display: flex; animation: fbk-fade 0.2s ease; }
@keyframes fbk-fade { from { opacity: 0; } to { opacity: 1; } }

.fbk-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;            /* сама не скроллится — скроллится .fbk-modal-scroll */
  background: var(--surface, #fff);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
/* Контент скроллится здесь, рамка модалки (и крестик на ней) стоит на месте. */
.fbk-modal-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 26px 24px 24px;
}
.fbk-modal h2 { font-size: 1.2rem; margin: 0 0 6px; color: var(--text); }
.fbk-sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.fbk-modal-close {
  position: absolute;     /* на неподвижной .fbk-modal → не уезжает при скролле */
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.fbk-modal-close:hover { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }

/* Чтобы заголовок не оказался под крестиком при коротком экране. */
.fbk-modal-scroll > h2 { padding-right: 36px; }

/* ── Вопросы ── */
.fbk-questions { display: flex; flex-direction: column; gap: 18px; }

.fbk-q-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
}
.fbk-req { color: var(--accent); margin-left: 3px; }
.fbk-q-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: -4px 0 8px;
  line-height: 1.4;
}

.fbk-q-body { display: flex; flex-direction: column; gap: 8px; }

.fbk-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fbk-opt:hover { border-color: var(--accent); }
.fbk-opt input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.fbk-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.fbk-text, .fbk-other-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface, #fff);
}
.fbk-text { resize: vertical; min-height: 64px; }
.fbk-text:focus, .fbk-other-input:focus { outline: none; border-color: var(--accent); }

.fbk-error {
  display: none;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #c0392b;
}

.fbk-submit {
  margin-top: 18px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.fbk-submit:hover:not(:disabled) { background: var(--accent-hover); }
.fbk-submit:disabled { opacity: 0.6; cursor: default; }

/* ── Состояние «спасибо» ── */
.fbk-done { text-align: center; padding: 26px 8px; }
.fbk-done-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 52px;
}
