/* Плавающая круглая кнопка */
.feedback-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  width:56px;
  height:56px;
  border-radius:50%;
  background:#2f5e8f;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,.25);
  z-index:100000;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

/* CSS-пульсация вокруг кнопки */
.feedback-fab::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:50%;
  border:2px solid rgba(47,94,143,.4);
  opacity:0;
  transform:scale(0.9);
  animation:fFabPulse 2.4s infinite;
}

@keyframes fFabPulse{
  0%   {opacity:0;  transform:scale(0.9);}
  40%  {opacity:.7; transform:scale(1.1);}
  100% {opacity:0;  transform:scale(1.3);}
}

.feedback-fab:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,.3);
  background:#3a6ca1;
}

.feedback-fab-icon{
  font-size:22px;
  line-height:1;
}

/* Панель с формой */
.feedback-panel{
  position:fixed;
  right:18px;
  bottom:84px;
  width:320px;
  max-width:90vw;
  background:rgba(245,226,179,0.98);
  border-radius:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.28);
  border:1px solid rgba(47,94,143,.25);
  z-index:100000;
  transform:translateY(20px);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}

.feedback-panel.open{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.feedback-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  font-size:1rem;
  font-weight:700;
  color:#2f5e8f;
  border-bottom:1px solid rgba(47,94,143,.2);
}

.feedback-panel-close{
  border:none;
  background:transparent;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  color:#2f5e8f;
}

.feedback-form{
  padding:10px 12px 12px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:.9rem;
}

.feedback-form label{
  display:flex;
  flex-direction:column;
  gap:4px;
  color:#223;
}

.feedback-form input,
.feedback-form textarea{
  border-radius:6px;
  border:1px solid rgba(47,94,143,.3);
  padding:6px 8px;
  font:inherit;
  resize:vertical;
}

.feedback-submit{
  margin-top:6px;
  padding:8px 12px;
  border:none;
  border-radius:8px;
  background:#2f5e8f;
  color:#fff;
  font-weight:700;
  cursor:pointer;
  transition:background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.feedback-submit:hover{
  background:#3a6ca1;
  transform:translateY(-1px);
  box-shadow:0 3px 10px rgba(0,0,0,.25);
}

.feedback-note{
  margin-top:4px;
  font-size:.78rem;
  color:#314a63;
}

.feedback-note a{
  color:#2f5e8f;
  text-decoration:underline;
}

.feedback-consent{
  display:flex;
  align-items:flex-start;
  gap:6px;
  font-size:.78rem;
  color:#314a63;
}

.feedback-consent input[type="checkbox"]{
  margin-top:3px;
  flex-shrink:0;
}

.feedback-consent a{
  color:#2f5e8f;
  text-decoration:underline;
}

.feedback-status{
  margin:8px 12px 4px 12px;
  padding:6px 8px;
  border-radius:6px;
  font-size:.78rem;
  display:none;
}

.feedback-status-success{
  background:rgba(76,175,80,0.12);
  border:1px solid rgba(76,175,80,0.6);
  color:#225a26;
}

.feedback-status-error{
  background:rgba(244,67,54,0.08);
  border:1px solid rgba(244,67,54,0.6);
  color:#7b2420;
}

/* Адаптация для маленьких экранов */
@media (max-width:480px){
  .feedback-fab{
    right:12px;
    bottom:12px;
    width:52px;
    height:52px;
  }

  .feedback-fab-icon{
    font-size:20px;
  }

  .feedback-panel{
    inset:0;
    width:100vw;
    max-width:100vw;
    height:100dvh;
    border-radius:0;
    box-shadow:none;
    border:none;
    transform:translateY(100%);
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .feedback-panel.open{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
  }

  .feedback-panel-header{
    padding:14px 16px;
    font-size:1rem;
    position:sticky;
    top:0;
    background:rgba(245,226,179,0.98);
    z-index:2;
  }

  .feedback-panel-close{
    font-size:24px;
    min-width:44px;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .feedback-form{
    flex:1;
    overflow-y:auto;
    padding:12px 16px 16px 16px;
    gap:10px;
  }

  .feedback-form input,
  .feedback-form textarea{
    font-size:16px;
    padding:10px 12px;
  }

  .feedback-submit{
    min-height:44px;
    font-size:16px;
  }

  .feedback-note,
  .feedback-consent,
  .feedback-status{
    font-size:.85rem;
  }
}