/* Mini Carousel - core styles
   Extracted from app/michaelblood.com/boisewestend.php for bvid-wide use.
   Include this CSS wherever mini_carousel() is used.
   App-specific context overrides (max-height, margins inside specific layouts)
   belong in the app's own CSS file. */

.mini-carousel {
    position: relative;
    width: 100%;
    background: #1e1e28;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
}

.mini-carousel-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
}

.mini-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.mini-carousel-empty {
    padding: 2rem;
    text-align: center;
    background: rgba(30, 30, 40, 0.6);
    border-radius: 4px;
}

.mini-carousel-empty p {
    color: rgba(200, 200, 200, 0.7);
    margin-bottom: 1rem;
}

.mini-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

.mini-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.mini-carousel-dots .dot.active {
    background: #fff;
    transform: scale(1.3);
}

.mini-carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Developer overlay labels and upload controls */
.carousel-dev-label {
    display: none;
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 20;
    background: rgba(0,0,0,0.78);
    color: #4fc3f7;
    font-family: monospace;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 3px;
    text-decoration: none;
    border: 1px solid rgba(79,195,247,0.35);
    white-space: nowrap;
}
.carousel-dev-label:hover { background: rgba(0,0,0,0.95); color: #81d4fa; }

body.dev-carousels .carousel-dev-label {
    display: block;
    color: #C1440E;
    border-color: rgba(193,68,14,0.45);
    background: rgba(0,0,0,0.82);
}
body.dev-carousels .carousel-dev-label:hover { color: #e05a20; }

.mini-carousel-empty-slot {
    display: none;
    width: 100%;
    aspect-ratio: 4/3;
    background: rgba(79,195,247,0.04);
    border: 2px dashed rgba(79,195,247,0.25);
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}
.mini-carousel-empty-slot .carousel-dev-label {
    position: static;
    display: block;
    font-size: 0.85rem;
    padding: 5px 14px;
}
.carousel-empty-hint {
    font-family: monospace;
    font-size: 0.7rem;
    color: rgba(79,195,247,0.4);
}
body.dev-carousels .mini-carousel-empty-slot {
    display: flex;
    border-color: rgba(193,68,14,0.35);
    background: rgba(193,68,14,0.04);
}
body.dev-carousels .carousel-empty-hint { color: rgba(193,68,14,0.45); }
body.dev-carousels .mini-carousel-empty-slot { cursor: pointer; }

.carousel-upload-btn {
    display: none;
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 20;
    background: rgba(193,68,14,0.85);
    color: white;
    font-family: monospace;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid rgba(193,68,14,0.6);
    cursor: pointer;
}
.carousel-upload-btn:hover { background: rgba(193,68,14,1); }
body.dev-carousels .carousel-upload-btn { display: block; }
.carousel-uploading { opacity: 0.6; pointer-events: none; }
.carousel-uploading .carousel-upload-btn { background: rgba(80,80,80,0.85); }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.lightbox-caption {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    white-space: nowrap;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    line-height: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    line-height: 1;
    padding: 0 16px;
}

.lightbox-nav.prev { left: 10px; }
.lightbox-nav.next { right: 10px; }

.lightbox-close:hover,
.lightbox-nav:hover {
    opacity: 1;
}
