/* app-tablet.css — tablet & desktop (min-width) breakpoints.
   Split out of app.css. LOAD ORDER MATTERS: app.css -> app-tablet.css ->
   app-phone.css, so phone-landscape rules override the tablet ones. */

@media (min-width: 768px) {
    .toast {
        font-size: 21px;
    }

    .ch-fox-bug {
        width: 55vw;
    }

    .ch-top-bar {
        height: 58px;
    }

    .ch-logo-ring {
        width: 48px;
        height: 48px;
        padding: 3px;
    }

    .ch-team-logo {
        width: 40px;
        height: 40px;
    }

    .ch-team-abbr {
        font-size: 1.4rem;
    }

    .ch-team-wp {
        font-size: 11px;
    }

    .ch-momentum-bar {
        display: block;
        height: 4px;
    }

    .ch-score-area {
        gap: 10px;
        padding: 0 14px;
        margin: 6px 0;
    }

    .ch-score-sec {
        min-width: 42px;
    }

    .ch-vs-divider {
        font-size: 12px;
    }

    .ch-score-val {
        font-size: 38px;
    }

    .ch-bottom-bar {
        height: 36px;
        font-size: 15px;
        padding: 0 16px;
    }

    .ch-quarter-pill {
        padding: 3px 12px;
        font-size: 13px;
    }

    .ch-playclock-ring {
        width: 32px;
        height: 32px;
    }

    #chPlayClock {
        font-size: 11px;
    }

    .ch-down-pill {
        padding: 3px 14px;
        font-size: 14px;
    }

    .ch-down-num {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .ch-to-dot {
        width: 4px;
        height: 12px;
    }

    .ch-audibles {
        gap: 3px;
    }

    .replay-pill,
    .highlight-pill {
        bottom: 18% !important;
    }

    /* Bigger on tablet — matches the instant-replay pill's presence. */
    .highlight-pill {
        font-size: 22px;
        padding: 8px 26px;
        letter-spacing: 2.5px;
    }

    .ch-controls {
        gap: 1.2rem;
    }
}


@media (min-width: 768px) {
    .app-logo {
        width: 25vw;
    }

    .app-subtitle {
        font-size: 1.2rem;
    }

    /* Tablet: wider viewport than a phone, so a smaller share is still plenty.
       (Desktop steps down again in the 1024px block below.) */
    .home-buttons {
        min-width: 50vw;
    }
}

@media (min-width: 1024px) {
    .app-logo {
        width: 10vw;
    }

    .app-title {
        font-size: 3rem;
    }

    .app-subtitle {
        font-size: 1.5rem;
    }

    /* Desktop: the viewport is wide, so a much smaller share still reads big. */
    .home-buttons {
        min-width: 30vw;
    }

    /* Make home buttons twice as large on desktop */
    .home-buttons .btn {
        font-size: 24px !important;
    }

    .home-buttons .btn-subtitle {
        font-size: 18px !important;
    }

    .home-buttons .team-picker-btn {
        font-size: 24px !important;
    }

    .ch-fox-bug {
        width: 30vw;
    }
}

@media (min-width: 768px) {
    .matchup-splash {
        gap: 40px;
    }

    .matchup-main {
        gap: 40px;
    }

    .matchup-logo {
        width: 150px;
        height: 150px;
    }

    .matchup-name {
        font-size: 30px;
    }

    .matchup-vs {
        font-size: 64px;
    }

    .matchup-score {
        font-size: 86px;
    }
}

@media (min-width: 1024px) {
    .matchup-logo {
        width: 190px;
        height: 190px;
    }

    .matchup-name {
        font-size: 38px;
    }

    .matchup-vs {
        font-size: 84px;
    }

    .matchup-score {
        font-size: 112px;
    }
}

