/* Feedback widget styles.
   Uses LibreChat's CSS custom properties where available, with sensible
   dark-theme fallbacks so it still looks correct if tokens drift. */

#tk-feedback-btn {
  position: fixed;
  bottom: 20px;
  /* clear of LibreChat's left nav rail (icon+label rail ~64px wide) */
  left: 80px;
  height: 40px;
  /* Tekever red — match the Ask Tekever pill (don't use var(--brand-purple),
     which LibreChat's theme resolves to purple). */
  padding: 0 16px 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #D42718;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  z-index: 9999;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

#tk-feedback-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  filter: brightness(1.08);
}

#tk-feedback-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#tk-feedback-btn .tk-fb-label {
  line-height: 1;
}

#tk-feedback-btn svg {
  flex-shrink: 0;
}

/* Modal */

#tk-feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tk-fb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.tk-fb-dialog {
  position: relative;
  background: var(--surface-primary, #202123);
  color: var(--text-primary, #ececf1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px;
  width: min(540px, calc(100% - 32px));
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  font-family: var(--font-sans, system-ui, sans-serif);
}

.tk-fb-dialog h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.tk-fb-subtitle {
  margin: 0 0 18px;
  opacity: 0.7;
  font-size: 13px;
}

.tk-fb-field {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}

.tk-fb-field > span {
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tk-fb-dialog select,
.tk-fb-dialog textarea {
  width: 100%;
  background: var(--surface-secondary, #2a2b32);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}

.tk-fb-dialog textarea {
  resize: vertical;
  min-height: 130px;
}

.tk-fb-dialog select:focus,
.tk-fb-dialog textarea:focus {
  outline: none;
  border-color: var(--brand-purple, #D42718);
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.25);
}

.tk-fb-counter {
  font-size: 11px;
  opacity: 0.55;
  text-align: right;
  margin-top: -8px;
  margin-bottom: 14px;
}

.tk-fb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tk-fb-actions button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-secondary, #2a2b32);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.tk-fb-actions .tk-fb-primary {
  background: #D42718;
  border-color: transparent;
  color: white;
  font-weight: 500;
}

.tk-fb-actions .tk-fb-primary:hover {
  filter: brightness(1.1);
}

.tk-fb-actions .tk-fb-secondary:hover {
  background: var(--surface-tertiary, #353740);
}

/* Toast */

.tk-fb-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, calc(100% + 24px));
  background: var(--surface-secondary, #2a2b32);
  color: var(--text-primary, #ececf1);
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 10001;
  opacity: 0;
  transition: transform 250ms ease, opacity 250ms ease;
  font-size: 14px;
  max-width: min(440px, calc(100% - 32px));
}

.tk-fb-toast-error {
  background: var(--error, #b91c1c);
  border-color: rgba(255, 255, 255, 0.1);
}

.tk-fb-toast-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
