/* Floating feedback widget — fixed-position side icon that opens a
   small panel with message + name + email. Used on the audit tools
   (/resources/ai-readability-checker, /audit/compare) as a third
   capture touchpoint after email opt-in and share. */

.kf-trigger {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1c1c1a;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, background 180ms ease;
  font-family: inherit;
  padding: 0;
}

.kf-trigger:hover {
  background: #000;
  transform: translateY(-2px);
}

.kf-trigger svg {
  width: 22px;
  height: 22px;
  display: block;
}

.kf-trigger__label {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: #1c1c1a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.kf-trigger:hover .kf-trigger__label,
.kf-trigger:focus-visible .kf-trigger__label {
  opacity: 1;
}

/* Panel — slides up from above the trigger */
.kf-panel {
  position: fixed;
  right: 18px;
  bottom: 78px;
  width: min(340px, calc(100vw - 36px));
  background: #fff;
  border: 1px solid #ebe7dc;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  z-index: 9001;
  padding: 1.1rem 1.2rem 1.2rem;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1c1c1a;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.kf-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kf-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.kf-panel__title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.kf-panel__sub {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #6b6760;
  margin: 0 0 0.85rem;
}

.kf-panel__close {
  background: transparent;
  border: none;
  color: #6b6760;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-top: -2px;
}

.kf-panel__close:hover { color: #1c1c1a; }

.kf-form { display: flex; flex-direction: column; gap: 0.6rem; }

.kf-form textarea,
.kf-form input {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #ebe7dc;
  border-radius: 8px;
  background: #faf8f3;
  color: #1c1c1a;
  width: 100%;
  outline: none;
  transition: border-color 150ms ease;
}

.kf-form textarea:focus,
.kf-form input:focus {
  border-color: #1c1c1a;
}

.kf-form textarea {
  resize: vertical;
  min-height: 84px;
  max-height: 200px;
  line-height: 1.45;
}

.kf-row { display: flex; gap: 0.5rem; }
.kf-row > * { flex: 1; min-width: 0; }

.kf-submit {
  background: #1c1c1a;
  color: #fff;
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease;
  margin-top: 0.15rem;
}

.kf-submit:hover { background: #000; }
.kf-submit[disabled] { opacity: 0.6; cursor: not-allowed; }

.kf-status {
  font-size: 0.75rem;
  color: #6b6760;
  text-align: center;
  margin-top: 0.4rem;
  min-height: 1em;
}

.kf-status.is-error { color: #c5567f; }
.kf-status.is-success { color: #2a8b6f; }

.kf-thanks {
  text-align: center;
  padding: 0.5rem 0;
}

.kf-thanks h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: #1c1c1a;
}

.kf-thanks p {
  font-size: 0.8rem;
  color: #6b6760;
  margin: 0;
  line-height: 1.5;
}

/* Mobile — pin to bottom corner but slightly smaller padding */
@media (max-width: 600px) {
  .kf-trigger { right: 14px; bottom: 14px; }
  .kf-panel { right: 14px; bottom: 70px; }
}
