/* The long-press sheet is a page overlay, but reels-sheet-v3.css declares an unscoped
   `.mtv-sheet` block for the player's comments sheet and is linked after post-sheet-v1.css on
   every page that renders the player. That made the long-press sheet `position:absolute` again,
   so a press after scrolling opened a menu thousands of pixels above the viewport. These
   selectors only match the root the long-press script builds, so the player's sheet keeps the
   rules it was written for. */

.mtv-sheet[aria-label="Post actions"] {
    position: fixed;
    inset: 0;
    z-index: 4400;
    align-items: flex-end;
    background: rgba(5, 12, 20, .45);
    opacity: 0;
    transition: opacity .18s ease;
}
.mtv-sheet[aria-label="Post actions"].is-open { opacity: 1; }

.mtv-sheet[aria-label="Post actions"] .mtv-sheet__panel {
    display: block;
    overflow-y: auto;
    max-width: 520px;
    max-height: 88vh;
    padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 10px);
    border-radius: 22px 22px 0 0;
    background: #fff;
    color: var(--mtv-navy, #004574);
    box-shadow: 0 -18px 60px rgba(9, 34, 56, .22);
    transform: translate3d(0, 100%, 0);
    transition: transform .28s cubic-bezier(.22, .68, 0, 1);
}
.mtv-sheet[aria-label="Post actions"].is-open .mtv-sheet__panel { transform: none; }
.mtv-sheet[aria-label="Post actions"].is-dragging .mtv-sheet__panel { transition: none; }

.mtv-sheet[aria-label="Post actions"] .mtv-sheet__grip {
    width: 38px;
    margin: 8px auto 6px;
    background: rgba(0, 69, 116, .18);
}

.mtv-sheet[aria-label="Post actions"] .mtv-sheet__row {
    gap: 14px;
    padding: 14px 22px;
    color: var(--mtv-navy, #004574);
}
.mtv-sheet[aria-label="Post actions"] .mtv-sheet__row--danger { color: var(--mtv-magenta, #d81e5b); }
.mtv-sheet[aria-label="Post actions"] .mtv-sheet__row--muted { color: rgba(0, 69, 116, .62); }

.mtv-sheet[aria-label="Post actions"] .mtv-sheet__send {
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--mtv-magenta, #d81e5b);
    font: 700 15px/1.2 var(--mtv-font-ui, inherit);
}

:root[data-theme="dark"] .mtv-sheet[aria-label="Post actions"] .mtv-sheet__panel { background: #101c28; color: #e8eef4; }
:root[data-theme="dark"] .mtv-sheet[aria-label="Post actions"] .mtv-sheet__row { color: #e8eef4; }
:root[data-theme="dark"] .mtv-sheet[aria-label="Post actions"] .mtv-sheet__grip { background: rgba(255, 255, 255, .2); }

@media (min-width: 720px) {
    .mtv-sheet[aria-label="Post actions"] { align-items: center; }
    .mtv-sheet[aria-label="Post actions"] .mtv-sheet__panel {
        max-height: 76%;
        border-radius: 18px;
        margin-bottom: 6vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mtv-sheet[aria-label="Post actions"],
    .mtv-sheet[aria-label="Post actions"] .mtv-sheet__panel { transition: none; }
}
