.tp-social-shorts-area {
    overflow: hidden;
}

.tp-social-shorts-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
}

.tp-social-shorts-head__title {
    flex: 1 1 240px;
    text-align: left;
    order: 1;
}

.tp-social-shorts-head__meta {
    flex: 1 1 280px;
    min-width: 0;
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tp-social-shorts-slider {
    padding: 0;
    width: 100%;
}

.tp-social-shorts-active {
    width: 100%;
    overflow: hidden;
}

.tp-social-shorts-active .swiper-wrapper {
    align-items: stretch;
}

.tp-social-shorts-active .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

/* Works even if Swiper JS is late / missing */
.tp-social-shorts-active.is-grid-fallback {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}

.tp-social-shorts-active.is-grid-fallback .swiper-wrapper {
    display: flex !important;
    gap: 16px;
    transform: none !important;
    width: max-content !important;
}

.tp-social-shorts-active.is-grid-fallback .swiper-slide {
    width: 180px !important;
    flex: 0 0 180px !important;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .tp-social-shorts-active.is-grid-fallback .swiper-slide {
        width: 200px !important;
        flex-basis: 200px !important;
    }
}

@media (min-width: 1200px) {
    .tp-social-shorts-active.is-grid-fallback .swiper-slide {
        width: 220px !important;
        flex-basis: 220px !important;
    }
}

.tp-social-short-card {
    --short-accent: #99c14e;
    --short-gradient: linear-gradient(180deg, #062844 0%, #99c14e 100%);
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    text-align: left;
    text-decoration: none !important;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.tp-social-short-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    min-height: 280px;
    max-height: 430px;
    background: var(--short-gradient);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(1, 15, 28, 0.14);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    isolation: isolate;
    overflow: hidden;
}

.tp-social-shorts-head__platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #55585b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tp-social-shorts-head__platform svg,
.tp-social-shorts-head__platform i {
    width: 18px;
    height: 18px;
    color: #ff0033;
}

.tp-social-shorts-head__caption {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #010f1c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 14px;
}

.tp-social-shorts-head__caption svg,
.tp-social-shorts-head__caption i {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    color: var(--tp-theme-primary, #99c14e);
    flex: 0 0 auto;
}

.tp-social-shorts-head__nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tp-social-shorts-head__nav .tp-social-shorts-button-prev,
.tp-social-shorts-head__nav .tp-social-shorts-button-next {
    position: static;
    margin: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #55585b;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tp-social-shorts-head__nav .tp-social-shorts-button-prev:hover,
.tp-social-shorts-head__nav .tp-social-shorts-button-next:hover {
    background: var(--tp-theme-primary, #99c14e);
    border-color: var(--tp-theme-primary, #99c14e);
    color: #fff;
    transform: none;
}

.tp-social-shorts-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 700;
    color: #010f1c;
}

.tp-social-shorts-title__accent {
    color: #8bc34a;
    position: relative;
    display: inline-block;
}

.tp-social-shorts-title__accent::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 3px;
    background: rgba(139, 195, 74, 0.55);
    border-radius: 2px;
}

.tp-social-shorts-title__rest {
    color: #010f1c;
}

.tp-social-shorts-subtitle {
    margin: 8px 0 0;
    color: #767a7d;
    font-size: 14px;
}

.tp-social-short-card--tiktok {
    --short-accent: #fe2c55;
    --short-gradient: linear-gradient(180deg, #1a0508 0%, #7a1028 42%, #fe2c55 100%);
}

.tp-social-short-card--facebook {
    --short-accent: #1877f2;
    --short-gradient: linear-gradient(180deg, #0a2548 0%, #145dbf 48%, #1877f2 100%);
}

.tp-social-short-card--youtube {
    --short-accent: #ff0033;
    --short-gradient: linear-gradient(180deg, #3a000c 0%, #b80024 48%, #ff0033 100%);
}

.tp-social-short-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    min-height: 280px;
    max-height: 430px;
    background: var(--short-gradient);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(1, 15, 28, 0.14);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    isolation: isolate;
    overflow: hidden;
}

.tp-social-short-card__thumb {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: transform 0.45s ease;
}

.tp-social-short-card:hover .tp-social-short-card__media {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(1, 15, 28, 0.2);
}

.tp-social-short-card:hover .tp-social-short-card__thumb {
    transform: scale(1.08);
}

.tp-social-short-card__glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.16) 0%, transparent 46%),
        linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

.tp-social-short-card.has-thumb .tp-social-short-card__glow {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.58) 100%);
}

.tp-social-short-card__platform {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #010f1c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.tp-social-short-card__platform svg,
.tp-social-short-card__platform i {
    width: 14px;
    height: 14px;
    color: var(--short-accent);
}

.tp-social-short-card__brand {
    position: absolute;
    top: 46%;
    left: 50%;
    z-index: 2;
    width: 78px;
    height: 78px;
    margin: -39px 0 0 -39px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(4px);
    color: #fff;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tp-social-short-card.has-thumb .tp-social-short-card__brand {
    opacity: 0;
    transform: scale(0.9);
}

.tp-social-short-card__brand svg,
.tp-social-short-card__brand i {
    width: 36px;
    height: 36px;
}

.tp-social-short-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    color: #010f1c;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, background 0.28s ease, color 0.28s ease;
}

.tp-social-short-card:hover .tp-social-short-card__play {
    transform: scale(1.08);
    background: var(--short-accent);
    color: #fff;
}

.tp-social-short-card__play svg,
.tp-social-short-card__play i {
    width: 22px;
    height: 22px;
    margin-left: 2px;
}

.tp-social-short-card__caption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 3;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(1, 15, 28, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

/* ===== Popup viewer (shorts modal) ===== */
body.tp-shorts-viewer-open {
    overflow: hidden;
}

.tp-shorts-viewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 40px;
}

.tp-shorts-viewer[hidden] {
    display: none !important;
}

.tp-shorts-viewer.is-open {
    display: flex;
}

.tp-shorts-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(34, 34, 34, 0.92);
}

.tp-shorts-viewer__close {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: #ff6736;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.tp-shorts-viewer__close:hover {
    filter: brightness(1.05);
}

.tp-shorts-viewer__stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
}

