/**
 * Parking Lot — the tray itself (scrim, panel, header, body, footer) is the
 * shared right-side tray language in components/drawers.css. This file holds
 * only what is specific to the parking lot: the park-a-thought form, the
 * gold-ruled item cards, the header toggle + badge, and the in-conversation
 * park affordances.
 *
 * Transcribed from docs/design-reference/extracted/drawer-parking.html.
 * Literal pixel type from the capture is written calc(Npx * var(--text-scale)),
 * the convention modules/hub.css established, so Settings -> text size keeps
 * working.
 */

/* ===== PARK A THOUGHT (the tray's own add form) ===== */

.parking-lot-add {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.parking-lot-add-input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--bg-secondary);
  font-family: var(--font-body);
  /* 16px floor: iOS Safari zooms the whole page when a focused field is set
     smaller, which throws the layout out from under the member. */
  font-size: max(16px, calc(15px * var(--text-scale)));
  color: var(--text-dark);
  resize: none;
}

.parking-lot-add-input:focus {
  border-color: var(--teal-accent);
}

/* ===== ITEM CARDS ===== */

.parking-lot-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* The gold left rule is the parking lot's signature: a parked thought is
   held to one side, not filed on the roadmap. */
.parking-lot-item {
  border-left: 4px solid var(--gold);
  padding: 0.85rem 1rem;
  background: var(--bg-primary);
}

.parking-lot-item-text {
  font-family: var(--font-body);
  font-size: calc(15px * var(--text-scale));
  line-height: 1.65;
  color: var(--text-dark);
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
}

.parking-lot-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.parking-lot-item-source {
  font-family: var(--font-body);
  font-size: calc(12.5px * var(--text-scale));
  color: var(--text-muted);
}

.parking-lot-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* button_to wraps each action in a form; keep the meta row on one line. */
.parking-lot-item-meta form { margin: 0; display: inline-flex; }

/* Addressed ("done") items stay restorable rather than vanishing — a Rails
   addition the prototype had no state for. Muted, under its own eyebrow. */
.parking-lot-group-done { margin-top: 1.5rem; }

.parking-lot-group-done .parking-lot-item { border-left-color: var(--border-light); }

.parking-lot-group-done .parking-lot-item-text {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--border-light);
}

/* ===== EMPTY STATE ===== */

.parking-lot-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.parking-lot-empty i {
  font-size: calc(30px * var(--text-scale));
  opacity: 0.4;
}

.parking-lot-empty p {
  margin: 0.6rem 0 0;
  font-family: var(--font-body);
  font-size: calc(15px * var(--text-scale));
  line-height: 1.65;
}

.parking-lot-empty-hint {
  font-size: calc(13px * var(--text-scale)) !important;
  opacity: 0.8;
}

/* ===== FOOTER COUNT ===== */

.parking-lot-count {
  font-family: var(--font-body);
  font-size: calc(13.5px * var(--text-scale));
  color: var(--text-muted);
}

/* ===== PATTERNS ===== */

.parking-lot-patterns {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.parking-lot-pattern {
  padding: 0.75rem;
  background: var(--bg-secondary, #f8f9fa);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--teal-accent, #4a9bb5);
}

.parking-lot-pattern.new {
  border-left-color: var(--gold-accent, #d4a843);
  background: #fef9ee;
}

.parking-lot-pattern p {
  margin: 0;
  font-size: calc(0.875rem + var(--text-bump));
  line-height: 1.4;
}

.parking-lot-pattern-type {
  display: inline-block;
  font-size: calc(0.7rem + var(--text-bump));
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== HEADER BUTTON ===== */

/* The toggle inherits the header's shared .header-icon-btn look (70% white,
   white on hover) — this class only anchors the count badge. It used to
   force full white, which made the bookmark the loudest icon in the row
   (owner, 2026-08-12: the loud one should be Modules, not the parking lot). */
.parking-lot-toggle {
  position: relative;
}

.parking-lot-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--teal-fill);
  color: white;
  font-size: calc(0.65rem + var(--text-bump));
  font-weight: 700;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* ===== PARK INLINE FORM (in interview modal) ===== */

.park-inline-form {
  width: 100%;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--bg-secondary, #f8f9fa);
}

.park-input {
  width: 100%;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: calc(0.875rem + var(--text-bump));
  font-family: inherit;
  resize: vertical;
  background: var(--bg-primary, #ffffff);
}

.park-input:focus {
  border-color: var(--teal-accent);
}

.park-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ===== PARK TOAST ===== */

.park-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-primary, #ffffff);
  color: var(--text-secondary, #4a5568);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: calc(0.8rem + var(--text-bump));
  font-weight: 500;
  z-index: 1200;
  opacity: 0;
  transition: all var(--motion-enter) var(--ease-out);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color, #e2e8f0);
}

.park-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== CONTEXTUAL PARKING LOT (in interviews) ===== */

.parking-lot-contextual {
  background: var(--bg-secondary, #f8f9fa);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: calc(0.825rem + var(--text-bump));
}

.parking-lot-contextual-header {
  font-weight: 500;
  color: var(--text-muted);
  font-size: calc(0.7rem + var(--text-bump));
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.25rem;
}

.parking-lot-contextual-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.parking-lot-contextual-items li {
  padding: 0.25rem 0;
  color: var(--text-dark);
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
}

.parking-lot-contextual-items li::before {
  /* fa-thumbtack, matching the pin used everywhere else in the parking lot.
     The bi- codepoint this carried had no font behind it (the app self-hosts
     Font Awesome 7 Sharp) and rendered as nothing. */
  content: '\f08d';
  font-family: 'Font Awesome 7 Sharp';
  font-weight: 300;
  font-style: normal;
  color: var(--teal-ink);
  flex-shrink: 0;
  font-size: calc(0.75rem + var(--text-bump));
  margin-top: 2px;
}

/* ===== PARKING ACTION CARDS (in-chat) ===== */

.parking-action-card {
  background: var(--bg-secondary, #f8f9fa);
  border: 1px dashed var(--border-color, #e2e8f0);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: 0.375rem 0;
}

.parking-action-card-label {
  font-size: calc(0.7rem + var(--text-bump));
  font-weight: 500;
  color: var(--text-muted, #718096);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.parking-action-card-label i {
  font-size: calc(0.65rem + var(--text-bump));
}

.parking-action-card-content {
  font-size: calc(0.825rem + var(--text-bump));
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  font-style: italic;
}

.parking-action-card-actions {
  display: flex;
  gap: 0.375rem;
}

.parking-action-card-actions button {
  font-size: calc(0.75rem + var(--text-bump));
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color, #e2e8f0);
  cursor: pointer;
  transition: all var(--motion-quick) var(--ease-out);
}

.parking-action-card-actions .park-action-park {
  background: transparent;
  color: var(--teal-ink, #2F7A93);
  border-color: var(--teal-accent);
}

.parking-action-card-actions .park-action-park:hover {
  background: var(--teal-light, #e8f4f8);
}

.parking-action-card-actions .park-action-skip {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.parking-action-card-actions .park-action-skip:hover {
  background: var(--bg-secondary);
}
