/* Social Discovery Feed — header + filters; cards use posts.css */

.social-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px 12px;
    align-items: center;
    padding: 18px;
    margin: 0 0 4px;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: var(--radius-lg, 18px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.07));
    box-sizing: border-box;
}

.social-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.social-icon-badge {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500, #0ea5e9), #6366f1);
}

.social-icon-badge svg {
    width: 20px;
    height: 20px;
}

.social-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary, #0f172a);
}

.social-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text-secondary, #475569);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle, #e2e8f0);
    background: var(--bg-surface, #fff);
    color: var(--text-primary, #0f172a);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.social-btn:hover {
    background: var(--bg-surface-subtle, #f8fafc);
    border-color: var(--primary-500, #0ea5e9);
}

.social-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.social-btn.is-loading svg {
    animation: socialSpin 0.9s linear infinite;
}

@keyframes socialSpin {
    to { transform: rotate(360deg); }
}

.social-search-box {
    grid-column: 1 / -1;
    position: relative;
}

.social-search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--slate-400, #94a3b8);
    pointer-events: none;
}

.social-search-input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle, #e2e8f0);
    background: var(--bg-surface-subtle, #f8fafc);
    color: var(--text-primary, #0f172a);
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.social-search-input:focus {
    border-color: var(--primary-500, #0ea5e9);
    background: var(--bg-surface, #fff);
}

.social-platform-tabs {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.social-platform-tabs::-webkit-scrollbar {
    display: none;
}

.social-tab-btn {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle, #e2e8f0);
    background: transparent;
    color: var(--text-secondary, #475569);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.social-tab-btn.active {
    background: var(--primary-500, #0ea5e9);
    border-color: var(--primary-500, #0ea5e9);
    color: #fff;
}

.social-video-post .time-posted .social-source::before {
    content: "·";
    padding: 0 6px;
}

.social-video-post .time-posted .social-source a {
    color: inherit;
    text-decoration: none;
}

.social-video-post .time-posted .social-source a:hover {
    text-decoration: underline;
}

.social-video-post .col-poster-image {
    cursor: default;
}

.social-feed-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 0 32px;
}

.social-feed-status {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary, #475569);
}

.social-feed-status:empty {
    display: none;
}

.social-more-btn[hidden] {
    display: none;
}

.social-feed-empty .social-btn {
    margin-top: 12px;
}

/* Size the player to the clip's real shape instead of the home feed's full-screen box */
.posts-page .social-video-post .public-post .post-row .media-container.video {
    --social-video-ratio: 1.7778;
    --social-video-max-h: min(68vh, 560px);
    width: min(100%, calc(var(--social-video-max-h) * var(--social-video-ratio))) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: var(--social-video-max-h) !important;
    aspect-ratio: var(--social-video-ratio);
    margin: 0 auto !important;
    border-radius: 14px;
    overflow: hidden;
}

.posts-page .social-video-post .public-post .post-row .media-container.video::before,
.posts-page .social-video-post .public-post .post-row .media-container.video::after {
    display: none;
}

.posts-page .social-video-post .public-post .post-row .media-container.video .mp4-video {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
}

@media (max-width: 600px) {
    .posts-page .social-video-post .public-post .post-row .media-container.video {
        --social-video-max-h: min(62vh, 520px);
        border-radius: 12px;
    }
}

.social-feed-empty {
    margin: 20px 0;
    padding: 32px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary, #475569);
    background: var(--bg-surface, #fff);
    border: 1px dashed var(--border-subtle, #e2e8f0);
    border-radius: var(--radius-lg, 18px);
}

@media (max-width: 600px) {
    .social-header {
        padding: 14px;
        border-radius: 14px;
    }

    .social-title {
        font-size: 18px;
    }

    .social-btn span {
        display: none;
    }

    .social-btn {
        width: 38px;
        padding: 0;
        justify-content: center;
    }
}
