@keyframes flashTable { 0% { opacity: 0.3; transform: scale(0.99); } 100% { opacity: 1; transform: scale(1); } }

/* Tactile feedback animations for tracking view */
.click-bounce:active,
#tracking-prev-month:active,
#tracking-next-month:active,
.copy-personal-link-btn:active,
.pill:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

.tracking-table-container input::placeholder {
  color: rgba(255, 255, 255, 0.03);
}

/* Video Projects Accordion */
.vp-client-card { background: linear-gradient(145deg, rgba(30,41,59,0.7), rgba(15,23,42,0.9)); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; margin-bottom: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.vp-client-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; cursor: pointer; font-weight: bold; font-size: 16px; user-select: none; transition: background 0.2s, color 0.2s; }
.vp-client-header:hover { background: rgba(255,255,255,0.05); color: var(--gold); }
.vp-client-header .chevron { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.vp-client-header.open .chevron { transform: rotate(180deg); }
.vp-client-body { display: none; padding: 20px; background: rgba(0,0,0,0.2); border-top: 1px solid rgba(255,255,255,0.05); }
.vp-client-header.open + .vp-client-body { display: block; animation: slideDown 0.3s ease-out; }

.vp-package-card { background: rgba(15, 23, 42, 0.6); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); position: relative; }
.vp-package-card.locked { opacity: 0.5; filter: grayscale(1); transition: opacity 0.3s; }
.vp-package-card.locked:hover { opacity: 0.7; }
.vp-package-card.locked .vp-table input, .vp-package-card.locked .vp-table select, .vp-package-card.locked .vp-add-vid-btn, .vp-package-card.locked .vp-del-vid-btn { pointer-events: none; }

