/* ═══════════════════════════════════════════════════════════════════
   Social Engagement Styles
   ═══════════════════════════════════════════════════════════════════ */

/* ── Social Bar (in-card) ────────────────────────────────────────── */
.social-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    margin-top: 4px;
}

.social-bar--featured {
    display: inline-flex;
    padding: 0;
    margin: 0;
}

.social-like-btn,
.social-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted, #888);
    transition: all 0.2s ease;
    user-select: none;
}

.social-like-btn:hover,
.social-comment-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #ddd);
    transform: scale(1.05);
}

.social-like-btn.social-liked {
    color: #ff4d6a;
}

.social-like-btn.social-like-loading {
    opacity: 0.5;
    pointer-events: none;
}

.social-like-icon {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-like-btn.social-liked .social-like-icon {
    animation: socialHeartPop 0.4s ease;
}

@keyframes socialHeartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.social-like-count,
.social-comment-count {
    font-size: 12px;
    font-weight: 500;
    min-width: 12px;
}

.social-comment-btn svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.social-comment-btn:hover svg {
    opacity: 1;
}

/* ── Comment Panel (slide-in overlay) ────────────────────────────── */
.social-comment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: flex-end;
}

.social-comment-overlay.active {
    opacity: 1;
}

.social-comment-panel {
    width: min(460px, 90vw);
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #e8e8e8;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.social-comment-overlay.active .social-comment-panel {
    transform: translateX(0);
}

.social-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.social-comment-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
}

.social-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #aaa;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ── Comment List ────────────────────────────────────────────────── */
.social-comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.social-comment-list::-webkit-scrollbar {
    width: 5px;
}

.social-comment-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.social-loading,
.social-empty {
    text-align: center;
    color: #888;
    padding: 40px 0;
    font-size: 14px;
}

/* ── Individual Comment ──────────────────────────────────────────── */
.social-comment {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.social-comment:last-child {
    border-bottom: none;
}

.social-comment--reply {
    margin-left: 40px;
    padding: 8px 0;
}

.social-comment-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}

.social-comment--reply .social-comment-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 11px;
}

.social-comment-body {
    flex: 1;
    min-width: 0;
}

.social-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.social-comment-author {
    font-weight: 600;
    font-size: 13px;
    color: #e0e0ff;
}

.social-comment-time {
    font-size: 11px;
    color: #666;
}

.social-comment-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #d0d0d0;
    word-break: break-word;
}

.social-comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.social-reply-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.social-reply-btn:hover {
    background: rgba(102, 126, 234, 0.12);
    color: #8ea0f4;
}

.social-reply-count {
    font-size: 11px;
    color: #666;
}

.social-replies {
    margin-top: 4px;
}

/* ── Reply Input Area ────────────────────────────────────────────── */
.social-reply-input-area {
    margin-top: 8px;
}

.social-reply-textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 48px;
    transition: border-color 0.2s;
}

.social-reply-textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* ── Comment Input ───────────────────────────────────────────────── */
.social-comment-input-area {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#social-comment-input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    transition: border-color 0.2s;
}

#social-comment-input:focus {
    outline: none;
    border-color: #667eea;
}

.social-submit-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.social-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}

.social-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.social-submit-btn--reply {
    padding: 6px 14px;
    font-size: 12px;
    margin-top: 6px;
    border-radius: 8px;
}

.social-login-prompt {
    margin: 0;
    text-align: center;
    color: #888;
    font-size: 14px;
    width: 100%;
    padding: 4px 0;
}

.social-login-prompt a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.social-login-prompt a:hover {
    text-decoration: underline;
}

/* ── Toast Notifications ─────────────────────────────────────────── */
.social-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 450px;
    text-align: center;
    pointer-events: none;
}

.social-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.social-toast--info {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #e0e0ff;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.social-toast--error {
    background: linear-gradient(135deg, #2e1a1a, #3e1616);
    color: #ffe0e0;
    border: 1px solid rgba(234, 102, 102, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ── Mobile Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .social-comment-panel {
        width: 100vw;
    }

    .social-comment-header,
    .social-comment-list,
    .social-comment-input-area {
        padding-left: 16px;
        padding-right: 16px;
    }

    .social-comment--reply {
        margin-left: 20px;
    }

    .social-bar {
        gap: 8px;
    }
}
