/* Support & Feedback Hub drawer — floating widget (zero inline styles). */

.support-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 12000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: #e77817;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.support-fab:hover,
.support-fab:focus-visible {
  background: #d96a10;
  transform: translateY(-2px);
}

.support-fab .support-fab-label {
  white-space: nowrap;
}

.support-drawer {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 12001;
  width: min(360px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  max-height: min(560px, calc(100vh - 120px));
  background: #2b2826;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.support-drawer[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.support-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  background: #e77817;
}

.support-drawer-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.support-drawer-title strong {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.support-drawer-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.support-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
}

.support-close:hover,
.support-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.support-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-gutter: stable;
}

.support-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.support-bubble p {
  margin: 0 0 4px;
}

.support-bubble-time {
  display: block;
  font-size: 0.7rem;
  opacity: 0.75;
}

.support-bubble-agent {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

.support-bubble-user {
  align-self: flex-end;
  background: #e77817;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.support-typing {
  margin: 0;
  padding: 0 16px 12px;
  font-size: 0.78rem;
  font-style: italic;
  color: #ffd9a8;
}

.support-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.support-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.support-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.support-input:focus-visible {
  outline: 3px solid #e77817;
  outline-offset: 2px;
  border-color: #e77817;
}

.support-submit {
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: #e77817;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.support-submit:hover {
  background: #d96a10;
}

.support-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.support-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 12002;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 18px;
  background: #1f6f4a;
  color: #ffffff;
  border-radius: 10px;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.support-toast.support-toast-error {
  background: #b3261e;
}

@media (max-width: 480px) {
  .support-fab {
    right: 14px;
    bottom: 14px;
  }

  .support-drawer {
    right: 14px;
    bottom: 76px;
    width: calc(100vw - 28px);
  }

  .support-toast {
    bottom: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .support-fab,
  .support-drawer,
  .support-toast {
    transition: none;
  }
}
