/**
 * responsive.css — 響應式版面 media queries
 *
 * 三個斷點：
 * - Desktop ≥1200px：預設 resizable panels
 * - Tablet 768–1199px：堆疊佈局
 * - Mobile <768px：Tab bar + 全螢幕切換
 */

/* ── Tablet：768–1199px ── */
@media (min-width: 768px) and (max-width: 1199px) {
    /* 強制堆疊佈局：上方影片+波形，下方字幕+分段 */
    .app-layout-desktop {
        display: none !important;
    }
    .app-layout-tablet {
        display: flex !important;
        flex-direction: column;
    }
    .app-layout-tablet .panel-top {
        height: 50vh;
        min-height: 300px;
    }
    .app-layout-tablet .panel-bottom {
        height: 50vh;
        min-height: 200px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

/* ── Mobile：<768px ── */
@media (max-width: 767px) {
    .app-layout-desktop,
    .app-layout-tablet {
        display: none !important;
    }
    .app-layout-mobile {
        display: flex !important;
        flex-direction: column;
        height: 100vh;
    }

    /* Tab bar 底部導覽列 */
    .mobile-tab-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: white;
        border-top: 1px solid var(--c-skin, #E5D2C6);
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-tab-bar button {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 10px;
        font-weight: 700;
        color: var(--c-hipster, #887C71);
        border: none;
        background: none;
        cursor: pointer;
        min-height: 44px;
        min-width: 44px;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-tab-bar button.active {
        color: var(--c-norwegian, #936952);
    }

    .mobile-tab-bar button svg {
        width: 20px;
        height: 20px;
    }

    /* 全螢幕 Tab 面板 */
    .mobile-panel {
        flex: 1;
        overflow: hidden;
        padding-bottom: 56px; /* Tab bar 高度 */
    }

    /* 觸控友善的按鈕尺寸 */
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }

    /* Header bar 簡化 */
    .app-header {
        padding: 4px 8px;
    }
    .app-header h1 {
        font-size: 18px;
    }

    /* 工具列按鈕更大 */
    .waveform-toolbar button {
        min-height: 40px;
        min-width: 40px;
        padding: 8px;
    }
}

/* ── Desktop：≥1200px（預設，不需要特殊處理）── */
@media (min-width: 1200px) {
    .app-layout-tablet,
    .app-layout-mobile,
    .mobile-tab-bar {
        display: none !important;
    }
}

/* ── 通用：隱藏預設的 layout containers ── */
.app-layout-tablet,
.app-layout-mobile,
.mobile-tab-bar {
    display: none;
}
