/* پنل آنیار ۵/۹ — منوی ثبت سه‌راهی (صوتی/تایپی/دستی) */
/* === Three-way quick entry: voice first, then natural text, then manual === */
.quick-entry-scrim {
  display: none;
}
.quick-entry-shell {
  min-width: 0;
}
.quick-entry-menu {
  position: fixed;
  right: 14px;
  left: 14px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 24;
  width: auto;
  max-width: 420px;
  margin-inline: auto;
  padding: 13px;
  border: 1px solid rgba(177, 255, 240, 0.18);
  border-radius: 24px;
  color: var(--app-text);
  background:
    radial-gradient(circle at 82% 4%, rgba(114, 244, 220, 0.13), transparent 43%),
    linear-gradient(155deg, rgba(18, 57, 65, 0.98), rgba(4, 23, 29, 0.99));
  box-shadow: 0 30px 80px rgba(0, 7, 10, 0.72), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px);
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transform-origin: 50% 100%;
  transition:
    opacity 150ms ease-out,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.quick-entry-menu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.quick-entry-menu > p {
  margin: 1px 7px 10px;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 750;
}
.quick-entry-menu .quick-entry-option {
  position: relative;
  width: 100%;
  min-height: 66px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--app-text);
  text-align: right;
  background: transparent;
  opacity: 0;
  transform: translateY(9px);
  transition:
    opacity 180ms ease-out,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 140ms ease,
    border-color 140ms ease;
}
.quick-entry-menu.is-open .quick-entry-option {
  opacity: 1;
  transform: none;
}
.quick-entry-menu.is-open .quick-entry-option:nth-of-type(2) {
  transition-delay: 35ms;
}
.quick-entry-menu.is-open .quick-entry-option:nth-of-type(3) {
  transition-delay: 70ms;
}
.quick-entry-menu .quick-entry-option:hover,
.quick-entry-menu .quick-entry-option:focus-visible {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(177, 255, 240, 0.14);
}
.quick-entry-menu .quick-entry-option.is-primary {
  min-height: 76px;
  margin-bottom: 3px;
  color: #06242a;
  border-color: rgba(177, 255, 240, 0.34);
  background: linear-gradient(135deg, var(--app-aqua-bright), var(--app-aqua));
  box-shadow: 0 15px 34px -20px rgba(114, 244, 220, 0.88);
}
.quick-entry-option > span:nth-child(2) {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 1px;
}
.quick-entry-option b {
  font-size: 15px;
  font-weight: 850;
}
.quick-entry-option small {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.6;
}
.quick-entry-option.is-primary small {
  color: rgba(6, 36, 42, 0.72);
}
.quick-entry-option em {
  padding: 4px 7px;
  border-radius: 99px;
  color: #dffff8;
  background: #0b353b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.quick-entry-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(177, 255, 240, 0.13);
  border-radius: 14px;
  color: var(--app-aqua-bright);
  background: rgba(114, 244, 220, 0.08);
}
.is-primary .quick-entry-icon {
  color: var(--app-aqua-bright);
  background: #0b353b;
  border-color: rgba(6, 36, 42, 0.25);
}
.quick-entry-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-waves {
  gap: 3px;
}
.voice-waves i {
  width: 2px;
  height: 22px;
  border-radius: 8px;
  background: currentColor;
  animation: quick-voice-wave 850ms ease-in-out infinite alternate;
}
.voice-waves i:nth-child(1),
.voice-waves i:nth-child(5) { height: 8px; animation-delay: -520ms; }
.voice-waves i:nth-child(2),
.voice-waves i:nth-child(4) { height: 15px; animation-delay: -260ms; }
.quick-entry-scrim.is-open {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: block;
  border: 0;
  background: rgba(0, 9, 12, 0.54);
  backdrop-filter: blur(3px);
  animation: quick-scrim-in 160ms ease-out both;
}
.bottom-nav #quick-entry-toggle > span {
  display: block;
  line-height: 1;
  transition: transform 230ms cubic-bezier(0.22, 1, 0.36, 1);
}
.bottom-nav #quick-entry-toggle.is-open > span {
  transform: rotate(45deg);
}

.typed-entry-dialog {
  width: min(92vw, 520px);
}
.typed-entry-form textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 16px;
  line-height: 1.9;
}
.typed-entry-form textarea::placeholder {
  color: #78918f;
}
.typed-entry-form > small {
  display: block;
  margin-top: 7px;
  color: var(--app-muted);
  line-height: 1.8;
}
.typed-entry-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.typed-entry-examples button {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-aqua-bright);
  background: rgba(114, 244, 220, 0.06);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.typed-entry-submit {
  position: relative;
}
.typed-entry-submit i {
  display: none;
}
.typed-entry-submit[aria-busy="true"] i {
  width: 17px;
  height: 17px;
  display: block;
  border: 2px solid rgba(6, 36, 42, 0.25);
  border-top-color: #06242a;
  border-radius: 50%;
  animation: typed-entry-spin 750ms linear infinite;
}
.typed-entry-privacy {
  text-align: center;
  font-size: 11px;
}

@keyframes quick-voice-wave {
  from { transform: scaleY(0.45); opacity: 0.62; }
  to { transform: scaleY(1.08); opacity: 1; }
}
@keyframes quick-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes typed-entry-spin {
  to { transform: rotate(1turn); }
}

@media (max-width: 720px) {
  .quick-entry-shell {
    position: relative;
    display: grid;
    place-items: center;
  }
  .bottom-nav #quick-entry-toggle {
    width: 52px;
    height: 52px;
    min-height: 52px;
  }
}
@media (max-width: 380px) {
  .quick-entry-menu {
    right: 8px;
    left: 8px;
    width: auto;
    padding: 10px;
  }
  .quick-entry-option em {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .quick-entry-menu,
  .quick-entry-option,
  .bottom-nav #quick-entry-toggle > span,
  .quick-entry-scrim,
  .voice-waves i,
  .typed-entry-submit i {
    animation: none !important;
    transition: none !important;
  }
}
