/* ─────────────────────────────────────────────────────────────
   TikTok-style share sheet (default post-card variant).
   Self-contained: only .fp-tts-* selectors, teleported to <body>,
   so no other dropdown CSS can reach it. Purely presentational —
   every Alpine handler in share-menu.blade.php is untouched.
   ───────────────────────────────────────────────────────────── */

.fp-tts-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 18, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 99998;
}

.fp-tts-sheet {
    position: fixed;
    z-index: 99999;
    left: 50%;
    bottom: max(env(safe-area-inset-bottom, 0px), 24px);
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 24px));
    max-height: min(76vh, 560px);
    display: flex;
    flex-direction: column;
    background: var(--fp-surface, #fff);
    color: var(--fp-text, #0f172a);
    border: 1px solid var(--fp-border, rgba(15, 23, 42, .08));
    border-radius: 22px;
    box-shadow: 0 30px 80px -24px rgba(2, 6, 23, .65);
    overflow: hidden;
}

.fp-tts-anim { transition: opacity .2s ease, transform .24s cubic-bezier(.2, .85, .3, 1); }
.fp-tts-start { opacity: 0; transform: translateX(-50%) translateY(18px) scale(.98); }

.fp-tts-handle {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--fp-border, rgba(15, 23, 42, .16));
    margin: 10px auto 2px;
    flex: none;
}

.fp-tts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px 10px;
    border-bottom: 1px solid var(--fp-border, rgba(15, 23, 42, .08));
    flex: none;
}
.fp-tts-title { font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.fp-tts-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: color-mix(in srgb, var(--fp-text, #0f172a) 8%, transparent);
    color: inherit;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.fp-tts-close:hover { background: color-mix(in srgb, var(--fp-text, #0f172a) 14%, transparent); }
.fp-tts-close:active { transform: scale(.92); }

.fp-tts-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 6px 6px 10px;
}

/* Rows inside the shared menu body (it ships inline styles, hence the
   !important overrides — markup itself is left exactly as it is). */
.fp-tts-sheet .fp-dropdown-item {
    gap: 12px !important;
    padding: 11px 12px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
    transition: background .15s ease, transform .12s ease;
}
.fp-tts-sheet .fp-dropdown-item:hover {
    background: color-mix(in srgb, var(--fp-text, #0f172a) 6%, transparent) !important;
}
.fp-tts-sheet .fp-dropdown-item:active { transform: scale(.985); }

/* Emoji glyph becomes a round TikTok-ish tile. */
.fp-tts-sheet .fp-dropdown-item > span:first-child {
    width: 40px;
    height: 40px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 19px !important;
    background: color-mix(in srgb, var(--fp-text, #0f172a) 7%, transparent);
}
.fp-tts-sheet .fp-dropdown-item p { line-height: 1.25; }

/* Back rows in the group / page sub-menus. */
.fp-tts-sheet .fp-tts-body > div > button:first-child[style*="border-bottom"] {
    border-bottom: 1px solid var(--fp-border, rgba(15, 23, 42, .08)) !important;
    padding: 10px 12px !important;
    margin-bottom: 4px;
}

@media (min-width: 821px) {
    .fp-tts-sheet {
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: min(400px, calc(100vw - 40px));
    }
    .fp-tts-start { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
    .fp-tts-handle { display: none; }
}

@media (max-width: 820px) {
    /* Clear of the bottom nav bar. */
    .fp-tts-sheet { bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); }
}

@media (max-width: 420px) {
    .fp-tts-sheet { width: calc(100vw - 16px); border-radius: 20px; }
    .fp-tts-sheet .fp-dropdown-item { padding: 10px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .fp-tts-anim,
    .fp-tts-sheet .fp-dropdown-item,
    .fp-tts-close { transition: none !important; }
}
