/* Header alpha feedback tag and panel.
   Markup and state live in lib/components/alpha_tag.dart. */

.alpha-tag-shell {
  --alpha-tag-shell-width: 76px;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 40px;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  transition:
    width 220ms cubic-bezier(.2, 0, 0, 1),
    margin-left 220ms cubic-bezier(.2, 0, 0, 1),
    opacity 220ms ease;
  will-change: width, margin-left, opacity;
}

.alpha-tag-shell--ready {
  opacity: 1;
  pointer-events: auto;
  width: var(--alpha-tag-shell-width);
  margin-left: 8px;
}

.alpha-tag-shell--submitted {
  --alpha-tag-shell-width: 108px;
}

.alpha-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border: none;
  background: #f6be3b;
  color: #1c1c19;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 200ms cubic-bezier(.2, 0, 0, 1),
    box-shadow 200ms ease;
}

.alpha-tag-label {
  display: inline-block;
  line-height: 1;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.alpha-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(246, 190, 59, 0.35);
}

.alpha-tag--sent {
  background: #006d44;
  color: #fcf9f4;
}

.alpha-tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: #1c1c19;
  animation: alpha-pulse 2.4s ease-in-out infinite;
}

@keyframes alpha-pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }

  100% {
    opacity: 1;
  }
}

.alpha-panel {
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  width: 320px;
  padding: 20px;
  background: #fcf9f4;
  color: #1c1c19;
  border-radius: 8px;
  z-index: 60;
  box-shadow: 0 24px 48px rgba(0, 10, 30, 0.18);
}

.alpha-panel--center {
  text-align: center;
}

.alpha-mood-row {
  display: flex;
  gap: 6px;
}

.alpha-mood {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(28, 28, 25, 0.08);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 200ms ease;
}

.alpha-mood.selected {
  background: #006d44;
  border-color: #006d44;
  transform: translateY(-1px);
}

.alpha-field {
  width: 100%;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid rgba(28, 28, 25, 0.1);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: #1c1c19;
  resize: none;
}

.alpha-field:focus {
  outline: none;
  border-color: #006d44;
}

.alpha-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.alpha-send {
  width: 100%;
  height: 40px;
  background: #000a1e;
  color: #fcf9f4;
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.alpha-send:disabled {
  background: rgba(28, 28, 25, 0.08);
  color: rgba(28, 28, 25, 0.3);
  cursor: not-allowed;
}

.alpha-send-another {
  background: transparent;
  border: none;
  color: #006d44;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.43;
  cursor: pointer;
  padding: 0;
}

.alpha-send-another:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.alpha-panel-check {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 9999px;
  background: #006d44;
  color: #fcf9f4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alpha-sheet-backdrop {
  display: none;
}

@keyframes alpha-sheet-up {
  0% {
    transform: translateY(100%);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes alpha-sheet-fade {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .alpha-tag-shell,
  .alpha-tag-shell--ready {
    will-change: auto;
  }

  .alpha-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 10, 30, 0.45);
    z-index: 59;
    animation: alpha-sheet-fade 200ms ease;
  }

  .alpha-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 64px;
    width: auto;
    max-height: calc(85vh - 64px);
    overflow-y: auto;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -16px 48px rgba(0, 10, 30, 0.28);
    animation: alpha-sheet-up 260ms cubic-bezier(.2, 0, 0, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .alpha-tag-shell {
    transition: none;
  }

  .alpha-tag-dot {
    animation: none;
  }

  .alpha-tag:hover {
    transform: none;
  }

  .alpha-panel,
  .alpha-sheet-backdrop {
    animation: none;
  }
}