@media (min-width: 768px) {

    /* Expand general buttons and typography */
    .btn {
        font-size: 18px;
        padding: 14px 24px;
        border-radius: 12px;
    }

    .btn-big {
        font-size: 28px;
        padding: 18px 0;
        width: 380px;
    }

    .btn-subtitle {
        font-size: 12px;
    }

    .btn-small {
        font-size: 16px;
        padding: 10px 18px;
    }

    .team-dropdown {
        width: 380px;
        height: 52px;
        font-size: 18px;
    }

    .team-picker-card {
        padding: 8px 12px;
    }

    .team-picker-logo {
        width: 52px;
        height: 52px;
    }

    .team-picker-label {
        font-size: 18px;
    }

    .team-picker-ratings {
        font-size: 13px;
    }

    .team-picker-chevron {
        width: 36px;
        height: 36px;
    }

    .tp-logo {
        width: 36px;
        height: 36px;
    }

    .tp-name {
        font-size: 15px;
    }

    .tp-rating {
        font-size: 12px;
    }






    .play-select {
        height: 48px;
        font-size: 16px;
        padding: 0 12px;
        border-radius: 10px;
    }

    /* Wider screens: grid of play cards, capped at 3 per row so 4th-down
       layouts (3 plays + Punt + FG) wrap instead of squeezing into one row. */
    .chooser-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: min(95vw, 820px);
        gap: 16px;
        justify-content: center;
    }

    .play-card {
        padding: 16px 20px;
        gap: 8px;
        min-height: 120px;
        justify-content: space-between;
    }

    .play-card .card-name {
        font-size: 18px;
    }

    .play-card .card-desc {
        font-size: 14px;
        line-height: 1.4;
    }

    .badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .chooser-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    /* Wider header so the situation strip and hint fit whole at tablet font
       sizes (the base 400px is phone-sized). Segments may wrap, never clip. */
    .chooser-header {
        width: min(92vw, 560px);
    }

    .chooser-downdist {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 2px;
    }

    .chooser-hint {
        white-space: normal;
        font-size: 15px;
    }

    /* Center align screens on desktop for a cleaner frame */
    .screen-home {
        gap: 8dvh;
    }

    .plays-info {
        font-size: 20px;
    }

}

@media (min-width: 1024px) {}

/* ---- Desktop: scale up the play chooser + cards. Placed AFTER the
   min-width:768px tablet block above, so these win on desktop (≥1367px) while
   tablets keep the smaller sizes. app-phone.css only targets small/landscape
   viewports, so it never overrides these. ---- */
@media (min-width: 1367px) {

    .team-picker-logo {
        width: 52px;
        height: 52px;
    }

    /* Bigger again on desktop. */
    .highlight-pill {
        font-size: 28px;
        padding: 10px 32px;
        letter-spacing: 3px;
    }

    .feed-toggle {
        font-size: 20px;
    }

    .chooser-title {
        font-size: 28px;
    }

    .chooser-header {
        width: 550px;
    }

    .chooser-exit svg {
        width: 32px;
        height: 32px;
    }

    .chooser-reroll {
        font-size: 16px;
    }

    .card-formation {
        font-size: 14px;
    }

    .play-card .card-name {
        font-size: 22px;
    }

    .play-card .card-desc {
        font-size: 18px;
    }

    .badge {
        font-size: 16px;
    }

    .chooser-cards {
        width: 1000px;
    }
}

/* Tablet portrait: shorter team-picker dropdown so it doesn't dominate. */
@media (min-width: 768px) and (orientation: portrait) {
    .team-picker-panel {
        max-height: 35vh !important;
    }
}

@media (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
    .screen-home {
        gap: 4dvh;
    }


    /* Lessen home button sizes to fit shorter tablet viewports */
    .home-buttons .btn {
        font-size: 13px !important;
        padding: 8px 4px !important;
    }

    .home-buttons .btn-subtitle {
        font-size: 9px !important;
    }

    .home-buttons .team-picker-btn {
        font-size: 14px !important;
        height: 38px !important;
        line-height: 38px !important;
    }

    .ch-fox-bug {
        width: 45vw !important;
    }

    .ch-top-bar {
        height: 54px !important;
    }

    .ch-logo-ring {
        width: 44px !important;
        height: 44px !important;
        padding: 3px !important;
    }

    .ch-team-logo {
        width: 36px !important;
        height: 36px !important;
    }

    .ch-team-abbr {
        font-size: 1.4rem !important;
    }

    .ch-team-wp {
        font-size: 11px !important;
    }

    .ch-momentum-bar {
        display: block !important;
        height: 4px !important;
    }

    .ch-score-area {
        gap: 8px !important;
        padding: 0 12px !important;
        margin: 5px 0 !important;
    }

    .ch-score-sec {
        min-width: 38px !important;
    }

    .ch-score-val {
        font-size: 32px !important;
    }

    .ch-bottom-bar {
        height: 34px !important;
        font-size: 14px !important;
        padding: 0 14px !important;
    }

    .ch-quarter-pill {
        padding: 2px 10px !important;
        font-size: 12px !important;
    }

    .ch-playclock-ring {
        width: 28px !important;
        height: 28px !important;
    }

    #chPlayClock {
        font-size: 10px !important;
    }

    .ch-down-pill {
        padding: 2px 12px !important;
        font-size: 13px !important;
    }

    .ch-down-num {
        width: 20px !important;
        height: 20px !important;
        font-size: 11px !important;
    }

    .ch-to-dot {
        width: 4px !important;
        height: 10px !important;
    }

    .ch-audibles {
        gap: 3px !important;
    }

    /* Scale down bottom corner clusters on tablet landscape (the containers
       own the positioning; items just shrink). */
    .corner-left {
        left: calc(12px + env(safe-area-inset-left)) !important;
        bottom: calc(4px + env(safe-area-inset-bottom)) !important;
        gap: 14px !important;
    }

    .corner-right {
        right: calc(12px + env(safe-area-inset-right)) !important;
        bottom: calc(4px + env(safe-area-inset-bottom)) !important;
        gap: 5px !important;
    }

    .app-version,
    .privacy-link,
    .howto-link {
        font-size: 12px !important;
        height: 36px !important;
    }

    .share-site,
    .corner-icon {
        width: 36px !important;
        height: 36px !important;
    }

    .share-site svg,
    .corner-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Scale down top-right elements (username badge & friend icon) on tablet landscape */
    #acctTopRight {
        top: calc(8px + env(safe-area-inset-top)) !important;
        right: calc(12px + env(safe-area-inset-right)) !important;
        gap: 6px !important;
    }

    #friendBadge {
        width: 36px !important;
        height: 36px !important;
        position: relative !important;
    }

    #friendBadge svg {
        width: 18px !important;
        height: 18px !important;
    }

    .friend-badge-count {
        font-size: 11px !important;
        min-width: 18px !important;
        height: 18px !important;
        border-radius: 9px !important;
        top: -3px !important;
        right: -3px !important;
        border-width: 1.5px !important;
    }

    #acctBadge {
        font-size: 16px !important;
        padding: 6px 12px !important;        
    }
}

