/* popover.css — the tap-anywhere action card. Hand-drawn frame, big
   friendly rows. Desktop: floats at the tap point; phone: bottom sheet. */

.popover {
  position: fixed;
  z-index: 2500;
  min-width: 220px;
  max-width: 300px;
  background: var(--panel);
  border: 2px solid var(--border-hi);
  border-radius: 12px 14px 13px 12px / 13px 12px 14px 13px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 3px 4px 0 rgba(236, 231, 219, 0.06);
  padding: 6px;
  animation: pop-in 140ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(4px); }
}

.pop-head {
  padding: 6px 10px 8px;
  border-bottom: 1.5px dashed var(--border);
  margin-bottom: 4px;
}
.pop-title {
  font-family: var(--hand);
  font-size: 16px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pop-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  margin-top: 1px;
}

.pop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 6px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: var(--hand);
  font-size: 16px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.pop-item:hover { background: var(--accent-soft); color: var(--accent); border: none; }
.pop-item.danger { color: var(--red); }
.pop-item.danger:hover { background: rgba(209, 104, 90, 0.14); color: var(--red); }
.pop-icon { flex: none; width: 22px; text-align: center; font-size: 15px; font-family: var(--body); }

.pop-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}
.pop-input input { font-size: 14px; font-family: var(--body); }
.pop-input .pop-ok { width: auto; min-height: 34px; flex: none; padding: 2px 10px; font-size: 17px; }

/* phone: bottom sheet */
@media (max-width: 760px) {
  .popover {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0;
    max-width: none;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
    animation: sheet-up 200ms cubic-bezier(0.2, 0.9, 0.3, 1);
  }
  .pop-item { min-height: 50px; font-size: 18px; }
  @keyframes sheet-up { from { transform: translateY(30%); opacity: 0; } }
}