.vp-package-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; cursor: pointer; font-weight: bold; color: var(--gold); user-select: none; transition: background 0.2s; }
.vp-package-header:hover { background: rgba(255,255,255,0.05); }
.vp-package-header .chevron { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.vp-package-header.open .chevron { transform: rotate(180deg); }
.vp-package-body { display: none; padding: 15px; border-top: 1px solid rgba(255,255,255,0.05); }
.vp-package-header.open + .vp-package-body { display: block; animation: slideDown 0.3s ease-out; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.vp-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px; border-radius: 6px; overflow: hidden; }
.vp-table th, .vp-table td { padding: 12px; border: 1px solid rgba(255,255,255,0.05); text-align: right; }
.vp-table th { background: rgba(0,0,0,0.4); color: #bbb; font-weight: normal; font-size: 13px; }
.vp-table td { background: rgba(15,23,42,0.4); }
.vp-table input, .vp-table select { width: 100%; background: transparent; border: none; color: white; outline: none; font-family: inherit; font-size: 14px; padding: 4px; transition: border-bottom 0.2s; }
.vp-table input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.vp-table input:focus, .vp-table select:focus { border-bottom: 1px solid var(--gold); background: rgba(255,255,255,0.05); }
.vp-table select option { background: #0f172a; color: white; }

.vp-actions { display: flex; gap: 10px; align-items: center; }
.vp-action-btn { 
  background: rgba(239, 68, 68, 0.1); /* pale red */
  border: none; 
  color: var(--danger); 
  cursor: pointer; 
  padding: 8px; 
  border-radius: 6px;
  opacity: 0.8; 
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* bouncy transition */
}
.vp-action-btn:hover { 
  opacity: 1;
  background: rgba(239, 68, 68, 0.2); 
  transform: scale(1.05);
}
.vp-action-btn:active {
  background: var(--danger); /* strong red */
  color: #fff; /* white icon */
  transform: scale(0.95); /* pop-in animation */
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  direction: rtl;
  position: relative;
}

/* VP Timeline Container */
#vp-timeline-list {
  position: relative;
}

/* Vertical line on the right */
#vp-timeline-list::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  right: 69px; /* space for label container */
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.vp-timeline-month-group {
  position: relative;
  display: flex;
  margin-bottom: 20px;
}

/* Month label sticking to top */
.vp-timeline-month-label {
  position: sticky;
  top: 15px;
  width: 40px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 10;
  margin-left: 15px;
  align-self: flex-start;
}

/* Inner span rotated */
.vp-timeline-month-label span {
  transform: rotate(-90deg);
  transform-origin: center center;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold, #d4af37);
  background: rgba(15, 23, 42, 0.9);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  display: inline-block;
}

.vp-timeline-month-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  z-index: 2;
  margin-right: 15px; /* space to not overlap vertical line */
}

.vp-timeline-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Horizontal connector line */
.vp-timeline-item::before {
  content: "";
  position: absolute;
  top: 20px;
  right: -15px;
  width: 15px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}

/* Dot on vertical line */
.vp-timeline-item::after {
  content: "";
  position: absolute;
  top: 16px;
  right: -20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold, #d4af37);
  border: 2px solid #0f172a;
}

/* Color coding by type */
.vp-timeline-item.type-note { border-right: 3px solid #3b82f6; }
.vp-timeline-item.type-note::after { background: #3b82f6; }

.vp-timeline-item.type-request { border-right: 3px solid #f59e0b; }
.vp-timeline-item.type-request::after { background: #f59e0b; }

.vp-timeline-item.type-preference { border-right: 3px solid #ec4899; }
.vp-timeline-item.type-preference::after { background: #ec4899; }

/* 📒 Video Manager entries (web/client_log.js) */
.vp-timeline-item.type-client_request { border-right: 3px solid #f59e0b; }
.vp-timeline-item.type-client_request::after { background: #f59e0b; }
.vp-timeline-item.type-correction { border-right: 3px solid #ef4444; }
.vp-timeline-item.type-correction::after { background: #ef4444; }
.vp-timeline-item.type-status { border-right: 3px solid #22c55e; }
.vp-timeline-item.type-status::after { background: #22c55e; }
.vp-timeline-meta { margin-top: 6px; font-size: 12px; color: #94a3b8; line-height: 1.5; }

/* Font size increase for journal body */
.vp-timeline-body {
  font-size: 16px; /* slightly bigger than standard 13/14px */
  line-height: 1.6;
  color: #f1f5f9;
  margin-top: 8px;
}

.vp-timeline-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #94a3b8;
}

.vp-del-note {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.vp-del-note:hover { opacity: 1; }

/* Video Package Status Colors */
.vp-package-card.status-color-red {
  border-right: 4px solid #fca5a5;
}
.vp-package-card.status-color-yellow {
  border-right: 4px solid #fde047;
}
.vp-package-card.status-color-green {
  border-right: 4px solid #86efac;
}
.vp-package-card.status-color-gray {
  border-right: 4px solid #cbd5e1;
}

/* Client Log Collapsible Styles */
.vp-timeline-panel {
  position: relative;
}

.vp-timeline-panel.collapsed {
  position: absolute;
  bottom: 0;
  left: 20px;
  height: 53px; /* Header height */
  width: 250px !important;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  border-left: none !important;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
  opacity: 0.85;
}

.vp-timeline-panel.collapsed:hover {
  opacity: 1;
  background: rgba(3, 10, 21, 0.9) !important;
}

.vp-timeline-panel.collapsed #vp-timeline-header {
  border-bottom: none !important;
}

/* Brain Sidebar Reader */
.brain-sidebar {
  position: absolute;
  top: 0;
  left: -400px; /* Hidden by default */
  width: 400px;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 10px 0 30px rgba(0,0,0,0.5);
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.brain-sidebar.open {
  left: 0;
}
.brain-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.2);
}
.brain-sidebar-title {
  color: #eab308;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: left;
}
.brain-sidebar-close {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
}
.brain-sidebar-close:hover {
  color: white;
}
.brain-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
  direction: ltr;
  text-align: left;
}
.brain-sidebar-content pre {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.brain-folder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: background 0.2s;
}
.brain-folder-item:hover {
  background: rgba(255,255,255,0.05);
}
