.event-card.selected-event .card {
    background-color: lightyellow;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* SortableJS drag states */
.event-card-ghost {
    opacity: 0.4;
}

.event-card-chosen {
    cursor: move;
}

.event-card-dragging {
    opacity: 0.7;
    transform: rotate(2deg);
}

/* Sortable placeholder (legacy - kept for compatibility) */
.event-card-placeholder {
    border: 2px dashed var(--bs-gray-600) !important;
    background-color: var(--bg-light) !important;
    visibility: visible !important;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

#event-view,
.event-card:last-child {
    margin-bottom: 10px !important;
}

/* Carousel controls */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    opacity: 1;
    width: 3rem;
    height: 3rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
    opacity: 1;
    top: 60px;
    bottom: 60px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

/* Carousel indicators - ensure visibility on light backgrounds */
.carousel-indicators button {
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
    border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Note: Background color moved to template using Bootstrap .bg-dark utility */

/* Event Media Carousel Modal */
.modal-backdrop.show {
    opacity: 0.9;
}

#eventMediaCarouselModal .carousel-control-prev-icon,
#eventMediaCarouselModal .carousel-control-next-icon {
    width: 4rem;
    height: 4rem;
}

#eventMediaCarouselModal .youtube-embed {
    min-height: 40vh;
}
#eventMediaCarouselModal {
    /* Override Bootstrap Swipe's inline touch-action: pan-y which blocks pinch-zoom.
       The touch-action intersection model means the child img's pinch-zoom only works
       if the parent also allows it. !important overrides the inline style. */
    touch-action: pan-y pinch-zoom !important;
}

#eventMediaCarouselModal img {
    max-height: 80vh;
    touch-action: pinch-zoom;
}

/* Full screen toggle button visibility */
.carousel-fullscreen-toggle {
    width: 44px;
    height: 44px;
    z-index: 1051;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
    background-color: rgba(0, 0, 0, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

.carousel-fullscreen-toggle:hover {
    background-color: rgba(0, 0, 0, 0.9) !important;
    border-color: rgba(255, 255, 255, 1) !important;
}

/* Caption styling
   Note: Bootstrap .bg-dark .text-white utilities added to template */
.carousel-caption {
    position: relative;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
}

.description-toggle {
    cursor: pointer;
    bottom: 0 !important;
    right: 0 !important;
    z-index: 1000;
}

.description-toggle.collapsed i {
    transform: rotate(180deg);
}

.event-thumbnail {
    height: 200px;
}

@media (max-width: var(--bs-breakpoint-md)) {
    .demo-card {
        max-width: 280px;
        margin: 0 auto;
        position: relative;
    }

    /* Card animation styles removed for mobile (no special styling needed) */

    /* Keep the tap indicator styles as they are */
    .tap-indicator {
        position: absolute;
        top: 20%;
        right: 20px;
        font-size: 24px;
        color: var(--bs-black);
        opacity: 0;
        z-index: 10;
        transform-origin: center;
        animation: tapAnimation 3s infinite;
    }

    /* Add stroke effect to the hand icon */
    .tap-indicator i {
        -webkit-text-stroke: 2px white;
        filter: drop-shadow(0 0 1px white) drop-shadow(0 0 1px white)
            drop-shadow(0 0 2px white);
    }

    @keyframes tapAnimation {
        0% {
            transform: translate(0, 0) rotate(45deg);
            opacity: 0;
        }
        20% {
            transform: translate(0, 0) rotate(45deg);
            opacity: 1;
        }
        40% {
            transform: translate(-120px, 80px) rotate(45deg);
            opacity: 1;
        }
        /* Click happens at 1200ms (40% of 3000ms) */
        50% {
            transform: translate(-120px, 80px) rotate(45deg) scale(0.8);
        }
        60% {
            transform: translate(-120px, 80px) rotate(45deg) scale(1);
            opacity: 1;
        }
        80% {
            transform: translate(-120px, 80px) rotate(45deg);
            opacity: 0;
        }
        100% {
            transform: translate(0, 0) rotate(45deg);
            opacity: 0;
        }
    }

    /* Content preview styling */
    .demo-content-preview {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: white;
        padding: 20px;
        z-index: 1;
    }

    .modal-backdrop.show {
        opacity: 0.5;
    }
}

@media (min-width: var(--bs-breakpoint-md)) {
    .event-thumbnail {
        height: 200px;
    }
}

/* Event Panel Layout - scroll carousel and description together */
.event-panel {
    overflow-y: auto;
}

/* Event Details Spacing */
.event-details {
    margin-top: 60px;
}

.event-carousel-container + .event-details {
    margin-top: unset;
}

/* Fullscreen auto-hide controls */
#carouselModal .fs-control {
    transition: opacity 0.4s ease;
}

/* Override Bootstrap btn-close default opacity (0.5) for full visibility */
#carouselModal .btn-close {
    opacity: 1;
}

#carouselModal.fs-controls-hidden .fs-control {
    opacity: 0;
    pointer-events: none;
}

/* Prevent overscroll from exiting Browser Fullscreen on iPadOS Safari */
.overflow-y-auto,
#events-timeline,
.offcanvas-body {
    overscroll-behavior: contain;
}

/* Hide fullscreen button on mobile phones — Fullscreen API not supported on iPhone Safari */
@media (max-width: 767px) {
    .carousel-fullscreen-toggle {
        display: none !important;
    }
}

/* Safe-area inset for close button — prevents overlap with mobile status bar in fullscreen */
@supports (padding: env(safe-area-inset-top)) {
    #carouselModal .btn-close {
        top: max(0.75rem, env(safe-area-inset-top)) !important;
        right: max(0.75rem, env(safe-area-inset-right)) !important;
    }
}
