/* ══════════════════════════════════════════════════════════════
   INDICATOR RESPONSIVE
   All responsive rules for indicators, oscillator pane, and
   indicator panel. Consolidated from mobile/responsive.css
   so they live in one authoritative file.
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet (768px – 1023px) ── */

/* ── Small tablet / large mobile (480px – 767px) ── */
@media (min-width: 480px) and (max-width: 767px) {
    .topbar-group-primary #indicatorBtn,
    .topbar-group-primary #alertBtn {
        flex-shrink: 0;
        height: 36px;
        display: flex;
        align-items: center;
    }
}

/* ── Mobile layout rules (extracted from style.css) ── */

/* ── Mobile (< 768px) ── */
@media (max-width: 767px) {

    /* ── Compact search bar ── */
    #indicators-panel .ind-search-wrap {
        padding: 6px 10px 4px;
    }
    #indicators-panel .ind-search-input {
        padding: 5px 8px 5px 22px;
        font-size: 12px;
    }
    #indicators-panel .ind-search-icon {
        left: 15px;
        font-size: 10px;
    }
    #indicators-panel .ind-section-header {
        padding: 4px 10px 3px;
    }

    /* ── Indicator items: taller touch targets on mobile ── */
    .ind-item,
    .ind-search-result {
        padding: 8px 10px;
        gap: 8px;
        min-height: 44px;
        align-items: center;
    }
    .ind-item .ind-item-info,
    .ind-search-result .ind-item-info {
        flex: 1;
        min-width: 0;
    }

    /* Applied strip stays same */

    /* Scrollable list takes remaining space */
    #indicators-panel .ind-item-list {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Search results also scrollable */
    #indicators-panel .ind-search-results {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* ── Settings popup: mobile-friendly sizing ── */
    .ind-popup-overlay {
        z-index: 9300;
        padding: 8px;
        align-items: flex-end;
    }

    .ind-popup-box {
        width: 100%;
        max-width: 100%;
        max-height: calc(85vh - env(safe-area-inset-bottom, 0px));
        border-radius: 12px 12px 0 0;
        animation: tv-popup-slide-up 0.2s ease;
    }
    @keyframes tv-popup-slide-up {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    .ind-popup-box .ind-tab-pane {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .ind-popup-footer-bar {
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        flex-wrap: wrap;
        gap: 6px;
    }
    .ind-footer-cancel,
    .ind-footer-ok {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    /* Levels layout stacks vertically */
    .ind-levels-layout {
        flex-direction: column;
    }

    /* Form fields stack on narrow screens */
    .ind-form-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .ind-form-field {
        min-width: 0;
    }
}

