/* Project Tab
Scope: project overview lists, project map, project outline/list controls, and project-tab-specific rows. */

#project-outline-meta {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 10px;
}

#project-outline-add-link,
#project-checklist-list {
  display: none;
}

.project-list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border);
}

.project-list-tab {
  min-height: 32px;
  display: inline-grid;
  grid-template-columns: 28px minmax(0, auto);
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 2px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text3);
  font-family: var(--font-ui);
  font-size: 12px;
  cursor: pointer;
}

.project-list-tab-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
  color: var(--text2);
}

.project-list-tab-label {
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-list-tab:hover,
.project-list-tab.active {
  color: var(--text);
  border-color: var(--project-accent-border, var(--accent));
}

.project-list-tab.active .project-list-tab-icon {
  color: var(--project-accent-secondary, var(--accent));
}

.project-list-tab.map .project-list-tab-icon { color: var(--blue); }

.project-map-meta,
.project-map-empty {
  color: var(--text3);
  font-size: 12px;
}

.project-list-title-input.readonly-title {
  display: block;
  line-height: 1.4;
  pointer-events: none;
}

.project-map-row .project-map-filepath {
  font-family: var(--font-mono);
  font-size: 12px;
}

.project-list-shortcuts {
  gap: 8px;
  padding-bottom: 12px;
}

.project-list-shortcut {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  border-radius: 999px;
  border-color: rgba(255,255,255,.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,.46) 0%, rgba(255,255,255,.22) 13%, rgba(255,255,255,.055) 35%, rgba(0,0,0,.34) 36%, rgba(0,0,0,.74) 100%),
    #08090d;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.58),
    inset 0 -8px 14px rgba(0,0,0,.72),
    inset 0 0 0 1px rgba(255,255,255,.035),
    0 1px 0 rgba(255,255,255,.12),
    0 7px 14px rgba(0,0,0,.38);
  color: #e7e8ec;
  letter-spacing: .08em;
}

.project-list-shortcut::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.78) 32%, rgba(0,0,0,1) 48%, rgba(0,0,0,1) 100%);
  z-index: 4;
}

.project-list-shortcut .project-list-tab-icon,
.project-list-shortcut .project-list-tab-label {
  position: relative;
  z-index: 2;
}

.project-list-shortcut::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #000;
  opacity: .86;
  pointer-events: none;
  z-index: 5;
}

.project-list-shortcut .project-list-tab-icon {
  border-right-color: rgba(255,255,255,.18);
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255,255,255,.32), 0 1px 0 rgba(0,0,0,.9);
}

.project-list-shortcut .project-list-tab-label {
  color: #e8e9ee;
  text-shadow: 0 1px 0 rgba(0,0,0,.86), 0 0 7px rgba(255,255,255,.14);
}

.project-list-shortcut:hover,
.project-list-shortcut.active {
  color: #ffffff;
  border-color: rgba(255,255,255,.42);
  background:
    linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.28) 13%, rgba(255,255,255,.075) 35%, rgba(0,0,0,.30) 36%, rgba(0,0,0,.70) 100%),
    #0b0c10;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.70),
    inset 0 -8px 16px rgba(0,0,0,.70),
    0 0 0 1px rgba(255,255,255,.055),
    0 8px 16px rgba(0,0,0,.42);
}

.project-list-shortcut.active .project-list-tab-icon,
.project-list-shortcut.active .project-list-tab-label {
  color: #ffffff;
}

.project-list-chooser-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 4px;
  margin: -2px 0 12px;
}

.project-list-choice {
  max-width: 220px;
  padding: 4px 10px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--text3);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-list-choice:hover,
.project-list-choice.active {
  color: var(--text);
  border-color: var(--project-accent-border, var(--accent));
}

.project-lists-creator {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 16px;
}

.project-lists-add-link {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

.project-lists-creator-form {
  display: none;
  grid-template-columns: minmax(16ch, 22ch) minmax(14ch, 18ch) auto auto;
  gap: 8px;
  align-items: center;
}

.project-lists-creator-form.open {
  display: grid;
}

.project-lists-error {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--accent2);
}

.project-list-section {
  margin: 0 0 18px;
}

.project-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.project-list-title-input {
  font-size: 13px;
  letter-spacing: 6px;
  color: var(--text3);
  text-transform: uppercase;
  background: transparent;
  border: 1px solid transparent;
  outline: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  width: min(34ch, 100%);
}

.project-list-title-input:focus {
  border-color: transparent;
  color: var(--text);
  caret-color: var(--text);
}

.project-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.outline-link {
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.outline-link:hover {
  color: var(--accent);
}

.project-list-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-list-row {
  display: grid;
  gap: 10px;
  align-items: start;
}

.project-list-row.numbered {
  grid-template-columns: 26px minmax(0, 1fr);
}

.project-list-row.named {
  grid-template-columns: minmax(12ch, 15ch) minmax(0, 1fr);
}

.project-list-index {
  width: 26px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 12px;
}

.project-list-row .field-input,
.project-list-row .field-textarea,
.project-lists-creator-form .field-input {
  width: 100%;
  min-width: 0;
  background: var(--bg2);
}

.project-list-row .field-input {
  min-height: 30px;
}

.project-list-numbered-text {
  min-height: 30px;
  max-height: 66px;
  line-height: 18px;
  resize: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: hidden;
}

.project-list-row .field-textarea {
  min-height: 3.2em;
  max-height: 4.8em;
  line-height: 1.35;
  resize: vertical;
  overflow-y: auto;
}

.project-list-row .field-textarea.project-list-numbered-text,
.project-list-row .field-textarea.project-list-description-text {
  min-height: 30px;
  max-height: 66px;
  line-height: 18px;
  resize: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: hidden;
  scrollbar-width: none;
}

.project-list-row .field-textarea.project-list-numbered-text::-webkit-scrollbar,
.project-list-row .field-textarea.project-list-description-text::-webkit-scrollbar {
  display: none;
}
