/* ============================================================================
 * 배때지 V2 · 제품 LIVE 공유 모달 (§6)
 *
 *   쇼츠 플레이어(어두운 배경) 위와 일반 페이지 양쪽에서 열린다.
 *   고객에게는 «공유» 수단만 보인다 — 관리자 SNS 게시·광고 기능은 노출하지 않는다.
 * ========================================================================== */

.btsh-back {
    position: fixed; inset: 0; z-index: 12000;
    background: rgba(0, 0, 0, .55);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .18s ease;
    -webkit-backdrop-filter: saturate(140%) blur(2px);
    backdrop-filter: saturate(140%) blur(2px);
}
.btsh-back[data-open="1"] { opacity: 1; pointer-events: auto; }

.btsh-sheet {
    width: 100%; max-width: 520px;
    background: #fff; color: #16181d;
    border-radius: 20px 20px 0 0;
    padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .28);
    transform: translateY(14px); transition: transform .2s ease;
    max-height: 88vh; overflow-y: auto;
}
.btsh-back[data-open="1"] .btsh-sheet { transform: translateY(0); }

.btsh-grab {
    width: 42px; height: 4px; border-radius: 99px; background: #d6d9de;
    margin: 6px auto 12px;
}

/* ── 상품 요약 ─────────────────────────────────────────────────────────── */
.btsh-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.btsh-thumb {
    width: 54px; height: 96px; border-radius: 10px; object-fit: cover;
    background: #101114; flex: 0 0 auto;
}
.btsh-meta { min-width: 0; flex: 1 1 auto; }
.btsh-brand { font-size: 12px; color: #7a7f88; }
.btsh-title {
    font-size: 15px; font-weight: 700; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.btsh-price { font-size: 13px; font-weight: 700; color: #e31e24; margin-top: 2px; }

/* ── 버튼 그리드 ───────────────────────────────────────────────────────── */
.btsh-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 4px;
    margin-bottom: 6px;
}
.btsh-item {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 12px 4px 10px; border: 0; background: transparent; cursor: pointer;
    border-radius: 12px; font: inherit; color: inherit; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.btsh-item:hover, .btsh-item:focus-visible { background: #f2f3f5; }
.btsh-item:focus-visible { outline: 2px solid #16181d; outline-offset: -2px; }
.btsh-ico {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f0f1f4; color: #16181d; flex: 0 0 auto;
}
.btsh-ico svg { width: 22px; height: 22px; }
.btsh-item span { font-size: 11px; line-height: 1.25; text-align: center; color: #4a4f57; }

/* 브랜드 색 */
.btsh-ico.is-kakao { background: #FEE500; color: #191600; }
.btsh-ico.is-x     { background: #16181d; color: #fff; }
.btsh-ico.is-fb    { background: #1877F2; color: #fff; }
.btsh-ico.is-sms   { background: #17c964; color: #fff; }

.btsh-close {
    display: block; width: 100%; margin-top: 8px; padding: 13px;
    border: 0; border-radius: 12px; background: #f0f1f4;
    font-size: 14px; font-weight: 700; color: #16181d; cursor: pointer;
}
.btsh-close:hover { background: #e6e8ec; }

.btsh-note { font-size: 11px; color: #9aa0a8; text-align: center; margin: 10px 0 0; }

/* 토스트 */
.btsh-toast {
    position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
    z-index: 12100; background: rgba(20, 22, 26, .94); color: #fff;
    font-size: 13px; padding: 10px 16px; border-radius: 999px;
    opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.btsh-toast[data-on="1"] { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 반응형 ────────────────────────────────────────────────────────────── */
/* 태블릿·PC — 하단 시트가 아니라 가운데 카드로 */
@media (min-width: 700px) {
    .btsh-back { align-items: center; }
    .btsh-sheet { border-radius: 18px; max-width: 460px; padding-bottom: 18px; }
    .btsh-grab { display: none; }
    .btsh-sheet { transform: scale(.97); }
    .btsh-back[data-open="1"] .btsh-sheet { transform: scale(1); }
}
/* 아주 좁은 화면 — 3열로 줄여 글자가 겹치지 않게 */
@media (max-width: 359px) {
    .btsh-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 다크 테마 대응 — 플레이어는 항상 어둡지만 시트는 시스템 설정을 따른다 */
@media (prefers-color-scheme: dark) {
    .btsh-sheet { background: #1b1d22; color: #f2f3f5; }
    .btsh-grab { background: #3a3d44; }
    .btsh-title { color: #f2f3f5; }
    .btsh-brand { color: #9aa0a8; }
    .btsh-ico { background: #2a2d34; color: #f2f3f5; }
    .btsh-item span { color: #b8bdc5; }
    .btsh-item:hover, .btsh-item:focus-visible { background: #24272d; }
    .btsh-item:focus-visible { outline-color: #f2f3f5; }
    .btsh-close { background: #2a2d34; color: #f2f3f5; }
    .btsh-close:hover { background: #33373f; }
}

@media (prefers-reduced-motion: reduce) {
    .btsh-back, .btsh-sheet, .btsh-toast { transition: none; }
}
