/* Keep phone controls available in both portrait and touch landscape. */
body .ow_plugin_meet .meet-mobile-card,
body .ow_plugin_meet .meet-mobile-navigation { display: none; }
body .ow_plugin_meet .meet-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 768px), (max-width: 1024px) and (hover: none) and (pointer: coarse) {
    body .ow_plugin_meet {
        color: #fff;
        background: #101112;
        padding: 8px 0 20px;
        --meet-like-image: url("../img/style2/like_button.png");
        --meet-dislike-image: url("../img/style2/dislike_button.png");
    }
    body .ow_plugin_meet .wrap { padding: 0 12px; margin: 0; height: auto; }
    body .ow_plugin_meet #codemonsterSlide {
        width: 100%; max-width: 480px; height: auto; aspect-ratio: 360 / 590;
        margin: 0 auto; background: transparent;
    }
    body .ow_plugin_meet #codemonsterSlide > ul { height: 100%; list-style: none; padding: 0; }
    body .ow_plugin_meet #codemonsterSlide li {
        padding: 0; border: 1px solid #414243; border-radius: 14px;
        box-sizing: border-box; box-shadow: none; background: #000;
    }
    body .ow_plugin_meet #codemonsterSlide li .img {
        height: 100%; border-radius: 13px; margin: 0;
        background-size: cover; background-position: center top !important;
    }
    /* Match the native pane classes so their resting rotations cannot override
       this mobile reset. Inline gesture translation/rotation still wins.
       Keep photos and badges out of nested 3D layers. */
    body .ow_plugin_meet #codemonsterSlide li,
    body .ow_plugin_meet #codemonsterSlide li.pane1,
    body .ow_plugin_meet #codemonsterSlide li.pane2,
    body .ow_plugin_meet #codemonsterSlide li.pane3,
    body .ow_plugin_meet #codemonsterSlide li.pane4,
    body .ow_plugin_meet #codemonsterSlide li .img,
    body .ow_plugin_meet #codemonsterSlide li > .like,
    body .ow_plugin_meet #codemonsterSlide li > .dislike {
        -webkit-transform: none; transform: none;
        -webkit-transform-style: flat; transform-style: flat;
        -webkit-backface-visibility: visible; backface-visibility: visible;
    }
    body .ow_plugin_meet #codemonsterSlide li[data-meet-enhanced="true"] .slide_info,
    body .ow_plugin_meet #codemonsterSlide li[data-meet-enhanced="true"] .slide_card_data { display: none; }
    body .ow_plugin_meet #codemonsterSlide .meet-mobile-card {
        display: flex; flex-direction: column; justify-content: flex-end;
        position: absolute; inset: 0; box-sizing: border-box;
        color: #fff; text-align: left; pointer-events: none;
        background: linear-gradient(to top, #000 0%, #000 13%, rgba(0,0,0,.8) 29%, rgba(0,0,0,0) 59%);
        font: 600 14px/1.35 Arial, sans-serif;
    }
    body .ow_plugin_meet .meet-card-summary { padding: 12px 9px 0; }
    body .ow_plugin_meet .meet-card-title { display: flex; align-items: center; gap: 9px; }
    body .ow_plugin_meet .meet-card-name { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
    body .ow_plugin_meet .meet-card-presence {
        display: inline-block; flex: 0 0 7px; height: 7px; border-radius: 50%;
        background: #999; border: 1px solid #222;
    }
    body .ow_plugin_meet .meet-card-presence.is-online { background: #38d3a5; }
    body .ow_plugin_meet .meet-card-location { overflow-wrap: anywhere; }
    body .ow_plugin_meet .meet-card-identity { margin-top: 4px; }
    body .ow_plugin_meet .meet-card-favorites { margin-top: 5px; }
    body .ow_plugin_meet .meet-card-favorites-label { color: #ffe291; margin-bottom: 5px; }
    body .ow_plugin_meet .meet-card-pills { display: flex; flex-wrap: wrap; gap: 5px 4px; }
    body .ow_plugin_meet .meet-card-pill {
        display: inline-block; border: 1.5px solid #ffe291; border-radius: 20px;
        padding: 1px 7px; color: #fff; font-size: 11px; line-height: 20px;
        white-space: normal; max-width: 100%; overflow-wrap: anywhere;
        box-sizing: border-box; background: rgba(0,0,0,.15);
    }
    body .ow_plugin_meet .meet-card-favorites-more { margin-top: 5px; color: #c6c6c6; font-size: 11px; font-weight: 400; }
    body .ow_plugin_meet .meet-card-footer { flex-shrink: 0; padding: 3px 9px 14px; background: #000; }
    body .ow_plugin_meet .meet-card-link { pointer-events: auto; touch-action: manipulation; text-decoration: none; }
    body .ow_plugin_meet .meet-card-footer > .meet-card-link {
        display: flex; min-height: 40px; align-items: center; justify-content: center;
        color: #d49651; font-size: 14px; font-weight: 600;
    }
    body .ow_plugin_meet .meet-card-actions { display: flex; align-items: center; justify-content: center; gap: 10px; }
    body .ow_plugin_meet .meet-card-actions .meet-card-link {
        display: inline-flex; justify-content: center; align-items: center;
        min-width: 48px; min-height: 44px; padding: 0 8px; box-sizing: border-box;
        border: 2px solid #e30000; border-radius: 24px; background: #141414;
    }
    body .ow_plugin_meet .meet-card-action-icon { display: block; width: 26px; height: 26px; object-fit: contain; }
    body .ow_plugin_meet .meet-card-link:focus-visible,
    body .ow_plugin_meet .meet-mobile-navigation a:focus-visible,
    body .ow_plugin_meet .actions a:focus-visible { outline: 3px solid #ffe291; outline-offset: 3px; }
    body .ow_plugin_meet .actions { display: flex; width: min(100%, 320px); justify-content: space-around; margin: 0 auto; overflow: visible; }
    body .ow_plugin_meet .actions a {
        width: 60px; height: 60px; margin: 8px 0; border: 0 !important;
        background: #27282a; display: flex; align-items: center; justify-content: center;
        line-height: 1; box-shadow: none; float: none;
    }
    body .ow_plugin_meet .actions a:hover { background: #353638; }
    body .ow_plugin_meet .actions a i { display: block; width: 40px; height: 40px; margin: 0; background-size: contain; }
    body .ow_plugin_meet .actions a.like i { background-image: var(--meet-like-image); background-size: contain; }
    body .ow_plugin_meet .actions a.dislike i { background-image: var(--meet-dislike-image); background-size: contain; }
    body .ow_plugin_meet .meet_sex_bar { display: flex; justify-content: center; align-items: center; gap: 8px; color: #fff; padding: 7px 12px; }
    body .ow_plugin_meet .meet_sex_bar label { color: #fff; font-size: 17px; white-space: nowrap; }
    body .ow_plugin_meet #meet_sex_select {
        width: auto; flex: 1 1 auto; min-width: 0; max-width: 230px; min-height: 36px;
        padding: 4px 8px; border: 1px solid #36383d; border-radius: 0; background-color: #202226;
        color: #fff; font: 16px Arial, sans-serif;
    }
    body .ow_plugin_meet .meet-mobile-navigation { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 4px; }
    body .ow_plugin_meet .meet-mobile-navigation a { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: #27282a; }
    body .ow_plugin_meet .meet-mobile-navigation img { display: block; width: 48px; height: 48px; object-fit: contain; }
    body .ow_plugin_meet #status { color: #fff; }
}

@media (max-width: 359px) {
    body .ow_plugin_meet .wrap { padding: 0 7px; }
    body .ow_plugin_meet .meet-card-summary { padding-left: 7px; padding-right: 7px; }
    body .ow_plugin_meet .meet-card-pill { font-size: 11px; padding: 1px 7px; }
    body .ow_plugin_meet .meet_sex_bar { padding-left: 8px; padding-right: 8px; }
}

/* M2: the confirmed six-control row. Existing card actions stay separate. */
body .ow_plugin_meet .meet-control-panel .meet-nav-link,
body .ow_plugin_meet .meet-swipe-youtube { display: none; }
@media (max-width: 768px), (max-width: 1024px) and (hover: none) and (pointer: coarse) {
    body .ow_plugin_meet .meet-control-panel {
        display: flex; width: calc(100% - 20px); max-width: 440px;
        gap: clamp(4px, 1.2vw, 9px); margin: 12px auto 5px;
        align-items: center; justify-content: space-between;
    }
    body .ow_plugin_meet .meet-control-panel a,
    body .ow_plugin_meet .meet-control-panel a.meet-nav-link {
        display: inline-flex; align-items: center; justify-content: center;
        flex: 0 0 auto; width: clamp(38px, 10vw, 48px); height: clamp(38px, 10vw, 48px);
        box-sizing: border-box; margin: 0; padding: 8px; border: 1.5px solid #e8b04a !important;
        border-radius: 50%; background: #101112; position: relative;
    }
    body .ow_plugin_meet .meet-control-panel a.like,
    body .ow_plugin_meet .meet-control-panel a.meet-nav-home,
    body .ow_plugin_meet .meet-control-panel a.dislike {
        width: clamp(48px, 13vw, 66px); height: clamp(48px, 13vw, 66px);
        border: 2.5px solid #fff !important;
    }
    body .ow_plugin_meet .meet-control-panel a[aria-disabled="true"] { opacity: .45; }
    body .ow_plugin_meet .meet-control-panel a:hover { background: #202226; }
    body .ow_plugin_meet .meet-control-panel img { display: block; width: 24px; height: 24px; object-fit: contain; }
    body .ow_plugin_meet .meet-control-panel a i { width: 32px; height: 32px; background-repeat: no-repeat; background-position: center; }
    body .ow_plugin_meet .meet-unread-count {
        position: absolute; top: -6px; right: -5px; min-width: 17px; padding: 2px;
        border-radius: 12px; background: #df2929; color: #fff; border: 1px solid #101112;
        font: 700 11px/17px Arial, sans-serif; text-align: center;
    }
    body .ow_plugin_meet .meet-unread-count[hidden] { display: none; }
    body .ow_plugin_meet .meet-swipe-youtube { display: flex; width: calc(100% - 24px); max-width: 480px; margin: 0 auto 10px; box-sizing: border-box; }
    body .ow_plugin_meet .meet-search-status:not(.meet-sr-only) { margin: 4px 12px 10px; color: #fff; font-size: 14px; }
}

/* The standalone mobile Swipe page owns its toolbar and available height.
   Embedded cards and profile drawers retain their existing page headers. */
@media (max-width: 768px), (max-width: 1024px) and (hover: none) and (pointer: coarse) {
    body.byron-meet-page,
    body.byron-meet-page #main,
    body.byron-meet-page #content { background: #101112; }
    body.byron-meet-page #main > #header { display: none; }
    body.byron-meet-page #main > #content { padding-top: 0; margin-top: 0; }
    body .ow_plugin_meet #codemonsterSlide { touch-action: pan-y pinch-zoom; }
    body.byron-meet-page .ow_plugin_meet #codemonsterSlide {
        /* Reserve space for search, navigation and the user-type selector.
           Short landscape windows remain scrollable rather than crushing text. */
        height: clamp(340px, calc(100vh - 198px), 660px);
        height: clamp(340px, calc(100svh - 198px), 660px);
        aspect-ratio: auto;
    }
}

/* Home replaces the visible mobile Dislike control; left-swipe still skips.
   The original desktop Dislike control and its handler remain available. */
@media (max-width: 768px), (max-width: 1024px) and (hover: none) and (pointer: coarse) {
    body .ow_plugin_meet .meet-control-panel a.meet-desktop-dislike { display: none; }
    body .ow_plugin_meet .meet-control-panel a.meet-nav-home i {
        background-image: var(--meet-home-image, url("../img/card/black_bottom_btn3.png"));
        background-size: contain;
    }
}