.tp-shorts-viewer__phone {
    position: relative;
    width: min(360px, calc(100vw - 96px));
    aspect-ratio: 9 / 16;
    max-height: min(82vh, 720px);
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.tp-shorts-viewer__frame,
.tp-shorts-viewer__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.tp-shorts-viewer__loader {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #1a1a1a;
}

.tp-shorts-viewer__loader span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: tp-shorts-pulse 0.9s ease-in-out infinite alternate;
}

.tp-shorts-viewer__loader span:first-child {
    background: #25f4ee;
}

.tp-shorts-viewer__loader span:last-child {
    background: #fe2c55;
    animation-delay: 0.2s;
}

@keyframes tp-shorts-pulse {
    from {
        transform: scale(0.75);
        opacity: 0.55;
    }
    to {
        transform: scale(1.15);
        opacity: 1;
    }
}

.tp-shorts-viewer__fallback {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    background: linear-gradient(180deg, #1a0508 0%, #3a1020 100%);
    color: #fff;
}

.tp-shorts-viewer__fallback p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    opacity: 0.92;
}

.tp-shorts-viewer__watch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #fe2c55;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
}

.tp-shorts-viewer__meta {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 4;
    pointer-events: none;
}

.tp-shorts-viewer__badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tp-shorts-viewer__caption {
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.tp-shorts-viewer__side-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tp-shorts-viewer__nav-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tp-shorts-viewer__nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.tp-shorts-viewer__hint {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    z-index: 2;
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

@media (max-width: 767px) {
    .tp-social-shorts-head__title {
        text-align: left;
        width: 100%;
    }

    .tp-social-short-card__media {
        max-height: 340px;
        border-radius: 14px;
    }

    .tp-social-short-card__brand {
        width: 64px;
        height: 64px;
        margin: -32px 0 0 -32px;
    }

    .tp-social-short-card__brand svg,
    .tp-social-short-card__brand i {
        width: 28px;
        height: 28px;
    }

    .tp-social-short-card__play {
        width: 48px;
        height: 48px;
        margin: -24px 0 0 -24px;
    }

    .tp-shorts-viewer__stage {
        gap: 10px;
    }

    .tp-shorts-viewer__phone {
        width: min(320px, calc(100vw - 72px));
    }

    .tp-shorts-viewer__nav-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .tp-shorts-viewer__close {
        top: 12px;
        left: 12px;
        width: 38px;
        height: 38px;
    }
}
