/* IceColdSky — Team Carousel */

:root {
    --team-size: clamp(90px, 16vw, 170px);
}

.ics-team-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
}

.ics-team-carousel-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

.ics-team-carousel {
    /* Actual room left in the card, after nav + shader panel + gaps */
    --available-w: calc(100vw - 80px - var(--ics-panel-width, 50vw) - 64px);

    /* Item size derived from that real available width (divided by the
       same 2.8 the stage uses), not from raw viewport width — so it
       actually tracks the card, not the whole screen. Floor/ceiling
       keep it from ever getting illegibly small or oversized. */
    --team-size: clamp(64px, calc(var(--available-w) / 2.8), 120px);

    width: min(calc(var(--team-size) * 2.8), var(--available-w));
    height: calc(var(--team-size) + 16px);
    max-width: 100%;

    perspective: calc(var(--team-size) * 6);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}

.ics-team-ring {
    position: relative;
    width: var(--team-size);
    height: var(--team-size);
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: transform 0.8s ease-in-out;
    cursor: grab;
}

.ics-team-ring.ics-team-dragging {
    transition: none;
    cursor: grabbing;
}

.ics-team-item {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--team-size);
    height: var(--team-size);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);

    /* --item-angle is injected per-item from PHP (0deg, 60deg, 120deg...);
       the radius (translateZ) uses --team-size directly, so resizing the
       viewport reflows the whole ring with no JS involved. */
    transform: rotateY(var(--item-angle)) translateZ(var(--team-size));

    /* Deliberately NOT setting backface-visibility: hidden. With it on,
       the two side-most items (past ~90° rotation) disappear instead of
       showing their reversed face through the gaps — that's what was
       cutting 5 visible cards down to 3. Leaving the default (visible)
       matches the original. */
}

.ics-team-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

/* Subtle, non-hiding highlight on the front card only — doesn't dim or
   hide any other card. Delete this rule entirely for zero visual
   differentiation, matching the original 1:1 (it never styled .active). */
.ics-team-item-active {
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 2px rgba(255,255,255,0.35);
}

.ics-team-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 16px;
}

.ics-team-btn-prev,
.ics-team-btn-next,
.ics-team-btn-playpause {
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    transition: color 0.2s ease, border-color 0.2s ease;

    box-sizing: border-box;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.ics-team-btn-prev,
.ics-team-btn-next {
    font-size: 20px;
    line-height: 34px;
}

.ics-team-btn-prev:hover,
.ics-team-btn-next:hover,
.ics-team-btn-playpause:hover {
    color: rgba(255,255,255,0.95);
    border-color: rgba(255,255,255,0.55);
}

.ics-team-btn-playpause svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
    vertical-align: middle;
    margin: auto;
}

.ics-team-info {
    min-height: 42px;
    align-self: center;
}

.ics-team-name {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-style: italic;
    color: rgba(255,255,255,0.92);
    text-align: center;
}

.ics-team-role {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}