/* ProjectBob.xyz — Photos gallery (re-themed from timeline2.css) */

/* ── Photos page layout ── */
.photos-container {
  padding-top: var(--nav-height);
  height: 100vh; display: flex; flex-direction: column;
}
.photos-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.photos-header-left { display: flex; align-items: center; gap: 12px; }
.photos-title { font-size: 16px; font-weight: 600; color: var(--text); }
.photos-camera-badge {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-light); padding: 3px 10px; border-radius: 10px;
}

.photos-header-right { display: flex; align-items: center; }
.item-count { font-size: 12px; color: var(--text-muted); }

.photos-body { flex: 1; display: flex; overflow: hidden; }

/* ── Photo grid ── */
.photo-grid-container {
  flex: 1; overflow-y: auto; padding: 20px; background: var(--bg);
  will-change: scroll-position; -webkit-overflow-scrolling: touch;
}
.photo-grid-container::-webkit-scrollbar { width: 6px; }
.photo-grid-container::-webkit-scrollbar-track { background: transparent; }
.photo-grid-container::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; max-width: 1400px; margin: 0 auto;
}

.photo-item {
  position: relative; aspect-ratio: 1; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  cursor: pointer; transition: all 0.25s; box-shadow: var(--shadow-card);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.photo-item:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); border-color: var(--accent); }

.photo-item .placeholder {
  width: 100%; height: 100%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 12px; text-align: center; padding: 16px;
}
.photo-item .loading-spinner {
  width: 24px; height: 24px; border: 2px solid var(--border);
  border-top: 2px solid var(--accent); border-radius: 50%;
  animation: spin 1s linear infinite;
}

.photo-item .photo-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(26,26,46,0.85));
  padding: 10px 8px 8px; color: #fff; font-size: 12px;
  opacity: 0; transition: opacity 0.25s;
}
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-date { font-weight: 600; margin-bottom: 2px; }
.photo-time { opacity: 0.8; font-size: 11px; }

/* ── Timeline sidebar ── */
.timeline-sidebar {
  width: 180px; background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.timeline-header {
  padding: 16px 14px 12px; border-bottom: 1px solid var(--border);
}
.timeline-header h3 {
  color: var(--accent); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.timeline-stats {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  padding: 6px 8px; background: var(--bg); border-radius: 6px;
}

.timeline-scroll-container { flex: 1; position: relative; overflow: hidden; min-height: 0; }
.timeline-track {
  position: absolute; right: 12px; top: 20px; bottom: 20px; width: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 3px; cursor: pointer;
}
.timeline-thumb {
  position: absolute; right: 10px; width: 10px; height: 24px;
  background: var(--accent); border-radius: 5px; cursor: pointer;
  transition: all 0.2s; z-index: 10; box-shadow: var(--shadow-card);
}
.timeline-thumb:hover { background: var(--accent-hover); transform: scaleX(1.2); }

.timeline-labels { position: absolute; left: 12px; right: 28px; top: 20px; bottom: 20px; pointer-events: none; }
.timeline-label {
  position: absolute; font-size: 11px; color: var(--text-muted);
  white-space: nowrap; transform: translateY(-50%); transition: color 0.2s;
}
.timeline-label.current { color: var(--accent); font-weight: 600; }

.timeline-current-indicator {
  position: absolute; right: 28px; background: var(--accent); color: #fff;
  padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
  white-space: nowrap; transform: translateY(-50%) translateX(100%);
  opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; z-index: 20;
}
.timeline-current-indicator::after {
  content: ''; position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
  border: 4px solid transparent; border-right-color: var(--accent);
}
.timeline-current-indicator.visible { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ── Loading overlay ── */
.loading-overlay {
  position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: rgba(248,248,248,0.92); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 900;
}
.loading-content { text-align: center; color: var(--text-secondary); font-size: 14px; }
.spinner {
  border: 3px solid var(--border); border-top: 3px solid var(--accent);
  border-radius: 50%; width: 32px; height: 32px;
  animation: spin 1s linear infinite; margin: 0 auto 12px;
}

/* ── Photo modal ── */
.photo-modal {
  position: fixed; inset: 0; background: rgba(248,248,248,0.95);
  backdrop-filter: blur(8px); display: none; align-items: center;
  justify-content: center; z-index: 2000;
}
.photo-modal.active { display: flex; }
.photo-modal img {
  max-width: 90vw; max-height: 90vh; object-fit: contain;
  border-radius: 12px; box-shadow: var(--shadow-modal);
}
.photo-modal-close {
  position: absolute; top: 20px; right: 20px; width: 36px; height: 36px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-secondary); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.photo-modal-close:hover { border-color: var(--accent); color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .timeline-sidebar { width: 140px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
}
@media (max-width: 480px) {
  .timeline-sidebar { width: 100px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
  .photo-grid-container { padding: 12px; }
}
