/* ============================================================
   SKYN3T Carousel — Generic carousel framework
   ------------------------------------------------------------
   Used by any element with data-component="crm-carousel".
   Slides are registered via window.SKYN3TCarousel.register().
   ============================================================ */

/* Host — the eco3-mock placeholder. Override the parent .eco3-card
   16/10 aspect-ratio to 16/12 so the carousel gets ~20% more height
   (needed to fit the full dashboard panel content). Also force
   dimensions as a safety net: aspect-ratio alone doesn't always
   compute a height in a flex column context before JS hydrates. */
[data-component="crm-carousel"] {
    width: 100%;
    aspect-ratio: 16 / 12;
    min-height: 288px;
    display: block;
}

.skc-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 288px;
    overflow: hidden;
    background: #0d1117;
    isolation: isolate;
    /* Defensive reset: the carousel might be nested inside an <a>
       (on skyn3t.cl the CRM card is a link), so strip inherited
       text-decoration and give an explicit text color. */
    text-decoration: none;
    color: #c9d1d9;
}
.skc-carousel * { text-decoration: none; }

/* Track: layered slides (no horizontal translate — we fade). */
.skc-track {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-areas: "stack";
}

.skc-slide {
    grid-area: stack;
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--skc-transition, 500ms) cubic-bezier(.4, 0, .2, 1);
    will-change: opacity;
}

.skc-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.skc-slide.is-leaving {
    z-index: 1;
}

/* Inner wrapper for each mock — lets the mock use 100%/100% freely */
.skc-slot {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    color: #c9d1d9;
}

/* Dots indicator — bottom-center, above all slides */
.skc-dots {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    padding: 4px 8px;
    background: rgba(13, 17, 23, 0.55);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.skc-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: width 300ms cubic-bezier(.4, 0, .2, 1),
                background 300ms ease;
}

.skc-dot:hover {
    background: rgba(255, 255, 255, 0.45);
}

.skc-dot.is-active {
    width: 22px;
    background: #67c0f3;
    box-shadow: 0 0 8px rgba(103, 192, 243, 0.5);
}

/* Progress bar across the top of the carousel — optional visual
   feedback for how much time remains on the current slide. */
.skc-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    z-index: 5;
    overflow: hidden;
}

.skc-progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
        rgba(33, 153, 234, 0.4),
        #2199ea,
        rgba(33, 153, 234, 0.4));
    transform-origin: left;
    transition: width linear;
}

/* Reduced motion: no crossfade, no progress animation */
@media (prefers-reduced-motion: reduce) {
    .skc-slide { transition: none; }
    .skc-progress-bar { transition: none; }
    .skc-dot { transition: none; }
}
