/**
 * ShopSideK TikTok Timed Image Popup Styles
 */

/* ── Overlay ── */
.ss-tiktok-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ss-tiktok-overlay.ss-tiktok-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ── Popup Card (Image Container) ── */
.ss-tiktok-card {
    position: relative;
    max-width: 480px;
    width: 90vw;
    max-height: 85vh;
    border-radius: 18px;
    background: transparent;
    cursor: pointer;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15);
    transform: scale(1);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
    user-select: none;
    -webkit-user-select: none;
}

.ss-tiktok-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.ss-tiktok-overlay.ss-tiktok-hidden .ss-tiktok-card {
    transform: scale(0.92) translateY(10px);
}

/* ── Banner Image ── */
.ss-tiktok-image {
    width: 100%;
    height: auto;
    max-height: 85vh;
    display: block;
    object-fit: contain;
    border-radius: 18px;
    pointer-events: none;
}

/* ── Close Button (X) ── */
.ss-tiktok-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transition: all 0.2s ease;
    z-index: 10;
}

.ss-tiktok-close:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.ss-tiktok-close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.ss-tiktok-close svg {
    display: block;
}

/* ── Body scroll lock ── */
body.ss-tiktok-body-lock {
    overflow: hidden !important;
}

/* ── Responsive adjustments ── */
@media (max-width: 600px) {
    .ss-tiktok-card {
        max-width: 380px;
    }

    .ss-tiktok-close {
        top: 8px;
        right: 8px;
        background: rgba(255, 255, 255, 0.92);
    }
}
