/* ============================================================================
   Combined TTC + GO Mobile Page — Apple-style Segmented Control
   Iframe-based architecture: parent owns the pill, iframes own the maps
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0f1014;
    font-family: -apple-system, 'SF Pro Text', 'Inter', system-ui, sans-serif;
}

/* ---------- Map Iframes ---------- */
.map-frame {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.map-frame.active-frame {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}


/* ---------- Pill Overlay ---------- */
.pill-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: max(54px, calc(env(safe-area-inset-top) + 10px));
    z-index: 9999;
    pointer-events: none;
}


/* ---------- Segmented Control (Pill Toggle) ---------- */
.segmented-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(28, 28, 30, 0.82);
    border-radius: 22px;
    padding: 3px;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 0.5px 0 0 rgba(255, 255, 255, 0.06) inset,
        0 2px 8px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

/* Sliding indicator */
.segmented-indicator {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 0.5px 1px rgba(0, 0, 0, 0.12),
        0 0 0 0.5px rgba(255, 255, 255, 0.06) inset;
    transition: transform 0.32s cubic-bezier(0.4, 0.0, 0.2, 1.0);
    pointer-events: none;
    z-index: 0;
}

.segmented-indicator.pos-go {
    transform: translateX(100%);
}

/* Segment button */
.segment-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 22px;
    min-width: 82px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: color 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.segment-btn.active {
    color: #ffffff;
}

/* Color icons */
.segment-icon {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.segment-icon--ttc {
    background: #DA291C;
}

.segment-icon--go {
    background: #3B7D2F;
}

/* ---------- Pressed state ---------- */
.segment-btn:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* ---------- Haptic feedback hint (iOS) ---------- */
@supports (-webkit-touch-callout: none) {
    .segment-btn {
        -webkit-touch-callout: none;
    }
}

