/* Ensure main content has space below for fixed bottom bar */
#main-content { padding-bottom: 5rem; }
body { overflow-y: auto; height: 100%; }
html { height: 100%; }
#compare-canvas { background: repeating-conic-gradient(#ccc 0% 25%, #eee 0% 50%) 50% / 20px 20px; cursor: move; }

/* Drawer styles */
.drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: white;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  transition: left 0.3s ease;
  z-index: 40;
  overflow-y: auto;
}
.drawer.open {
  left: 0;
}
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 39;
  display: none;
}
.drawer-overlay.open {
  display: block;
}
.drawer-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: bold;
  font-size: 1.2rem;
}
.drawer-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.drawer-item:hover {
  background-color: #f3f4f6;
}

.skeleton-img {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
 animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Bottom bar styles */
.bottom-btn {
  color: #6b7280; /* gray-500 */
  transition: color 0.2s ease;
  text-decoration: none;
}
.bottom-btn.active {
  color: #2563eb; /* blue-600 */
}
.bottom-btn svg {
  stroke: currentColor;
}

/* Card transitions */
.details {
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.details:not(.hidden) {
  max-height: 300px;
  opacity: 1;
}
.toggle-details svg {
  transition: transform 0.2s ease;
}
.toggle-details svg.rotate-180 {
  transform: rotate(180deg);
}
/* Overlay buttons */
.edit-btn, .delete-btn {
  transition: transform 0.1s ease;
}
.edit-btn:active, .delete-btn:active {
  transform: scale(0.9);
}
/* Skeleton loader improvement */
.skeleton-img {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Timeline Card Styles (offloaded from inline) ---- */
.timeline-card {
  transition: box-shadow 0.15s ease;
}
.timeline-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-image-wrapper {
  position: relative;
  background: #f3f4f6;
}
.card-image {
  display: block;
  width: 100%;
  height: 12rem;   /* 48 * 4px = 192px – matches h-48 */
  object-fit: cover;
}
.card-date {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}
.card-actions button {
  transition: transform 0.1s ease;
}
.card-actions button:active {
  transform: scale(0.9);
}
.card-rating {
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.card-checkbox {
  accent-color: #3b82f6;
}
.card-title {
  font-weight: 500;
  color: #1f2937;
}

/* Collapsible details */
.card-details {
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.card-details:not(.hidden) {
  max-height: 300px;
  opacity: 1;
}
.card-toggle-details svg {
  transition: transform 0.2s ease;
}
.card-toggle-details svg.rotate-180 {
  transform: rotate(180deg);
}

/* Skeleton loader */
.skeleton-img {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ----- Lightbox ----- */
.lightbox-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-overlay button {
  background: none;
  border: none;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Take photo button – square & full width */
.take-photo-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  padding: 1rem;
}
.take-photo-btn:hover {
  background-color: #1d4ed8;
}
.take-photo-btn:active {
  transform: scale(0.96);
}
.take-photo-btn svg {
  width: 5.5rem;
  height: 5.5rem;
}
.take-photo-btn span {
  font-size: 1.4rem;
}

/* Area buttons – taller */
.area-btn {
  height: 56px !important; /* force taller height */
  font-size: 1rem;
}

/* Page Header */
.page-header {
  background: white;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}