@media (min-width: 1024px) {
    .ch-fox-bug {
        width: 32vw;
    }

    .ch-top-bar {
        height: 70px;
    }

    .ch-logo-ring {
        width: 56px;
        height: 56px;
        padding: 3px;
    }

    .ch-team-logo {
        width: 48px;
        height: 48px;
    }

    .ch-team-abbr {
        font-size: 1.6rem;
    }

    .ch-team-wp {
        font-size: 12px;
    }

    .ch-momentum-bar {
        display: block;
        height: 5px;
    }

    .ch-score-area {
        gap: 12px;
        padding: 0 18px;
        margin: 8px 0;
    }

    .ch-score-sec {
        min-width: 52px;
    }

    .ch-score-val {
        font-size: 48px;
    }

    .ch-bottom-bar {
        height: 42px;
        font-size: 16px;
        padding: 0 20px;
    }

    .ch-quarter-pill {
        padding: 4px 14px;
        font-size: 14px;
    }

    .ch-playclock-ring {
        width: 36px;
        height: 36px;
    }

    #chPlayClock {
        font-size: 12px;
    }

    .ch-down-pill {
        padding: 4px 16px;
        font-size: 15px;
    }

    .ch-down-num {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .ch-to-dot {
        width: 4px;
        height: 14px;
    }

    .ch-audibles {
        gap: 4px;
    }
}

/* Bottom corner clusters (version/privacy/how-to left; feedback/leaderboard/
   share right) — scale up on bigger screens; containers own the positions. */
@media (min-width: 768px) {
    .corner-left {
        left: calc(16px + env(safe-area-inset-left));
        gap: 20px;
    }

    .corner-right {
        right: calc(16px + env(safe-area-inset-right));
        gap: 8px;
    }

    .app-version,
    .privacy-link,
    .howto-link {
        font-size: 14px;
        height: 48px;
    }

    .share-site,
    .corner-icon {
        width: 48px;
        height: 48px;
    }

    .share-site svg,
    .corner-icon svg {
        width: 24px;
        height: 24px;
    }
}

@media (min-width: 1024px) {
    .corner-left {
        left: calc(20px + env(safe-area-inset-left));
        gap: 24px;
    }

    .corner-right {
        right: calc(20px + env(safe-area-inset-right));
        gap: 10px;
    }

    .app-version,
    .privacy-link,
    .howto-link {
        font-size: 18px;
        height: 56px;
    }

    .share-site,
    .corner-icon {
        width: 56px;
        height: 56px;
    }

    .share-site svg,
    .corner-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* iPad Pro portrait (1024×1366): the min-width:1024 scorebug widths above
   (30-32vw) are sized for LANDSCAPE/desktop screens — on a portrait tablet
   that's a sliver. Keep the tablet-portrait proportion instead. Placed last
   so it wins the cascade over the 1024 blocks. */
@media (min-width: 1024px) and (orientation: portrait) {
    .ch-fox-bug {
        width: 55vw;
    }
}

/* PvP matchup banner text: phone 30/15 (app.css base), tablet 40/20, desktop 50/25. */
@media (min-width: 768px) {
    .banner-text.matchup .mu-label {
        font-size: 40px;
    }

    .banner-text.matchup .mu-play {
        font-size: 20px;
    }
}

@media (min-width: 1367px) {
    .banner-text.matchup .mu-label {
        font-size: 50px;
    }

    .banner-text.matchup .mu-play {
        font-size: 25px;
    }
}
