/* views.css — Thought Processor View System Styles
 * Session 59 — Glassmorphic Theme
 */

/* === VIEW SWITCHER === */
.view-switcher {
  display: flex; gap: 2px;
  background: rgba(20, 184, 166, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(20, 184, 166, 0.15);
  border-radius: 10px; padding: 3px;
  margin: 8px 16px 4px;
}
.view-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border: none; border-radius: 8px;
  background: transparent; color: rgba(255,255,255,0.45);
  font-size: 12px; cursor: pointer; transition: all 0.2s;
  white-space: nowrap; font-family: var(--font); letter-spacing: 0.3px;
}
.view-btn:hover { background: rgba(20,184,166,0.1); color: rgba(255,255,255,0.8); }
.view-btn.active {
  background: linear-gradient(135deg, rgba(20,184,166,0.3), rgba(59,130,246,0.25));
  color: #fff; font-weight: 600;
  box-shadow: 0 0 12px rgba(20,184,166,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
.view-icon { font-size: 14px; }
.view-label { font-weight: 500; }
@media (max-width: 768px) { .view-label { display: none; } .view-switcher { margin: 6px 8px 2px; } }

/* === VIEW CONTAINER === */
.view-container { min-height: 200px; padding: 16px; }

/* === ACTION BAR === */
.tp-action-bar {
  display: flex; gap: 3px; flex-wrap: wrap;
  padding: 8px 0 4px; margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  opacity: 0; transition: opacity 0.2s;
}
.nb-cell:hover .tp-action-bar,
.wb-cell:hover .tp-action-bar,
.ol-child:hover .tp-action-bar { opacity: 1; }
.tp-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.4); font-size: 11px; cursor: pointer;
  transition: all 0.15s; font-family: var(--font);
}
.tp-btn:hover { background: rgba(20,184,166,0.12); color: #fff; border-color: rgba(20,184,166,0.3); }
.tp-btn span { font-size: 10px; font-weight: 500; }
.tp-btn.pinned { color: #14b8a6; border-color: rgba(20,184,166,0.4); background: rgba(20,184,166,0.1); }
.act-challenge:hover { color: #fb923c; border-color: #f97316; }
.act-refine:hover { color: #a78bfa; border-color: #8b5cf6; }

/* === NOTEBOOK VIEW — Glassmorphic cells === */
.view-notebook { padding: 16px 20px; }
.nb-cell {
  margin-bottom: 12px; border-radius: 12px;
  border-left: 4px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  padding: 16px 20px;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nb-cell:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}
.nb-query {
  border-left: 4px solid #3b82f6 !important;
  background: rgba(59,130,246,0.08) !important;
}
.nb-query:hover { background: rgba(59,130,246,0.12) !important; }
.nb-response {
  border-left: 4px solid #10b981 !important;
  background: rgba(16,185,129,0.08) !important;
}
.nb-response:hover { background: rgba(16,185,129,0.12) !important; }

.nb-chain {
  border-left: 4px solid #f97316 !important;
  background: rgba(249,115,22,0.08) !important;
}
.nb-annotation {
  border-left: 4px solid #f59e0b !important;
  background: rgba(245,158,11,0.08) !important;
}
.nb-pinned {
  border-left: 4px solid #14b8a6 !important;
  box-shadow: 0 0 20px rgba(20,184,166,0.12), inset 0 0 0 1px rgba(20,184,166,0.15) !important;
  background: rgba(20,184,166,0.08) !important;
}
.nb-cell-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 10px;
}
.nb-num { font-family: 'JetBrains Mono', monospace; color: #14b8a6; font-size: 10px; }
.nb-cell-content { font-size: 14px; line-height: 1.7; }

/* === WORKBENCH VIEW — Grid with glass headers === */
.view-workbench { padding: 16px; }
.wb-grid {
  display: grid; gap: 1px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.wb-header {
  background: rgba(20,184,166,0.12); padding: 14px;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(20,184,166,0.15);
}
.wb-corner { justify-content: flex-start; color: #14b8a6; background: rgba(20,184,166,0.15); }
.wb-query {
  background: rgba(59,130,246,0.08); padding: 14px;
  font-size: 13px; color: var(--text-primary);
  border-right: 3px solid rgba(59,130,246,0.4);
  line-height: 1.5;
}
.wb-cell {
  background: rgba(16,185,129,0.05); padding: 14px;
  font-size: 13px; color: var(--text-primary);
  overflow-y: auto; max-height: 400px; line-height: 1.6;
  transition: background 0.15s;
}
.wb-cell:hover { background: rgba(16,185,129,0.1); }
.wb-empty { color: rgba(255,255,255,0.25); font-style: italic; }

/* === OUTLINE VIEW — Tree with glass nodes === */
.view-outline { padding: 16px 20px; }
.ol-node { margin-bottom: 8px; }

.ol-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; cursor: pointer; border-radius: 10px;
  font-size: 13px; color: var(--text-primary); font-weight: 500;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  transition: all 0.15s;
}
.ol-toggle:hover { background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.25); }
.ol-arrow { font-size: 10px; color: #3b82f6; width: 14px; text-align: center; }
.ol-query-text { flex: 1; }
.ol-children { padding-left: 28px; }
.ol-child {
  padding: 12px 16px; margin: 6px 0; border-radius: 10px;
  background: rgba(16,185,129,0.06); cursor: pointer;
  border: 1px solid rgba(16,185,129,0.1);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.ol-child:hover {
  background: rgba(20,184,166,0.1);
  border-color: rgba(20,184,166,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateX(4px);
}
.ol-child-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ol-child-preview { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.5; }
.ol-expanded .ol-child-preview { display: none; }
.ol-full { margin-top: 10px; font-size: 14px; line-height: 1.7; }

.ol-annotation { font-size: 12px; color: #f59e0b; padding: 6px 10px; font-style: italic; }

/* === CANVAS VIEW — Glassmorphic floating cards === */
.view-canvas { padding: 0; position: relative; }
.cv-surface {
  position: relative; min-height: 600px; width: 100%; overflow: auto;
  background:
    radial-gradient(circle at 20% 30%, rgba(20,184,166,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59,130,246,0.06) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}
.cv-beta-badge {
  position: sticky; top: 10px; left: 10px; z-index: 10;
  background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.25);
  color: #a78bfa; padding: 4px 12px; border-radius: 14px;
  font-size: 10px; font-weight: 600; backdrop-filter: blur(8px);
}
.cv-card {
  position: absolute; width: 260px; min-height: 60px;
  background: rgba(15,15,30,0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 14px; cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.cv-card:hover {
  border-color: rgba(20,184,166,0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(20,184,166,0.08);
}
.cv-card.cv-user {
  border-left: 4px solid rgba(59,130,246,0.6); width: 240px;
  background: rgba(59,130,246,0.08);
}
.cv-card.cv-assistant {
  border-left: 4px solid rgba(16,185,129,0.6);
  background: rgba(16,185,129,0.06);
}
.cv-card.cv-expanded { width: 420px; z-index: 5; background: rgba(15,15,30,0.9); }
.cv-card-header { font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.cv-card-body { font-size: 12px; color: rgba(255,255,255,0.75); line-height: 1.6; max-height: 120px; overflow: hidden; }
.cv-expanded .cv-card-body { max-height: none; overflow: visible; }

/* === ANNOTATION INPUT === */
.tp-note-input-wrap {
  margin-top: 10px; padding: 10px;
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px; backdrop-filter: blur(8px);
}
.tp-note-input {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: var(--text-primary); padding: 8px 10px;
  font-size: 13px; resize: vertical; font-family: var(--font);
}
.tp-note-input:focus { border-color: rgba(245,158,11,0.4); outline: none; }
.tp-note-actions { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
.tp-note-save { padding: 5px 14px; border-radius: 6px; font-size: 11px; cursor: pointer; border: none; background: linear-gradient(135deg, #f59e0b, #d97706); color: #000; font-weight: 600; }
.tp-note-cancel { padding: 5px 14px; border-radius: 6px; font-size: 11px; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: var(--text-muted); }

/* === PIN MARKER === */
.tp-pin-marker { font-size: 11px; color: #14b8a6; padding: 4px 0; }
.view-container .model-badge { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; color: #fff; }
