/* Quick Capture sheet — direction C: rounded, elevated, thumb-sized. */

.qa-open {
  overflow: hidden;
}

.qa-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--modal-backdrop, rgba(22, 36, 31, 0.42));
  backdrop-filter: blur(3px);
  animation: qa-fade var(--dur-base) var(--ease-out) both;
}

.qa-backdrop[hidden] {
  display: none !important;
}

.qa-sheet {
  width: min(440px, 100%);
  max-height: min(90dvh, 680px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: auto 0 0;
  padding: var(--space-5) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  background: var(--surface-solid);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--elev-3);
  animation: qa-rise var(--dur-slow) var(--ease-spring) both;
}

@media (min-width: 560px) {
  .qa-backdrop {
    align-items: center;
  }

  .qa-sheet {
    margin: 0;
    border-radius: var(--radius-xl);
  }
}

.qa-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.qa-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.qa-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: calc(var(--space-3) * -1);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.qa-close:hover {
  color: var(--ink);
}

.qa-targets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.qa-chip {
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.qa-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--nav-active-fg, #fff);
}

.qa-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.qa-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.qa-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.qa-input {
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
}

.qa-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.qa-submit {
  min-height: 52px;
  margin-top: var(--space-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--nav-active-fg, #fff);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 700;
  cursor: pointer;
}

.qa-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.qa-status {
  margin: 0;
  min-height: 1.2em;
  font-size: var(--text-sm);
  color: var(--muted);
}

.qa-status[data-kind="ok"] {
  color: var(--accent-deep, var(--accent));
  font-weight: 600;
}

.qa-status[data-kind="warn"] {
  color: var(--warn, #b45309);
  font-weight: 600;
}

/* Home capture bar — the plan's "don't make me switch apps" entry point. */
.qa-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  margin: 0 0 var(--space-8);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-solid);
  box-shadow: var(--elev-2);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: var(--text-base);
  text-align: left;
  cursor: pointer;
}

.qa-bar-text {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qa-bar-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--nav-active-fg, #fff);
}

@keyframes qa-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes qa-rise {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .qa-backdrop,
  .qa-sheet {
    animation: none;
  }
}
