/* ============================================
   View Panel Component Styles
   Extracted from inline <style> blocks in:
   - templates/components/view-panel/media-carousel.php
   - templates/components/view-panel/tripItinerary.php
   - templates/components/view-panel/draftsList.php
   - templates/components/view-panel/timeline.php
   - templates/components/view-panel/map-section.php
   ============================================ */

/* --- Media Carousel --- */
.maincarousel img { max-height: 60vh; object-fit: contain; width: 100%; height: 100%; }
.maincarousel .r1v-carousel-prev,
.maincarousel .r1v-carousel-next { width: 5%; }
.maincarousel .r1v-carousel-prev:active,
.maincarousel .r1v-carousel-next:active,
.maincarousel .r1v-carousel-prev:hover,
.maincarousel .r1v-carousel-next:hover { color: unset; text-decoration: none; outline: 0; opacity: .9; background-color: transparent; }
.r1v-slide.active.rovVideo>div { width: calc(100% - 50px); margin: auto; }
@media (min-width: 768px) { .r1v-slide.active.rovVideo>div { width: calc(100% - 100px); } }
.maincarousel .r1v-slide:not(.active) .captionContainer { display: none !important; }
/* Let clicks pass through to video player controls */
.maincarousel:has(.r1v-slide.active.rovBunny) .r1v-carousel-prev,
.maincarousel:has(.r1v-slide.active.rovBunny) .r1v-carousel-next,
.maincarousel:has(.r1v-slide.active.rovYoutube) .r1v-carousel-prev,
.maincarousel:has(.r1v-slide.active.rovYoutube) .r1v-carousel-next,
.maincarousel:has(.r1v-slide.active.rovVideo) .r1v-carousel-prev,
.maincarousel:has(.r1v-slide.active.rovVideo) .r1v-carousel-next { pointer-events: none; }
.maincarousel:has(.r1v-slide.active.rovBunny) .r1v-carousel-prev-icon,
.maincarousel:has(.r1v-slide.active.rovBunny) .r1v-carousel-next-icon,
.maincarousel:has(.r1v-slide.active.rovYoutube) .r1v-carousel-prev-icon,
.maincarousel:has(.r1v-slide.active.rovYoutube) .r1v-carousel-next-icon,
.maincarousel:has(.r1v-slide.active.rovVideo) .r1v-carousel-prev-icon,
.maincarousel:has(.r1v-slide.active.rovVideo) .r1v-carousel-next-icon { pointer-events: auto; cursor: pointer; }

/* --- Trip Itinerary --- */
/* Itinerary carousel shared height */
.location-carousel,
.location-carousel .ratio-16x9,
.referenced-view-carousel .maincarousel {
    height: 200px;
}

.location-carousel img,
.referenced-view-carousel .maincarousel img {
    max-height: 200px;
}

@media (min-width: 768px) {
    .location-carousel,
    .location-carousel .ratio-16x9,
    .referenced-view-carousel .maincarousel {
        height: 300px;
    }

    .location-carousel img,
    .referenced-view-carousel .maincarousel img {
        max-height: 300px;
    }
}

/* Location carousel base styling */
.location-carousel {
    background: black;
    border-radius: 0.375rem;
}

.location-carousel img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.location-carousel .r1v-carousel-prev,
.location-carousel .r1v-carousel-next {
    width: 15%;
}

.location-carousel .r1v-carousel-indicators {
    margin-bottom: 0.25rem;
}

.location-carousel .r1v-carousel-indicators button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
}

.location-carousel .ratio-16x9 iframe,
.location-carousel .ratio-16x9 video {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

/* Tablet and up: larger carousels */
@media (min-width: 768px) {
    .location-carousel .r1v-carousel-prev,
    .location-carousel .r1v-carousel-next {
        width: 10%;
    }

    .location-carousel .r1v-carousel-indicators {
        margin-bottom: 0.5rem;
    }

    .location-carousel .r1v-carousel-indicators button {
        width: 8px;
        height: 8px;
    }
}

/* Highlight animation for scroll target */
.itinerary-panel-container.highlight {
    animation: panel-highlight 1.5s ease;
}

@keyframes panel-highlight {
    0%, 100% { box-shadow: none; }
    30% { box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.5); }
}

/* Stop share bar — compact within card context */
.itinerary-panel-container .rovViewPanelShareBar {
    border: none !important;
    max-width: none;
    padding: 0 !important;
}

.itinerary-panel-container .rovShareBar span {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* --- Drafts List --- */

/* Only apply hover effect if not disabled */
.draft-card:hover:not(.disabled) {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

/* Completion Circle Styles */
.completion-circle {
    position: relative;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.progress-circle {
    transition: stroke-dashoffset 0.3s ease;
}

/* Completion details styling */
.completion-details .bg-gray-100 {
    border: 1px solid var(--color-border);
}

/* --- Timeline --- */
.timeline-container::-webkit-scrollbar { width: 6px; }
.timeline-container::-webkit-scrollbar-track { background: #f1f1f1; }
.timeline-container::-webkit-scrollbar-thumb { background: #888; border-radius: 3px; }
.timeline-container::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- Loading Panel --- */
#viewPanelLoadingContainer .blur,
#viewPanelLoadingContainer p,
#viewPanelLoadingContainer img {
    animation: pulse 1s infinite ease-in-out;
}

#viewPanelLoadingContainer .blur {
    color: transparent;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
