/* Sliding selection pill (js/studio/core/seg-slider.js) for .cc-seg rows and the studio tabs.
   The thumb draws the selected state, so the option buttons themselves stay transparent. */
.seg-slide {
    position: relative;
    isolation: isolate;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}
.seg-slide > .cc-seg-btn,
.seg-slide > .studio-tab-btn {
    position: relative;
    z-index: 1;
}
.seg-slide > .cc-seg-btn.active,
.seg-slide > .studio-tab-btn.active {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
.seg-slide > .cc-seg-btn:hover:not(:disabled):not(.active),
.seg-slide > .studio-tab-btn:hover:not(.active) {
    background: transparent;
}

.seg-thumb {
    --seg-l: 0;
    --seg-r: 0;
    --seg-edge: 5px;
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: 9px;
    background: var(--surface-3);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.6), 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 14px rgba(96, 165, 250, 0.14);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), width 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s;
    will-change: transform;
}
.studio-nav-tabs .seg-thumb {
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--accent), 0 4px 16px rgba(0, 0, 0, 0.28);
}
.seg-thumb.seg-thumb-snap,
.seg-thumb.seg-thumb-drag { transition: none; }
.seg-thumb.seg-thumb-drag {
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.85), 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 18px rgba(96, 165, 250, 0.22);
}

/* Edge lines: show which way the pill can move; opacity is set from its distance to each end. */
.seg-thumb::before,
.seg-thumb::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 2px;
    height: 42%;
    transform: translateY(-50%);
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.55);
}
.seg-thumb::before { left: var(--seg-edge); opacity: var(--seg-l); }
.seg-thumb::after { right: var(--seg-edge); opacity: var(--seg-r); }
.seg-thumb.seg-thumb-drag::before,
.seg-thumb.seg-thumb-drag::after { background: rgba(147, 197, 253, 0.9); }

/* Integration option (FanDuel / Kalshi): name centred, a handle bar resting --seg-edge above the
   bottom edge. While the integration sheet is open, the name lifts and the bar settles under it. */
.int-btn .int-label {
    display: block;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.int-btn .int-bar {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 14px;
    height: 3px;
    margin-left: -7px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.5);
    transition: bottom 0.3s cubic-bezier(0.22, 1, 0.36, 1), width 0.3s cubic-bezier(0.22, 1, 0.36, 1), margin-left 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s;
}
.int-btn.has-choices .int-bar { display: block; }
.int-btn:not(.active) .int-bar { opacity: 0.55; }
.int-btn[aria-expanded="true"] .int-label { transform: translateY(-6px); }
.int-btn[aria-expanded="true"] .int-bar { bottom: 14px; width: 24px; margin-left: -12px; background: var(--accent); }

/* Integration bottom sheet */
.int-sheet-wrap {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(3, 6, 12, 0);
    pointer-events: none;
    transition: background 0.3s;
}
.int-sheet-wrap.open {
    background: rgba(3, 6, 12, 0.3);
    pointer-events: auto;
}
.int-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(480px, 100%);
    padding: 8px 10px max(18px, env(safe-area-inset-bottom));
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, 105%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.int-sheet-wrap.open .int-sheet { transform: translate(-50%, 0); }
.int-sheet-grab {
    width: 36px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.35);
}
.int-sheet-title {
    margin: 0 4px 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}
.int-sheet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.int-sheet-item:hover,
.int-sheet-item:focus-visible { background: var(--surface-2); outline: none; }
.int-sheet-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.int-sheet-kind { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-dim); }
.int-sheet-check { width: 16px; height: 16px; color: var(--accent); visibility: hidden; }
.int-sheet-item[aria-checked="true"] .int-sheet-check { visibility: visible; }

@media (prefers-reduced-motion: reduce) {
    .seg-thumb,
    .int-btn .int-label,
    .int-btn .int-bar,
    .int-sheet,
    .int-sheet-wrap { transition: none; }
}
