/* Detail modal — fullscreen on mobile */
.detail-modal-box {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  border-radius: 0;
  padding: 0;
  position: relative;
}
@media (min-width: 640px) {
  .detail-modal-box {
    width: 480px;
    height: 90vh;
    max-width: 480px !important;
    max-height: 90vh !important;
    border-radius: 1rem;
  }
}

/* Gallery image fade-in */
.gallery-img {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}
.gallery-img.loaded {
  opacity: 1;
}

/* Recording pulse animation */
.recording-pulse {
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Heart pop animation */
.heart-pop {
  animation: heartPop 0.3s ease-out;
}
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Waveform animation for voice note thumbnails */
@keyframes waveform {
  0%, 100% { height: 30%; }
  50% { height: 80%; }
}
.waveform-bar {
  animation: waveform 1.2s ease-in-out infinite;
}
.waveform-bar:nth-child(1) { animation-delay: 0s; }
.waveform-bar:nth-child(2) { animation-delay: 0.1s; }
.waveform-bar:nth-child(3) { animation-delay: 0.2s; }
.waveform-bar:nth-child(4) { animation-delay: 0.3s; }
.waveform-bar:nth-child(5) { animation-delay: 0.15s; }
.waveform-bar:nth-child(6) { animation-delay: 0.25s; }
.waveform-bar:nth-child(7) { animation-delay: 0.05s; }

/* Hold-to-record active state */
#record-btn:active,
#record-btn.recording {
  background: #fef1f7;
  border-color: #f83c86;
}

/* Smooth htmx transitions */
.htmx-swapping {
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
.htmx-settling {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

/* Always-visible scrollbar for comment drawer */
.scrollbar-visible {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.scrollbar-visible::-webkit-scrollbar {
  width: 4px;
}
.scrollbar-visible::-webkit-scrollbar-track {
  background: transparent;
}
.scrollbar-visible::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

/* Detail view slide transitions */
#detail-content {
  overflow: hidden;
  position: relative;
}
#detail-view {
  will-change: transform;
}
#detail-view.slide-out-left {
  transform: translateX(-100%);
  transition: transform 0.25s ease-in-out;
}
#detail-view.slide-out-right {
  transform: translateX(100%);
  transition: transform 0.25s ease-in-out;
}
#detail-view.slide-in-from-left {
  transform: translateX(-100%);
}
#detail-view.slide-in-from-right {
  transform: translateX(100%);
}
#detail-view.slide-in {
  transform: translateX(0);
  transition: transform 0.25s ease-in-out;
}

/* Dock styling overrides for ruracio theme */
.dock-active {
  color: #de7c2a !important;
}
