/**
 * Vexstorm Media Carousel Box — Styles
 * Supports mixed image/video/text cards, configurable navigation,
 * box + carousel borders, backgrounds, entrance animations, and role gating.
 *
 * Copyright 2026 Vexstorm Studios
 * Christopher Andrzejewski
 */

/* ================================================================
   Outer Box Container
   ================================================================ */
.vex-mcb {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    clear: both;
    z-index: 1;
}

/* ================================================================
   Header / Footer Text Areas
   ================================================================ */
.vex-mcb-header,
.vex-mcb-footer {
    box-sizing: border-box;
    line-height: 1.5;
}

.vex-mcb-header {
    padding-bottom: 8px;
}

.vex-mcb-footer {
    padding-top: 8px;
}

/* ================================================================
   Inner Carousel Area
   ================================================================ */
.vex-mcb-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.vex-mcb-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* ================================================================
   Cards
   ================================================================ */
.vex-mcb-card {
    flex: 0 0 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.vex-mcb-card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Card content types */
.vex-mcb-card-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.vex-mcb-card-video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

iframe.vex-mcb-card-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.vex-mcb-card-text {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fade transition mode */
.vex-mcb[data-transition="fade"] .vex-mcb-track {
    display: block;
    position: relative;
    transition: none;
}

.vex-mcb[data-transition="fade"] .vex-mcb-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    pointer-events: none;
}

.vex-mcb[data-transition="fade"] .vex-mcb-card.vex-mcb-card-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ================================================================
   Arrow Navigation
   ================================================================ */
.vex-mcb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 0;
}

.vex-mcb-arrow:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: translateY(-50%) scale(1.1);
}

.vex-mcb-arrow-left {
    left: 10px;
}

.vex-mcb-arrow-right {
    right: 10px;
}

.vex-mcb-arrow svg {
    display: block;
    transition: stroke 0.2s ease;
}

/* ================================================================
   Dot Indicators
   ================================================================ */
.vex-mcb-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 4px;
}

.vex-mcb-dot {
    width: var(--vex-mcb-dot-size, 10px);
    height: var(--vex-mcb-dot-size, 10px);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--vex-mcb-dot-inactive, #555555);
    transition: background 0.25s ease, transform 0.25s ease;
    padding: 0;
}

.vex-mcb-dot:hover {
    transform: scale(1.25);
}

.vex-mcb-dot.vex-mcb-dot-active {
    background: var(--vex-mcb-dot-active, #4dbfcd);
}

/* ================================================================
   Role-Gated Alternate Content
   ================================================================ */
.vex-mcb-role-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 24px;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
    color: #999;
}

.vex-mcb-role-gate img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ================================================================
   Entrance Animations
   ================================================================ */
.vex-mcb-entrance-hidden {
    opacity: 0;
    visibility: hidden;
}

.vex-mcb-enter-fade-in {
    animation: vexMcbFadeIn 0.7s ease forwards;
}
.vex-mcb-enter-slide-up {
    animation: vexMcbSlideUp 0.7s ease-out forwards;
}
.vex-mcb-enter-zoom-in {
    animation: vexMcbZoomIn 0.6s ease-out forwards;
}

@keyframes vexMcbFadeIn {
    from { opacity: 0; } to { opacity: 1; visibility: visible; }
}
@keyframes vexMcbSlideUp {
    from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); visibility: visible; }
}
@keyframes vexMcbZoomIn {
    from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); visibility: visible; }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 768px) {
    .vex-mcb-carousel {
        max-height: 55vh;
    }
    .vex-mcb-card-image,
    .vex-mcb-card-video {
        max-height: 55vh;
        object-fit: cover;
    }
    .vex-mcb-arrow {
        padding: 6px;
    }
    .vex-mcb-arrow-left { left: 6px; }
    .vex-mcb-arrow-right { right: 6px; }
    .vex-mcb-card-text {
        padding: 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .vex-mcb-carousel {
        max-height: 45vh;
    }
    .vex-mcb-card-image,
    .vex-mcb-card-video {
        max-height: 45vh;
    }
    .vex-mcb-arrow {
        padding: 4px;
    }
    .vex-mcb-arrow svg {
        width: 20px;
        height: 20px;
    }
    .vex-mcb-card-text {
        padding: 10px;
        font-size: 13px;
    }
}
