/* ==========================================================================
   SQUAD VPN — чат поддержки
   ========================================================================== */

.support-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--violet), var(--purple-bright));
  color: #fff;
  box-shadow: 0 18px 44px -14px rgba(124, 58, 237, 0.9);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.support-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 22px 50px -14px rgba(168, 85, 247, 1); }
.support-fab:active { transform: scale(0.97); }
.support-fab svg { width: 25px; height: 25px; }
.support-fab__dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f87171;
  border: 2px solid #0b0910;
  animation: support-pulse 1.8s infinite;
}
@keyframes support-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(248, 113, 113, 0); }
}

.support-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 95;
  width: min(370px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #0d0a14;
  box-shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(168, 85, 247, 0.08);
  overflow: hidden;
  animation: support-in 0.25s var(--ease);
}
@keyframes support-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.support-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.16), transparent);
}
.support-head strong { font-size: 14.5px; display: block; }
.support-head span { font-size: 11.5px; color: var(--text-mute); }
.support-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.support-close:hover { color: #fff; border-color: var(--line-strong); }

.support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}
.support-empty {
  margin: auto;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  line-height: 1.6;
  max-width: 250px;
}
.support-empty strong { color: var(--text-dim); display: block; margin-bottom: 4px; }

.support-msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.support-msg--user {
  align-self: flex-end;
  background: linear-gradient(145deg, var(--violet), #6d28d9);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.support-msg--admin {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.support-msg__time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.55;
  text-align: right;
}

.support-form { border-top: 1px solid var(--line-soft); padding: 10px 12px 12px; }
.support-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 8px; }
.support-contact input {
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: 500 12.5px var(--font-body);
  outline: none;
}
.support-contact input:focus { border-color: var(--line-strong); }
.support-contact input::placeholder { color: var(--text-mute); }

.support-compose { display: flex; align-items: flex-end; gap: 8px; }
.support-compose textarea {
  flex: 1;
  min-height: 38px;
  max-height: 110px;
  resize: none;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: 500 13px var(--font-body);
  line-height: 1.4;
  outline: none;
}
.support-compose textarea:focus { border-color: var(--line-strong); }
.support-compose textarea::placeholder { color: var(--text-mute); }
.support-send {
  width: 38px;
  height: 38px;
  flex: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--violet), var(--purple-bright));
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.support-send:disabled { opacity: 0.5; cursor: default; }
.support-send svg { width: 17px; height: 17px; }
.support-hint { padding: 0 12px 10px; font-size: 10.5px; color: var(--text-mute); text-align: center; }

.support-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.support-link:hover { color: var(--text); }

@media (max-width: 560px) {
  .support-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .support-panel {
    right: 8px;
    left: 8px;
    bottom: 78px;
    width: auto;
    height: min(72vh, 560px);
  }
  .support-contact { grid-template-columns: 1fr; }
}
