/* Układ tylko na wąski ekran. Ładowany na końcu, żeby wygrał z resztą stylów. */

@media (min-width: 1024px) {
    .phone-fold-btn { display: none !important; }
}

@media (max-width: 1023px) {
    main {
        overflow: auto !important;
    }

    .view-section.pane-view:not(.hidden),
    .view-section.view-fill:not(.hidden) {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        flex: none !important;
    }

    .pane-grid {
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
        height: auto !important;
        flex: none !important;
        min-height: 0 !important;
    }

    .app-pane {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        flex: none !important;
        min-height: 0 !important;
    }

    .app-pane-body {
        flex: none !important;
        min-height: 0 !important;
        max-height: 42vh !important;
        overflow: auto !important;
    }

    .app-pane.is-folded .app-pane-body,
    .app-pane.is-folded > .flex-shrink-0 {
        display: none !important;
    }

    .phone-fold-btn {
        display: inline-flex;
        align-items: center;
        background: #1e293b;
        border: 1px solid #334155;
        color: #e2e8f0;
        font-size: 0.72rem;
        font-weight: 800;
        border-radius: 0.6rem;
        padding: 0.35rem 0.6rem;
        white-space: nowrap;
    }

    #view-champions .pane-grid > .app-pane:last-child .app-pane-body {
        max-height: none !important;
        overflow: visible !important;
    }

    #view-player-analysis .pane-grid > .app-pane:last-child .app-pane-body,
    #view-teams .pane-grid > .app-pane:nth-child(2) .app-pane-body {
        max-height: none !important;
        overflow: visible !important;
    }

    #view-draft {
        overflow: visible !important;
        height: auto !important;
    }

    #view-draft .draft-top {
        flex-direction: column;
        align-items: stretch;
    }

    #view-draft .draft-top .max-w-2xl,
    #view-draft .draft-top .flex-1 {
        max-width: 100%;
        width: 100%;
    }

    #view-draft .draft-stage {
        flex-direction: column !important;
        overflow: visible !important;
        height: auto !important;
        flex: none !important;
    }

    #view-draft .draft-side-col {
        width: 100% !important;
        max-width: 100%;
        order: 2;
    }

    #view-draft .draft-side-col.is-red { order: 1; }
    #view-draft .draft-side-col.is-blue { order: 2; }
    #view-draft .draft-center {
        order: 3;
        overflow: visible !important;
        width: 100%;
        flex: none !important;
    }

    #view-draft .draft-side-col > .bg-slate-900 {
        overflow: visible !important;
    }

    #blue-picks-container,
    #red-picks-container {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.35rem;
    }

    #blue-bans-container,
    #red-bans-container {
        height: auto !important;
        flex-wrap: wrap;
        justify-content: flex-start !important;
    }

    #view-draft .draft-champ-window {
        min-height: 33rem;
        max-height: none;
        flex: none;
    }

    #view-draft .draft-champ-window .overflow-y-auto {
        max-height: 42rem;
    }

    #view-draft .draft-analysis-split {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    #view-draft .draft-side-body {
        max-height: none;
        overflow: visible;
    }
}
