/**
 * 100x Life Planning System - Parking Lot Styles
 * Slide-in sidebar from right, items grouped by module
 */

/* ===== SIDEBAR ===== */

.parking-lot-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-primary, #ffffff);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.parking-lot-sidebar.open {
  transform: translateX(0);
}

.parking-lot-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.parking-lot-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

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

.parking-lot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  flex-shrink: 0;
}

.parking-lot-header h3 {
  margin: 0;
  font-size: calc(1.1rem + var(--text-bump));
  font-weight: 600;
  color: var(--navy-primary, #1a2b4a);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.parking-lot-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: calc(1.1rem + var(--text-bump));
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.2s;
}

.parking-lot-close:hover {
  color: var(--text-dark);
}

/* ===== CONTENT ===== */

.parking-lot-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

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

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

.parking-lot-empty i {
  font-size: calc(2.5rem + var(--text-bump));
  margin-bottom: 1rem;
  opacity: 0.4;
}

.parking-lot-empty p {
  margin: 0.5rem 0;
  font-size: calc(0.95rem + var(--text-bump));
}

.parking-lot-empty-hint {
  font-size: calc(0.85rem + var(--text-bump)) !important;
  opacity: 0.7;
}

/* ===== GROUPS ===== */

.parking-lot-group {
  margin-bottom: 1.25rem;
}

/* "Done" (addressed) items group — separated from the active parked list so a
   user can still restore an item. Rails-only addition (the JS app removed done
   items outright); rule matches the existing group styling so it stays subtle. */
.parking-lot-group-done {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.parking-lot-group-done .parking-lot-item-content p {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--border-color, #e2e8f0);
}

.parking-lot-group-header {
  font-size: calc(0.75rem + var(--text-bump));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ===== ITEMS ===== */

.parking-lot-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-secondary, #f8f9fa);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: background 0.2s;
}

.parking-lot-item:hover {
  background: var(--teal-light, #e8f4f8);
}

.parking-lot-item-content {
  flex: 1;
  min-width: 0;
}

.parking-lot-item-content p {
  margin: 0;
  font-size: calc(0.9rem + var(--text-bump));
  line-height: 1.4;
  color: var(--text-dark);
  word-wrap: break-word;
}

.parking-lot-item-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.375rem;
  font-size: calc(0.75rem + var(--text-bump));
  color: var(--text-muted);
}

.parking-lot-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Rails renders each action as a button_to <form>; keep those forms from
   disturbing the column layout the JS app's bare buttons produced. */
.parking-lot-item-actions form {
  margin: 0;
  display: flex;
}

.parking-lot-item-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: calc(0.9rem + var(--text-bump));
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parking-lot-item-action:hover {
  color: var(--teal-accent);
  background: rgba(74, 155, 181, 0.1);
}

.parking-lot-item-action[data-action="discard"]:hover {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

/* ===== 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 ===== */

.parking-lot-toggle {
  position: relative;
  background: none;
  border: none;
  color: #ffffff;  /* Always white — header background is always dark */
  font-size: calc(1.1rem + var(--text-bump));
  cursor: pointer;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.parking-lot-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--teal-accent);
}

.parking-lot-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--teal-accent, #4a9bb5);
  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 {
  outline: none;
  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 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  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 {
  content: '\F612'; /* bi-pin-angle */
  font-family: 'bootstrap-icons';
  color: var(--teal-accent);
  flex-shrink: 0;
  font-size: calc(0.75rem + var(--text-bump));
  margin-top: 2px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 576px) {
  .parking-lot-sidebar {
    width: 100vw;
  }
}

/* ===== 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 0.2s;
}

.parking-action-card-actions .park-action-park {
  background: transparent;
  color: var(--teal-accent, #4a9bb5);
  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);
}
