/* HODHOD global floating feedback utility */

.feedback-float {
  position: fixed;
  z-index: 10040;
  right: clamp(16px, 2.5vw, 24px);
  bottom: max(clamp(16px, 2.5vw, 24px), env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.feedback-float > * {
  pointer-events: auto;
}

.feedback-float__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(247, 239, 230, 0.12);
  border-radius: 999px;
  background: rgba(27, 38, 50, 0.94);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition:
    border-color var(--transition-fast, 160ms ease),
    color var(--transition-fast, 160ms ease),
    box-shadow var(--transition-fast, 160ms ease);
}

.feedback-float__trigger:hover {
  color: rgba(255, 255, 255, 0.96);
  border-color: rgba(234, 109, 30, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.feedback-float__trigger:focus-visible {
  outline: 2px solid var(--accent-300, #f39a62);
  outline-offset: 3px;
}

.feedback-float__trigger[aria-expanded="true"] {
  border-color: rgba(234, 109, 30, 0.32);
  color: rgba(255, 255, 255, 0.96);
}

.feedback-float__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  color: var(--accent-500, #ea6d1e);
}

.feedback-float__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.feedback-choice {
  position: relative;
  z-index: 1;
  width: min(280px, calc(100vw - 32px));
  padding: 14px 16px 12px;
  border-radius: 12px;
  border: 1px solid rgba(247, 239, 230, 0.1);
  background: rgba(27, 38, 50, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

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

.feedback-choice__close {
  position: absolute;
  top: 6px;
  right: 6px;
}

.feedback-choice__title {
  margin: 0 36px 6px 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
}

.feedback-choice__text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}

.feedback-choice__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-choice__action {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    color var(--transition-fast, 160ms ease),
    background-color var(--transition-fast, 160ms ease);
}

.feedback-choice__action:hover {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.06);
}

.feedback-choice__action:focus-visible {
  outline: 2px solid var(--accent-300, #f39a62);
  outline-offset: 1px;
}

.hodhod-reviews-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .feedback-choice,
  .feedback-float__trigger {
    transition: none;
  }

  .feedback-choice.is-open {
    transform: none;
  }
}

@media (max-width: 480px) {
  .feedback-float {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .feedback-float__trigger {
    padding: 10px 12px;
    gap: 7px;
  }

  .feedback-float__label {
    font-size: 12.5px;
  }

  .feedback-choice {
    width: min(280px, calc(100vw - 32px));
  }
}
