.tiktok-product-videos,
.tiktok-modal {
    --tiktok-video-scale: 1.45;
    --tiktok-mask-width: 0px;
    --tiktok-card-right: 78px;
    --tiktok-actions-bottom: 150px;
    --tiktok-card-video-scale: 1.55;
}

.tiktok-product-videos .tiktok-videos-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 4px;
}

.tiktok-product-videos .tiktok-videos-track {
    --tiktok-card-w: 300px;
    --tiktok-card-gap: 14px;
    display: flex;
    align-items: stretch;
    gap: var(--tiktok-card-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 8px 20px;
    flex: 0 1 auto;
    width: min(calc(100% - 96px), calc(var(--tiktok-cards-lg, 3) * var(--tiktok-card-w) + (var(--tiktok-cards-lg, 3) - 1) * var(--tiktok-card-gap)));
    max-width: 100%;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tiktok-product-videos .tiktok-videos-track::-webkit-scrollbar { display: none; }

.tiktok-product-videos .tiktok-video-card {
    flex: 0 0 calc((100% - (var(--tiktok-cards-lg, 3) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-lg, 3));
    width: calc((100% - (var(--tiktok-cards-lg, 3) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-lg, 3));
    min-width: calc((100% - (var(--tiktok-cards-lg, 3) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-lg, 3));
    max-width: calc((100% - (var(--tiktok-cards-lg, 3) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-lg, 3));
    height: auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
    transition: transform .2s, box-shadow .2s;
    scroll-snap-align: start;
}

.tiktok-product-videos .tiktok-video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.14);
}

.tiktok-product-videos .tiktok-video-play {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 0;
    padding: 0;
    margin: 0;
    background: #000;
    overflow: hidden; 
    cursor: pointer;
}

.tiktok-product-videos .tiktok-video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #25f4ee, #fe2c55);
    display: block;
}

.tiktok-product-videos .tiktok-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(4px);
    z-index: 2;
    transition: transform .2s;
}

.tiktok-product-videos .tiktok-video-play:hover .tiktok-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.tiktok-product-videos .tiktok-video-play iframe {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    transform: translate(-50%, -50%) scale(var(--tiktok-card-video-scale)) !important;
    transform-origin: center center !important;
    pointer-events: none;
}

.tiktok-product-videos .tiktok-product-info {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.tiktok-product-videos .tiktok-product-name {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0 0 5px;
    min-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.35;
    color: #1a1a1a;
}

.tiktok-product-videos .tiktok-product-price {
    margin-bottom: 10px;
    min-height: 21px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tiktok-product-videos .tiktok-price-old {
    text-decoration: line-through;
    color: #64748b;
    font-size: 12px;
}

.tiktok-product-videos .tiktok-price-new {
    color: var(--colorDark-1, #334155);
    font-weight: 700;
}

.tiktok-product-videos .tiktok-add-to-cart {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 9px 13px;
    background: var(--mainColor) !important;
    border-color: var(--mainColor) !important;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .15s, opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    margin-top: auto;
    flex-shrink: 0;
}

.tiktok-product-videos .tiktok-add-to-cart .tiktok-cart-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.tiktok-product-videos .tiktok-add-to-cart .tiktok-cart-icon svg {
    display: block;
    width: 21px;
    height: 20px;
}

.tiktok-product-videos .tiktok-add-to-cart:hover {
    background: #333 !important;
    border-color: #333 !important;
    opacity: 1;
}
.tiktok-product-videos .tiktok-add-to-cart:active { transform: scale(.97); }


.tiktok-product-videos .tiktok-cart-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30,30,30,.96);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 50px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 50;
    direction: rtl;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.tiktok-product-videos .tiktok-cart-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(30,30,30,.96);
}

.tiktok-product-videos .tiktok-cart-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.tiktok-product-videos .tiktok-videos-arrow {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: var(--mainColor);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
    transition: all .2s;
}

.tiktok-product-videos .tiktok-videos-arrow:hover {
    color: var(--mainColor);
    background-color: transparent;
    border: 1px solid var(--mainColor);
    box-shadow: none;
}

.tiktok-product-videos .tiktok-videos-dots {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    position: relative;
    top: 0;
    text-align: center;
    z-index: 5;
}

.tiktok-product-videos .tiktok-videos-dots li {
    margin: 0;
    padding: 0;
    display: inline-block;
    position: static;
    width: unset;
    height: unset;
}

.tiktok-product-videos .tiktok-videos-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    margin: 0 2px;
    padding: 0;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: all .2s;
    font-size: 0;
    line-height: 0;
    opacity: 1;
}

.tiktok-product-videos .tiktok-videos-dots li.active button,
.tiktok-product-videos .tiktok-videos-dots button[aria-current="true"] {
    background-color: var(--mainColor);
    width: 22px;
    border-radius: 8px;
}

.tiktok-product-videos.hide_dots .tiktok-videos-dots {
    display: none !important;
}

@media (max-width: 992px) {
    .tiktok-product-videos .tiktok-videos-track {
        width: min(calc(100% - 96px), calc(var(--tiktok-cards-md, 2) * var(--tiktok-card-w) + (var(--tiktok-cards-md, 2) - 1) * var(--tiktok-card-gap)));
        --tiktok-card-gap: 12px;
    }
    .tiktok-product-videos .tiktok-video-card {
        flex-basis: calc((100% - (var(--tiktok-cards-md, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-md, 2));
        width: calc((100% - (var(--tiktok-cards-md, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-md, 2));
        min-width: calc((100% - (var(--tiktok-cards-md, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-md, 2));
        max-width: calc((100% - (var(--tiktok-cards-md, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-md, 2));
    }
}

@media (max-width: 768px) {
    .tiktok-product-videos .tiktok-videos-wrapper {
        gap: 0;
    }
    .tiktok-product-videos .tiktok-videos-track {
        width: 100%;
        --tiktok-card-gap: 10px;
        padding: 6px 2px 16px;
    }
    .tiktok-product-videos .tiktok-video-card {
        flex-basis: calc((100% - (var(--tiktok-cards-sm, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-sm, 2));
        width: calc((100% - (var(--tiktok-cards-sm, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-sm, 2));
        min-width: calc((100% - (var(--tiktok-cards-sm, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-sm, 2));
        max-width: calc((100% - (var(--tiktok-cards-sm, 2) - 1) * var(--tiktok-card-gap)) / var(--tiktok-cards-sm, 2));
    }
    .tiktok-product-videos .tiktok-product-name {
        font-size: 12.5px;
        min-height: 34px;
    }
    .tiktok-product-videos .tiktok-product-info {
        padding: 10px 10px 12px;
    }
    .tiktok-product-videos .tiktok-add-to-cart {
        font-size: 13px;
        padding: 8px 10px;
    }
    .tiktok-product-videos .tiktok-videos-arrow { display: none; }
}

/* ─── Modal ─────────────────────────────────────────────── */
.tiktok-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.tiktok-modal.active { display: flex; }

.tiktok-modal .tiktok-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.82);
}

.tiktok-modal .tiktok-modal-content {
    position: relative;
    z-index: 1;
    width: 420px;
    height: 88vh;
    max-height: 820px;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 16px 56px rgba(0,0,0,.6);
    display: flex;
}

.tiktok-modal .tiktok-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.92);
    color: #000;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.tiktok-modal .tiktok-modal-video-wrap {
    position: absolute;
    inset: 0;
    background: #000;
    overflow: hidden;
}

.tiktok-modal .tiktok-modal-embed {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.tiktok-modal .tiktok-modal-embed iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    transform: translate(-50%, -50%) scale(var(--tiktok-video-scale));
    transform-origin: center center;
}

.tiktok-modal .tiktok-modal-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    background: #0a0a0a;
}

.tiktok-modal .tiktok-modal-poster--empty {
    background: linear-gradient(135deg, #25f4ee, #fe2c55);
}

/* مودال صورة فقط: الصورة تظهر كاملة وواضحة داخل الإطار */
.tiktok-modal.tiktok-modal--image .tiktok-modal-embed {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}

.tiktok-modal.tiktok-modal--image .tiktok-modal-poster {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tiktok-modal.tiktok-modal--image .tiktok-progress-wrap {
    display: none;
}

.tiktok-modal .tiktok-modal-mask {
    position: absolute;
    background: #000;
    pointer-events: none;
    z-index: 15;
}

.tiktok-modal .tiktok-modal-mask--right {
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--tiktok-mask-width);
}

.tiktok-modal .tiktok-modal-mask--bottom {
    left: 0;
    right: 0;
    bottom: 0;
    height: 0px;
}


.tiktok-modal .tiktok-progress-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 23;
    cursor: pointer;
    padding: 6px 0;
}

.tiktok-modal .tiktok-progress-bar {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,.28);
    transition: height .15s ease;
}

.tiktok-modal .tiktok-progress-wrap:hover .tiktok-progress-bar {
    height: 5px;
}

.tiktok-modal .tiktok-progress-fill {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0%;
    background: #fff;
    transition: width .15s linear;
}

/* ─── Action Buttons ────────────────────────────────────── */
.tiktok-modal .tiktok-modal-actions {
    position: absolute;
    right: 10px;
    bottom: 10%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.tiktok-modal .tiktok-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tiktok-modal .tiktok-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.tiktok-modal .tiktok-action-btn:hover {
    background: rgba(255,255,255,.28);
}

.tiktok-modal .tiktok-action-btn:active {
    transform: scale(.92);
}

.tiktok-modal .tiktok-wishlist-btn.wishlisted {
    color: #d79a45;
    background: #d79a4547;
}

.tiktok-modal .tiktok-action-count {
    font-size: 11px;
    color: rgba(255,255,255,.9);
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* ─── Product Card in Modal ─────────────────────────────── */
.tiktok-modal .tiktok-modal-product {
    position: absolute;
    bottom: 16px;
    left: 14px;
    right: var(--tiktok-card-right);
    z-index: 10;
    border-radius: 18px;
    padding: 14px 16px 16px;
    direction: rtl;
    text-align: right;
}

.tiktok-modal .tiktok-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    color: rgba(255,255,255,.7);
    font-size: 20px;
}

.tiktok-modal .tiktok-modal-product-name {
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 4px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tiktok-modal .tiktok-modal-product-desc {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.55;
}

.tiktok-modal .tiktok-modal-product-price {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.tiktok-modal .tiktok-modal-product-price .tiktok-price-old {
    text-decoration: line-through;
    color: rgba(255,255,255,.5);
    font-size: 13px;
    font-weight: 400;
}

.tiktok-modal .tiktok-modal-product-price .tiktok-price-new {
    color: #fff;
    font-weight: 700;
}

.tiktok-modal .tiktok-modal-options-wrap {
    margin-bottom: 10px;
}

.tiktok-modal .tiktok-options-group + .tiktok-options-group {
    margin-top: 14px;
}

.tiktok-modal .tiktok-modal-options-label {
    font-size: 12px;
    color: rgba(255,255,255,.8);
    margin: 0 0 8px;
    font-weight: 600;
}

.tiktok-modal .tiktok-modal-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tiktok-modal .tiktok-option-btn {
    min-width: 40px;
    height: 36px;
    padding: 0 14px;
    border-radius: 50px;
    border: 1.5px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiktok-modal .tiktok-option-btn:hover {
    border-color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.18);
}

.tiktok-modal .tiktok-option-btn.selected {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* ─── Options Alert ─────────────────────────────────────── */
.tiktok-modal .tiktok-options-alert {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(254, 44, 85, 0.18);
    border: 1px solid rgba(254, 44, 85, 0.5);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    color: #ff6b8a;
    font-size: 13px;
    font-weight: 600;
    direction: rtl;
    animation: tiktok-fadein .25s ease;
}

@keyframes tiktok-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Add to Cart Button ─────────────────────────────────── */
.tiktok-modal .tiktok-modal-add-to-cart {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 13px 14px;
    background: var(--mainColor) !important;
    border-color: var(--mainColor) !important;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s, transform .15s, opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tiktok-modal .tiktok-modal-add-to-cart .tiktok-cart-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.tiktok-modal .tiktok-modal-add-to-cart .tiktok-cart-icon svg {
    display: block;
    width: 21px;
    height: 20px;
}

.tiktok-modal .tiktok-modal-add-to-cart:hover {
    background: #333 !important;
    border-color: #333 !important;
    opacity: 1;
}
.tiktok-modal .tiktok-modal-add-to-cart:active { transform: scale(.98); }

/* ─── حاوية الزرار + توست المودال (يظهر فوق الزرار بنفس لونه) ──────────────── */
.tiktok-modal .tiktok-modal-cta-wrap {
    position: relative;
}

.tiktok-modal .tiktok-modal-toast {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #d79a45;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 9px 18px;
    border-radius: 50px;
    pointer-events: none;
    opacity: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    transition: opacity .22s ease, transform .22s ease;
}

.tiktok-modal .tiktok-modal-toast::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #d79a45;
}

 .tiktok-modal .tiktok-modal-toast.error {
    background: #c0392b;
}
.tiktok-modal .tiktok-modal-toast.error::after {
    border-top-color: #c0392b;
} 

.tiktok-modal .tiktok-modal-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── Shake Animation ───────────────────────────────────── */
@keyframes tiktok-shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* ─── Toast Notification ─────────────────────────────────── */
.tiktok-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 99999;
    background: rgba(30,30,30,.96);
    color: #fff;
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    direction: rtl;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tiktok-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tiktok-toast.success { background: rgba(22,163,74,.95); }
.tiktok-toast.error   { background: rgba(220,38,38,.95); }
.tiktok-toast.warning { background: rgba(202,138,4,.95); }

/* ─── Comments Panel ─────────────────────────────────────── */
.tiktok-modal .tiktok-comments-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 25;
    background: rgba(22,22,22,.97);
    border-radius: 20px 20px 0 0;
    max-height: 65%;
    display: flex;
    flex-direction: column;
    direction: rtl;
}

.tiktok-modal .tiktok-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.tiktok-modal .tiktok-comments-close {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,.7);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

.tiktok-modal .tiktok-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
}

.tiktok-modal .tiktok-comment-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tiktok-modal .tiktok-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25f4ee, #fe2c55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.tiktok-modal .tiktok-comment-body { flex: 1; }

.tiktok-modal .tiktok-comment-user {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
    margin-bottom: 2px;
}

.tiktok-modal .tiktok-comment-text {
    font-size: 13px;
    color: #fff;
    line-height: 1.5;
    word-break: break-word;
}

.tiktok-modal .tiktok-comment-rating {
    font-size: 11px;
    color: #f4c542;
    margin-bottom: 2px;
}

.tiktok-modal .tiktok-comment-time {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    margin-top: 3px;
}

.tiktok-modal .tiktok-comments-empty {
    text-align: center;
    color: rgba(255,255,255,.4);
    font-size: 13px;
    padding: 24px 0;
}

.tiktok-modal .tiktok-comments-input-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255,255,255,.1);
}


.tiktok-modal .tiktok-comments-toast {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    margin-bottom: 8px;
    background: rgba(30,30,30,.96);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 9px 18px;
    border-radius: 50px;
    pointer-events: none;
    opacity: 0;
    z-index: 40;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    transition: opacity .22s ease, transform .22s ease;
}

.tiktok-modal .tiktok-comments-toast.success { background: rgba(22,163,74,.95); }
.tiktok-modal .tiktok-comments-toast.error   { background: rgba(220,38,38,.95); }
.tiktok-modal .tiktok-comments-toast.warning { background: rgba(202,138,4,.95); }

.tiktok-modal .tiktok-comments-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tiktok-modal .tiktok-rating-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tiktok-modal .tiktok-rating-label {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
}

.tiktok-modal .tiktok-stars { display: flex; gap: 4px; }

.tiktok-modal .tiktok-star-btn {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,.3);
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
    transition: color .15s, transform .1s;
}

.tiktok-modal .tiktok-star-btn.active { color: #f4c542; }
.tiktok-modal .tiktok-star-btn:hover { transform: scale(1.2); }

.tiktok-modal .tiktok-comment-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tiktok-modal .tiktok-comment-input {
    flex: 1;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50px;
    padding: 9px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    direction: rtl;
}

.tiktok-modal .tiktok-comment-input::placeholder { color: rgba(255,255,255,.4); }
.tiktok-modal .tiktok-comment-input:focus { border-color: rgba(255,255,255,.4); }

.tiktok-modal .tiktok-comment-submit {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: #c8a97e;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
}

.tiktok-modal .tiktok-comment-submit:hover { background: #b8996e; }

/* ─── Share Panel ────────────────────────────────────────── */
.tiktok-modal .tiktok-share-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 25;
    background: rgba(22,22,22,.97);
    border-radius: 20px 20px 0 0;
    padding: 16px 14px 24px;
    direction: rtl;
    display: none;
}

.tiktok-modal .tiktok-share-panel.active { display: block; }

.tiktok-modal .tiktok-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.tiktok-modal .tiktok-share-close {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,.7);
    font-size: 16px;
    cursor: pointer;
}

.tiktok-modal .tiktok-share-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.tiktok-modal .tiktok-share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
}

.tiktok-modal .tiktok-share-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.tiktok-modal .tiktok-share-label {
    font-size: 11px;
    color: rgba(255,255,255,.8);
    text-align: center;
}

.tiktok-modal .tiktok-copy-link-btn {
    width: 100%;
    margin-top: 14px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50px;
    padding: 11px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.8);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s;
}

.tiktok-modal .tiktok-copy-link-btn:hover { background: rgba(255,255,255,.15); }

@media (max-width: 480px) {
    .tiktok-modal .tiktok-modal-content {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .tiktok-modal {
        --tiktok-actions-bottom: 180px;
        --tiktok-card-right: 72px;
    }
}