/**
 * Vision IA Community - Styles
 * Design inspiré de Skool
 */

/* Variables */
:root {
    --vic-primary: #4F46E5;
    --vic-primary-hover: #4338CA;
    --vic-gray-50: #F9FAFB;
    --vic-gray-100: #F3F4F6;
    --vic-gray-200: #E5E7EB;
    --vic-gray-300: #D1D5DB;
    --vic-gray-400: #9CA3AF;
    --vic-gray-500: #6B7280;
    --vic-gray-600: #4B5563;
    --vic-gray-700: #374151;
    --vic-gray-800: #1F2937;
    --vic-gray-900: #111827;
    --vic-white: #FFFFFF;
    --vic-success: #10B981;
    --vic-warning: #F59E0B;
    --vic-danger: #EF4444;
    --vic-border-radius: 12px;
    --vic-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --vic-shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Wrapper - Fond gris clair comme Skool */
.vic-community-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--vic-gray-100);
    min-height: 100vh;
}

/* Forcer le fond gris sur le conteneur parent */
body .vic-community-wrapper,
.stm-lms-wrapper .vic-community-wrapper {
    background: var(--vic-gray-100);
}

/* Create Post Box - Style compact comme Skool */
.vic-create-post-box {
    background: var(--vic-white);
    border-radius: 50px;
    padding: 10px 12px 10px 18px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--vic-gray-200);
}

.vic-create-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vic-create-post-header img,
.vic-create-post-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
}

.vic-create-post-trigger {
    flex: 1;
    padding: 10px 16px;
    background: var(--vic-gray-100);
    border: none;
    border-radius: 24px;
    text-align: left;
    color: var(--vic-gray-500);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.vic-create-post-trigger:hover {
    background: var(--vic-gray-200);
}

/* Post Form */
.vic-create-post-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--vic-gray-200);
}

.vic-input,
.vic-textarea,
.vic-select-category {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--vic-gray-200);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.vic-input:focus,
.vic-textarea:focus,
.vic-select-category:focus {
    outline: none;
    border-color: var(--vic-primary);
}

.vic-input-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--vic-primary);
    border: none;
    padding: 8px 0;
    margin-bottom: 8px;
}

.vic-input-title::placeholder {
    color: var(--vic-primary);
    opacity: 0.6;
}

.vic-textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 16px;
}

.vic-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.vic-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.vic-btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--vic-gray-500);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.vic-btn-icon:hover {
    background: var(--vic-gray-100);
    color: var(--vic-gray-700);
}

.vic-select-category {
    width: auto;
    min-width: 180px;
    padding: 8px 12px;
    font-size: 14px;
}

.vic-form-submit {
    display: flex;
    gap: 12px;
}

.vic-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.vic-btn-cancel {
    background: var(--vic-white);
    color: var(--vic-gray-600);
    border: 1px solid var(--vic-gray-300);
}

.vic-btn-cancel:hover {
    background: var(--vic-gray-100);
}

.vic-btn-primary {
    background: var(--vic-gray-300);
    color: var(--vic-gray-600);
}

.vic-btn-primary:hover,
.vic-btn-primary.active {
    background: var(--vic-primary);
    color: var(--vic-white);
}

/* Search Box - Caché par défaut, s'ouvre avec le bouton loupe */
.vic-search-box {
    margin-bottom: 0;
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.vic-search-box.vic-search-open {
    display: block;
    margin-bottom: 16px;
}

.vic-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.vic-search-icon {
    display: none;
}

.vic-search-input {
    width: 100%;
    padding: 12px 16px 12px 16px;
    border: 1px solid var(--vic-gray-200);
    border-radius: 24px;
    font-size: 14px;
    background: var(--vic-gray-50);
    transition: all 0.2s ease;
}

.vic-search-input:focus {
    outline: none;
    border-color: var(--vic-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: var(--vic-white);
}

.vic-search-input::placeholder {
    color: var(--vic-gray-400);
}

.vic-search-clear {
    position: absolute;
    right: 12px;
    background: var(--vic-gray-200);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--vic-gray-500);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vic-search-clear:hover {
    background: var(--vic-gray-300);
    color: var(--vic-gray-700);
}

/* Bouton Loupe dans les filtres */
.vic-search-toggle-btn {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--vic-gray-200);
    background: var(--vic-white);
    color: var(--vic-gray-600);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vic-search-toggle-btn:hover {
    background: var(--vic-gray-100);
}

.vic-search-toggle-btn.active {
    background: var(--vic-primary);
    color: var(--vic-white);
    border-color: var(--vic-primary);
}

/* Filters - Style Skool */
.vic-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: none;
    align-items: center;
}

.vic-filter-btn {
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid var(--vic-gray-200);
    background: var(--vic-white);
    color: var(--vic-gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vic-filter-btn:hover {
    background: var(--vic-gray-50);
    border-color: var(--vic-gray-300);
}

.vic-filter-btn.active {
    background: var(--vic-gray-900);
    color: var(--vic-white);
    border-color: var(--vic-gray-900);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Author Filter Banner */
.vic-author-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 1px solid #C7D2FE;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #4338CA;
}

.vic-author-filter-banner strong {
    font-weight: 600;
}

.vic-clear-filter {
    color: #6366F1;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.vic-clear-filter:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #4338CA;
}

/* Post Card - Style Skool identique */
.vic-post-card {
    background: var(--vic-white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--vic-gray-200);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.vic-post-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Post d'administrateur avec liseré jaune/doré */
.vic-post-card.vic-admin-post {
    border: 2px solid #F59E0B;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.vic-post-card.vic-admin-post:hover {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

/* Badge épinglé - Style Skool exact (juste icône + texte) */
.vic-pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    color: var(--vic-gray-500);
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    position: absolute;
    top: 24px;
    right: 24px;
    box-shadow: none;
}

/* Ajouter position relative sur la carte pour le badge */
.vic-post-card {
    position: relative;
}

/* Post Layout with thumbnail */
.vic-post-body {
    display: flex;
    gap: 16px;
}

.vic-post-main {
    flex: 1;
    min-width: 0;
}

.vic-post-thumbnail {
    width: 130px;
    height: 95px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--vic-gray-100);
    margin-top: 32px;
}

.vic-post-thumbnail img,
.vic-post-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vic-post-thumbnail-youtube {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vic-gray-900);
}

.vic-post-thumbnail-youtube::after {
    content: '';
    width: 40px;
    height: 40px;
    background: red;
    border-radius: 8px;
    position: absolute;
}

.vic-post-thumbnail-youtube::before {
    content: '';
    position: absolute;
    z-index: 1;
    border-left: 14px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 4px;
}

.vic-post-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.vic-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Container pour l'avatar avec badge de niveau */
.vic-author-avatar-wrapper {
    position: relative;
    display: inline-block;
}

/* Avatar with level badge - Skool style */
.vic-avatar-with-level {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.vic-level-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3B82F6;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Author name row with status icon */
.vic-author-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vic-status-icon {
    font-size: 14px;
    line-height: 1;
}

/* Legacy - keep for backwards compatibility */
.vic-author-level-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #3B82F6;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    border: 2px solid white;
    line-height: 1.2;
}

/* User points badge - legacy */
.vic-user-points {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.vic-author-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.vic-author-meta {
    display: flex;
    flex-direction: column;
}

.vic-author-name {
    font-weight: 600;
    color: var(--vic-gray-900);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Badges de vérification à côté du nom */
.vic-verified-badge {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
}

.vic-badge-diamond {
    color: #3B82F6;
}

.vic-badge-star {
    color: #F59E0B;
}

.vic-post-meta {
    font-size: 13px;
    color: var(--vic-gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.vic-category-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--vic-gray-100);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--vic-gray-600);
    border: 1px solid var(--vic-gray-200);
}

.vic-post-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--vic-gray-900);
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 30px;
}

.vic-post-title a {
    color: var(--vic-gray-900);
    text-decoration: none;
}

.vic-post-title a:hover {
    color: var(--vic-primary);
}

.vic-post-excerpt {
    color: var(--vic-gray-600);
    font-family: Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 1.5;
    margin: 0;
    /* Line clamp géré par Elementor */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* Post Footer - Style Skool */
.vic-post-footer {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding-top: 0;
    border-top: none;
}

.vic-like-btn,
.vic-comment-btn,
.vic-pin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border: none;
    background: none;
    color: var(--vic-gray-500);
    cursor: pointer;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.vic-like-btn:hover,
.vic-comment-btn:hover {
    background: var(--vic-gray-100);
}

/* Comment button styling */
.vic-comment-btn svg {
    width: 20px;
    height: 20px;
    color: var(--vic-gray-400);
}

/* Like button - gris par défaut, jaune/orange quand liké */
.vic-like-btn svg {
    width: 20px;
    height: 20px;
    color: var(--vic-gray-400);
    fill: none;
    stroke: currentColor;
}

.vic-like-btn .vic-like-count {
    color: var(--vic-gray-600);
}

.vic-like-btn.liked {
    color: #F59E0B;
}

.vic-like-btn.liked svg {
    fill: #F59E0B;
    color: #F59E0B;
    stroke: #F59E0B;
}

.vic-like-btn.liked .vic-like-count {
    color: #F59E0B;
}

.vic-pin-btn.pinned {
    color: var(--vic-warning);
}

.vic-like-count,
.vic-comment-count {
    font-weight: 500;
    font-size: 15px;
    color: var(--vic-gray-600);
}

/* Commenters avatars - Style Skool (à gauche avec likes/comments) */
.vic-commenters {
    display: flex;
    align-items: center;
    margin-left: 16px;
    gap: 8px;
}

.vic-commenters-avatars {
    display: flex;
    align-items: center;
}

.vic-commenters-avatars img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--vic-white);
    margin-left: -6px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1;
}

.vic-commenters-avatars img:first-child {
    margin-left: 0;
}

.vic-last-comment {
    font-size: 14px;
    color: #3B82F6;
    font-weight: 500;
    white-space: nowrap;
}

/* Style Skool pour "Nouveau commentaire il y a X" - BLEU */
.vic-last-comment a,
.vic-new-comment-link {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
}

.vic-last-comment a:hover,
.vic-new-comment-link:hover {
    text-decoration: underline;
}

/* Menu trois points */
.vic-post-menu {
    margin-left: 4px;
}

/* ========================================
   MODAL POPUP STYLES
   ======================================== */

.vic-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.vic-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.vic-modal {
    background: var(--vic-white);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.vic-modal-overlay.active .vic-modal {
    transform: translateY(0);
}

/* Modal Header */
.vic-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--vic-gray-200);
    position: sticky;
    top: 0;
    background: var(--vic-white);
    z-index: 10;
}

.vic-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vic-modal-header-left img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.vic-modal-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vic-modal-author-info .vic-modal-title {
    margin: 0;
    font-size: 15px;
}

.vic-modal-author-info .vic-post-meta {
    font-size: 13px;
    color: #6B7280;
}

.vic-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--vic-gray-900);
    margin: 0;
}

.vic-modal-actions {
    display: flex;
    gap: 8px;
}

.vic-modal-action-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--vic-gray-500);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.vic-modal-action-btn:hover {
    background: var(--vic-gray-100);
    color: var(--vic-gray-700);
}

.vic-modal-close {
    font-size: 24px;
    line-height: 1;
}

/* Modal Content */
.vic-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.vic-modal-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--vic-gray-500);
}

.vic-modal-post-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--vic-gray-900);
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.vic-modal-post-content {
    color: var(--vic-gray-700);
    font-size: 15px;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.vic-modal-post-content p {
    margin: 0 0 16px 0;
    white-space: pre-wrap;
}

.vic-modal-post-content a {
    color: var(--vic-primary);
}

/* Modal Media */
.vic-modal-media {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
}

.vic-modal-media img {
    width: 100%;
    height: auto;
    display: block;
}

.vic-modal-media iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 12px;
}

/* Modal Post Actions */
.vic-modal-post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--vic-gray-200);
    border-bottom: 1px solid var(--vic-gray-200);
    margin: 20px 0;
}

/* Comments Section */
.vic-comments-section {
    margin-top: 20px;
}

.vic-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.vic-comments-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--vic-gray-900);
}

.vic-jump-latest {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--vic-gray-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.vic-jump-latest:hover {
    background: var(--vic-gray-100);
}

/* Single Comment */
.vic-comment {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--vic-gray-100);
}

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

.vic-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

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

.vic-comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--vic-gray-900);
}

.vic-comment-date {
    font-size: 12px;
    color: var(--vic-gray-500);
}

.vic-comment-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--vic-gray-700);
}

.vic-comment-content p {
    margin: 0;
}

.vic-comment-content img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
}

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

/* Comment Like Button */
.vic-comment-like-btn,
.vic-comment-reply-btn {
    background: none;
    border: none;
    font-size: 13px;
    color: var(--vic-gray-500);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vic-comment-like-btn:hover,
.vic-comment-reply-btn:hover {
    background: var(--vic-gray-100);
    color: var(--vic-gray-700);
}

.vic-comment-like-btn.liked {
    color: var(--vic-primary);
    background: rgba(79, 70, 229, 0.1);
}

.vic-comment-like-count {
    font-weight: 500;
}

/* Reply Form */
.vic-reply-form-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--vic-gray-100);
}

.vic-reply-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.vic-reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vic-reply-input-wrapper {
    flex: 1;
    background: var(--vic-gray-100);
    border-radius: 16px;
    padding: 10px 14px;
}

.vic-reply-input {
    width: 100%;
    border: none;
    background: none;
    font-size: 13px;
    resize: none;
    min-height: 18px;
    max-height: 100px;
    font-family: inherit;
    color: var(--vic-gray-900);
}

.vic-reply-input:focus {
    outline: none;
}

.vic-reply-input::placeholder {
    color: var(--vic-gray-500);
}

.vic-reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.vic-reply-cancel,
.vic-reply-submit {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.vic-reply-cancel {
    background: none;
    color: var(--vic-gray-600);
}

.vic-reply-cancel:hover {
    background: var(--vic-gray-200);
}

.vic-reply-submit {
    background: var(--vic-primary);
    color: var(--vic-white);
}

.vic-reply-submit:hover {
    background: var(--vic-primary-hover);
}

/* Nested Replies */
.vic-comment-replies {
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid var(--vic-gray-200);
}

.vic-comment-reply {
    padding: 12px 0;
}

.vic-comment-reply .vic-comment-avatar {
    width: 28px;
    height: 28px;
}

.vic-comment-reply .vic-comment-replies {
    padding-left: 12px;
}

/* Depth-based styling */
.vic-comment-reply .vic-comment-reply .vic-comment-replies {
    border-left-color: var(--vic-gray-100);
}

.vic-comment-action {
    background: none;
    border: none;
    font-size: 13px;
    color: var(--vic-gray-500);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.vic-comment-action:hover {
    background: var(--vic-gray-100);
    color: var(--vic-gray-700);
}

/* Comment Form - Skool Style */
.vic-comment-form-wrapper-skool {
    background: var(--vic-white);
    padding: 12px 20px 16px;
    border-top: 1px solid var(--vic-gray-200);
    margin: 20px -20px -20px -20px;
}

.vic-comment-form-skool {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vic-comment-avatar-skool {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vic-comment-input-skool-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--vic-white);
    border: 1px solid var(--vic-gray-300);
    border-radius: 24px;
    padding: 8px 12px;
    gap: 8px;
}

.vic-comment-input-skool-wrapper:focus-within {
    border-color: var(--vic-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.vic-comment-input-skool {
    flex: 1;
    border: none;
    background: none;
    font-size: 14px;
    font-family: inherit;
    color: var(--vic-gray-900);
    min-width: 0;
}

.vic-comment-input-skool:focus {
    outline: none;
}

.vic-comment-input-skool::placeholder {
    color: var(--vic-gray-400);
}

.vic-comment-tools-skool {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.vic-comment-tool-skool {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--vic-gray-400);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vic-comment-tool-skool:hover {
    color: var(--vic-gray-600);
}

/* Send button for Skool-style comments */
.vic-comment-submit-skool {
    background: var(--vic-primary);
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    color: white;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.vic-comment-submit-skool:hover {
    background: var(--vic-primary-dark, #4338ca);
    transform: scale(1.05);
}

.vic-comment-submit-skool:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Upload progress bar */
.vic-upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--vic-gray-100);
    border-radius: 8px;
    margin: 12px 0;
}

/* Barre de progression dans le formulaire de post */
#vic-new-post-form .vic-upload-progress {
    margin-bottom: 16px;
}

.vic-upload-progress-track {
    flex: 1;
    height: 8px;
    background: var(--vic-gray-200);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.vic-upload-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--vic-primary), #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Animation pulsante pendant le traitement serveur */
.vic-upload-progress.processing .vic-upload-progress-bar {
    animation: pulse-progress 1.5s ease-in-out infinite;
}

.vic-upload-progress.processing .vic-upload-progress-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes pulse-progress {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.vic-upload-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--vic-primary);
    min-width: 80px;
    text-align: right;
}

/* YouTube embed in comments */
.vic-youtube-embed-link {
    display: block;
    text-decoration: none !important;
    margin: 10px 0;
    max-width: 400px;
}

.vic-youtube-embed {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.vic-youtube-embed-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.vic-youtube-embed-link:hover .vic-youtube-embed-thumb {
    transform: scale(1.05);
    opacity: 0.8;
}

.vic-youtube-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.vic-youtube-embed-link:hover .vic-youtube-play-overlay {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.vic-youtube-play-overlay svg {
    margin-left: 4px;
}

.vic-comment-submit-skool svg {
    stroke: white;
}

/* Legacy comment form styles (kept for backwards compatibility) */
.vic-comment-form-wrapper {
    background: var(--vic-white);
    padding: 16px 20px;
    border-top: 1px solid var(--vic-gray-200);
    margin: 0 -20px -20px -20px;
}

.vic-comment-form {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.vic-comment-form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vic-comment-input-wrapper {
    flex: 1;
    background: var(--vic-gray-100);
    border-radius: 20px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vic-comment-input {
    border: none;
    background: none;
    font-size: 14px;
    resize: none;
    min-height: 20px;
    max-height: 120px;
    font-family: inherit;
    color: var(--vic-gray-900);
}

.vic-comment-input:focus {
    outline: none;
}

.vic-comment-input::placeholder {
    color: var(--vic-gray-500);
}

.vic-comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vic-comment-form-tools {
    display: flex;
    gap: 4px;
}

.vic-comment-tool-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--vic-gray-500);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.vic-comment-tool-btn:hover {
    background: var(--vic-gray-200);
    color: var(--vic-gray-700);
}

.vic-comment-submit {
    padding: 8px 16px;
    background: var(--vic-primary);
    color: var(--vic-white);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
    pointer-events: none;
}

.vic-comment-submit.active {
    opacity: 1;
    pointer-events: auto;
}

.vic-comment-submit:hover {
    background: var(--vic-primary-hover);
}

/* Comment attachments preview */
.vic-comment-attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vic-comment-attachment-item {
    position: relative;
    background: var(--vic-white);
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.vic-comment-attachment-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

.vic-comment-attachment-remove {
    background: none;
    border: none;
    color: var(--vic-gray-400);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.vic-comment-attachment-remove:hover {
    color: var(--vic-danger);
}

/* Link preview in comments */
.vic-link-preview {
    background: var(--vic-gray-100);
    border: 1px solid var(--vic-gray-200);
}

.vic-link-preview .vic-file-icon {
    font-size: 16px;
}

.vic-link-preview .vic-file-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--vic-primary);
}

/* YouTube preview in comments */
.vic-youtube-preview {
    position: relative;
    padding: 4px;
    background: var(--vic-gray-900);
    border-radius: 8px;
}

.vic-youtube-preview .vic-youtube-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
}

.vic-youtube-preview .vic-youtube-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
    pointer-events: none;
}

.vic-youtube-preview .vic-youtube-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--vic-danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* File icon in attachment preview */
.vic-file-icon {
    font-size: 18px;
    line-height: 1;
}

.vic-file-name {
    color: var(--vic-gray-700);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* No comments */
.vic-no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--vic-gray-500);
}

/* Load More */
.vic-load-more-wrapper {
    text-align: center;
    margin-top: 24px;
}

.vic-btn-load-more {
    padding: 12px 32px;
    background: var(--vic-white);
    border: 1px solid var(--vic-gray-300);
    color: var(--vic-gray-700);
}

.vic-btn-load-more:hover {
    background: var(--vic-gray-100);
}

/* Profile Tab */
.vic-profile-tab {
    padding: 20px;
}

.vic-profile-section {
    margin-bottom: 32px;
}

.vic-profile-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--vic-gray-900);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--vic-primary);
}

.vic-profile-posts-list,
.vic-profile-comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vic-profile-posts-list li,
.vic-profile-comments-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--vic-gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.vic-profile-posts-list a,
.vic-profile-comments-list a {
    color: var(--vic-gray-700);
    text-decoration: none;
    font-weight: 500;
}

.vic-profile-posts-list a:hover,
.vic-profile-comments-list a:hover {
    color: var(--vic-primary);
}

.vic-date {
    font-size: 13px;
    color: var(--vic-gray-400);
}

/* No Posts */
.vic-no-posts {
    text-align: center;
    color: var(--vic-gray-500);
    padding: 40px 20px;
    background: var(--vic-gray-50);
    border-radius: var(--vic-border-radius);
}

/* Loading State */
.vic-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* URL Field */
.vic-url-field {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.vic-url-field input {
    flex: 1;
}

.vic-btn-remove-field {
    background: var(--vic-gray-200);
    border: none;
    border-radius: 8px;
    width: 40px;
    cursor: pointer;
    color: var(--vic-gray-500);
    transition: all 0.2s ease;
}

.vic-btn-remove-field:hover {
    background: var(--vic-danger);
    color: var(--vic-white);
}

/* Attachments Preview (in form) */
.vic-attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.vic-attachments-preview:empty {
    display: none;
}

.vic-preview-item {
    position: relative;
    background: var(--vic-gray-100);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--vic-gray-700);
}

.vic-preview-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.vic-preview-item .vic-remove-file {
    background: none;
    border: none;
    color: var(--vic-gray-400);
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

.vic-preview-item .vic-remove-file:hover {
    color: var(--vic-danger);
}

/* Post Link */
.vic-post-link {
    margin-bottom: 16px;
}

.vic-post-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--vic-gray-100);
    border-radius: 8px;
    color: var(--vic-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.vic-post-link a:hover {
    background: var(--vic-gray-200);
}

/* Attachments in Posts */
.vic-attachments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

/* Dans la modale, les images prennent toute la largeur */
.vic-modal-post-content .vic-attachments {
    display: block;
}

.vic-modal-post-content .vic-attachment {
    margin-bottom: 12px;
}

.vic-attachment {
    border-radius: 8px;
    overflow: hidden;
}

.vic-attachment-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.vic-attachment-image:hover img {
    transform: scale(1.02);
}

.vic-attachment-video {
    background: var(--vic-gray-900);
    border-radius: 8px;
}

.vic-attachment-video video {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.vic-attachment-audio {
    background: var(--vic-gray-100);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vic-attachment-audio audio {
    width: 100%;
}

.vic-audio-filename {
    font-size: 13px;
    color: var(--vic-gray-500);
    word-break: break-all;
}

.vic-attachment-pdf {
    background: var(--vic-gray-100);
    border-radius: 8px;
}

.vic-pdf-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: var(--vic-gray-700);
    text-decoration: none;
    transition: background 0.2s ease;
}

.vic-pdf-link:hover {
    background: var(--vic-gray-200);
}

.vic-pdf-link svg {
    color: var(--vic-danger);
    flex-shrink: 0;
}

.vic-pdf-link span {
    word-break: break-all;
    font-size: 14px;
}

/* Upload Button Active State */
.vic-upload-btn.has-files {
    color: var(--vic-primary);
    background: rgba(79, 70, 229, 0.1);
}

/* Video Embed in Modal */
.vic-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin: 16px 0;
}

.vic-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 640px) {
    .vic-community-wrapper {
        padding: 12px;
    }

    .vic-create-post-box,
    .vic-post-card {
        padding: 16px;
    }

    .vic-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .vic-form-actions {
        justify-content: space-between;
    }

    .vic-form-submit {
        justify-content: flex-end;
    }

    .vic-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .vic-filter-btn {
        flex-shrink: 0;
    }

    .vic-author-info img {
        width: 36px;
        height: 36px;
    }

    .vic-post-title {
        font-size: 15px;
    }

    .vic-post-thumbnail {
        width: 80px;
        height: 60px;
    }

    .vic-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .vic-modal-overlay {
        padding: 10px;
    }

    .vic-commenters {
        display: none;
    }
}

/* ========================================
   COMMENT MENU 3 POINTS
   ======================================== */

.vic-comment-menu {
    position: relative;
    margin-left: auto;
}

.vic-comment-menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--vic-gray-400);
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.vic-comment-menu-trigger:hover {
    background: var(--vic-gray-100);
    color: var(--vic-gray-600);
}

.vic-comment-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--vic-white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 180px;
    overflow: hidden;
}

.vic-comment-menu.active .vic-comment-menu-dropdown {
    display: block;
}

.vic-comment-menu-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--vic-gray-700);
    transition: background 0.2s ease;
}

.vic-comment-menu-dropdown button:hover {
    background: var(--vic-gray-100);
}

.vic-comment-menu-dropdown button:first-child {
    border-bottom: 1px solid var(--vic-gray-100);
}

/* ========================================
   JUMP TO LATEST COMMENT - STICKY
   ======================================== */

.vic-jump-latest-sticky {
    position: sticky;
    bottom: 60px;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    margin: 16px 0 8px 0;
    z-index: 50;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vic-jump-latest-sticky.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.vic-jump-latest {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--vic-white);
    border: 1px solid var(--vic-gray-300);
    border-radius: 24px;
    color: var(--vic-gray-600);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.vic-jump-latest:hover {
    background: var(--vic-gray-50);
    border-color: var(--vic-gray-400);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.vic-jump-latest svg {
    /* Flèche vers le bas */
}

/* ========================================
   EMOJI PICKER - FULL VERSION
   ======================================== */

.vic-emoji-picker-full {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--vic-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 320px;
    max-height: 380px;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Position pour le formulaire de création de post */
.vic-post-emoji-picker,
.vic-post-gif-picker {
    position: absolute;
    bottom: calc(100% + 10px);
    top: auto;
    left: 0;
    right: auto;
    z-index: 9999;
}

/* Preview GIF dans le formulaire de post */
.vic-gif-preview-item {
    position: relative;
    display: inline-block;
}

.vic-gif-preview-item img {
    max-width: 150px;
    max-height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.vic-emoji-search {
    padding: 12px;
    border-bottom: 1px solid var(--vic-gray-200);
}

.vic-emoji-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--vic-gray-300);
    border-radius: 8px;
    font-size: 13px;
    background: var(--vic-gray-50);
}

.vic-emoji-search-input:focus {
    outline: none;
    border-color: var(--vic-primary);
    background: var(--vic-white);
}

.vic-emoji-categories {
    display: flex;
    padding: 8px 12px;
    gap: 4px;
    border-bottom: 1px solid var(--vic-gray-100);
    overflow-x: auto;
}

.vic-emoji-categories button {
    padding: 6px 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-size: 18px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.vic-emoji-categories button:hover {
    background: var(--vic-gray-100);
}

.vic-emoji-categories button.active {
    background: var(--vic-gray-200);
}

.vic-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 8px;
    overflow-y: auto;
    max-height: 250px;
}

.vic-emoji-item,
.vic-edit-comment-emoji-item,
.vic-post-emoji-item {
    cursor: pointer;
    padding: 6px;
    font-size: 22px;
    border-radius: 6px;
    transition: background 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.vic-emoji-item:hover,
.vic-edit-comment-emoji-item:hover,
.vic-post-emoji-item:hover {
    background: var(--vic-gray-100);
}

/* Legacy simple picker */
.vic-emoji-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--vic-white);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 220px;
    z-index: 100;
}

/* ========================================
   GIF PICKER
   ======================================== */

.vic-gif-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 420px;
    background: var(--vic-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vic-gif-header {
    padding: 12px;
    border-bottom: 1px solid var(--vic-gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.vic-gif-search-input {
    flex: 1;
    border: 1px solid var(--vic-gray-300);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    background: var(--vic-gray-50);
}

.vic-gif-search-input:focus {
    outline: none;
    border-color: var(--vic-primary);
    background: var(--vic-white);
}

.vic-gif-powered {
    font-size: 10px;
    color: var(--vic-gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vic-gif-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 8px;
    overflow-y: auto;
    max-height: 340px;
}

.vic-gif-grid img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.vic-gif-grid img:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

.vic-gif-loading {
    text-align: center;
    padding: 20px;
    color: var(--vic-gray-500);
    font-size: 13px;
}

/* ========================================
   UNIFIED COMMENT LIKE BUTTON STYLE
   ======================================== */

.vic-comment-like-btn {
    background: none;
    border: none;
    color: var(--vic-gray-500);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.vic-comment-like-btn:hover {
    background: var(--vic-gray-100);
    color: var(--vic-gray-700);
}

.vic-comment-like-btn.liked {
    color: var(--vic-gray-700);
}

.vic-comment-like-btn.liked svg {
    fill: currentColor;
}

.vic-comment-like-btn svg {
    width: 16px;
    height: 16px;
}

/* Comment tools position relative for emoji picker */
.vic-comment-tools-skool {
    position: relative;
}

/* ========================================
   GIF PREVIEW IN COMMENT FORM
   ======================================== */

.vic-gif-preview-item {
    position: relative;
    display: inline-block;
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 200px;
}

.vic-gif-preview-item img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.vic-gif-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.vic-gif-preview-remove:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* YouTube preview in post creation form */
.vic-youtube-preview-item {
    position: relative;
    display: inline-block;
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 200px;
}

.vic-youtube-preview-item img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.vic-youtube-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    pointer-events: none;
}

/* GIF in comments */
.vic-comment-gif {
    max-width: 300px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 8px;
    display: block;
}

/* GIF in posts */
.vic-post-gif {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    margin: 12px 0;
    display: block;
}

/* GIF thumbnail in post cards */
.vic-gif-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====== POST MENU (Edit/Delete) ====== */
.vic-post-menu {
    position: relative;
    display: inline-block;
}

.vic-post-menu-trigger {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.vic-post-menu-trigger:hover {
    background: #F3F4F6;
    color: #374151;
}

.vic-post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.vic-post-menu-dropdown.show {
    display: block;
}

.vic-post-menu-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background-color 0.2s;
}

.vic-post-menu-dropdown button:hover {
    background: #F3F4F6;
}

.vic-post-menu-dropdown .vic-delete-post {
    color: #EF4444;
}

.vic-post-menu-dropdown .vic-delete-post:hover {
    background: #FEF2F2;
}

/* Post menu in modal */
.vic-modal-post-menu {
    margin-right: 8px;
}

.vic-modal-post-menu .vic-post-menu-dropdown {
    top: 100%;
    right: 0;
}

/* ====== EDIT POST MODAL ====== */
.vic-edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000001; /* Above post modal and activity modal */
}

.vic-edit-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.vic-edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
}

.vic-edit-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.vic-edit-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.vic-edit-modal-close:hover {
    color: #374151;
}

.vic-edit-post-form {
    padding: 20px;
}

.vic-edit-post-form .vic-input-title {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.vic-edit-post-form .vic-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    resize: vertical;
    box-sizing: border-box;
}

.vic-edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.vic-edit-modal-footer .vic-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.vic-edit-modal-footer .vic-btn-cancel {
    background: #F3F4F6;
    color: #374151;
    border: none;
}

.vic-edit-modal-footer .vic-btn-cancel:hover {
    background: #E5E7EB;
}

.vic-edit-modal-footer .vic-btn-primary {
    background: #2563EB;
    color: white;
    border: none;
}

.vic-edit-modal-footer .vic-btn-primary:hover {
    background: #1D4ED8;
}

.vic-edit-modal-footer .vic-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ====== FULL EDIT MODAL (like creation form) ====== */
.vic-edit-modal-full {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.vic-edit-modal-full .vic-edit-post-form {
    padding: 20px;
}

.vic-edit-modal-full .vic-textarea {
    min-height: 120px;
}

/* Edit form footer */
.vic-edit-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.vic-edit-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
}

.vic-edit-form-actions .vic-btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #F3F4F6;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: #6B7280;
}

.vic-edit-form-actions .vic-btn-icon:hover {
    background: #E5E7EB;
    color: #374151;
}

.vic-edit-form-actions .vic-upload-btn {
    cursor: pointer;
}

.vic-edit-form-actions .vic-upload-btn.has-files {
    background: #DBEAFE;
    color: #2563EB;
}

/* URL field in edit modal */
.vic-edit-url-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.vic-edit-url-field .vic-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.vic-edit-url-field .vic-btn-remove-field {
    background: none;
    border: none;
    font-size: 16px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px 8px;
}

.vic-edit-url-field .vic-btn-remove-field:hover {
    color: #EF4444;
}

/* Current attachments in edit modal */
.vic-edit-current-attachments {
    margin: 16px 0;
}

.vic-edit-attachments-label {
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 10px;
}

.vic-edit-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-right: 8px;
    margin-bottom: 8px;
    position: relative;
}

.vic-edit-attachment-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.vic-edit-attachment-item .vic-file-icon {
    font-size: 32px;
}

.vic-edit-attachment-name {
    font-size: 12px;
    color: #6B7280;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vic-remove-existing-attachment,
.vic-remove-edit-gif,
.vic-remove-edit-youtube {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.vic-remove-existing-attachment:hover,
.vic-remove-edit-gif:hover,
.vic-remove-edit-youtube:hover {
    background: #DC2626;
}

/* YouTube preview in edit */
.vic-edit-youtube-preview {
    position: relative;
}

.vic-edit-youtube-preview .vic-youtube-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* New attachments preview in edit */
.vic-edit-attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.vic-edit-attachments-preview .vic-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    position: relative;
}

.vic-edit-attachments-preview .vic-preview-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.vic-edit-attachments-preview .vic-remove-edit-new-file {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading and error states */
.vic-edit-loading,
.vic-edit-error {
    padding: 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
}

.vic-edit-error {
    color: #EF4444;
}

/* Emoji and GIF pickers in edit modal */
.vic-edit-form-actions .vic-emoji-picker-full,
.vic-edit-form-actions .vic-gif-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    z-index: 10001;
}

/* ====== EDIT COMMENT MODAL ====== */
.vic-edit-comment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000001; /* Above post modal and activity modal */
}

.vic-edit-comment-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.vic-edit-comment-modal-body {
    padding: 20px;
    max-height: calc(90vh - 60px);
    overflow-y: auto;
}

.vic-edit-comment-modal .vic-edit-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vic-edit-comment-modal .vic-edit-comment-input {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.vic-edit-comment-modal .vic-edit-comment-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Edit comment form actions */
.vic-edit-comment-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.vic-edit-comment-form-actions .vic-btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #F3F4F6;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: #6B7280;
}

.vic-edit-comment-form-actions .vic-btn-icon:hover {
    background: #E5E7EB;
    color: #374151;
}

.vic-edit-comment-upload-btn {
    cursor: pointer;
}

.vic-edit-comment-upload-btn.has-files {
    background: #DBEAFE;
    color: #2563EB;
}

/* Pickers in edit comment modal */
.vic-edit-comment-form-actions .vic-emoji-picker-full,
.vic-edit-comment-form-actions .vic-gif-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    z-index: 100002;
}

/* GIF preview in edit comment */
.vic-edit-comment-gif-preview {
    position: relative;
}

.vic-edit-comment-gif-preview img {
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.vic-remove-edit-comment-gif {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.vic-remove-edit-comment-gif:hover {
    background: #DC2626;
}

/* New attachments in edit comment modal */
.vic-edit-comment-new-attachments .vic-preview-item {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-right: 8px;
    margin-bottom: 8px;
}

.vic-edit-comment-new-attachments .vic-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #BFDBFE;
}

.vic-edit-comment-new-attachments .vic-remove-edit-comment-new-file {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Legacy inline edit styles (keep for compatibility) */
.vic-edit-comment-cancel,
.vic-edit-comment-save {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vic-edit-comment-cancel {
    background: #F3F4F6;
    color: #374151;
    border: none;
}

.vic-edit-comment-cancel:hover {
    background: #E5E7EB;
}

.vic-edit-comment-save {
    background: #2563EB;
    color: white;
    border: none;
}

.vic-edit-comment-save:hover {
    background: #1D4ED8;
}

.vic-edit-comment-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Report post styling (same as delete) */
.vic-post-menu-dropdown .vic-report-post {
    color: #F59E0B;
}

.vic-post-menu-dropdown .vic-report-post:hover {
    background: #FFFBEB;
}

/* Comment menu delete styling */
.vic-comment-menu-dropdown .vic-delete-comment {
    color: #EF4444;
}

.vic-comment-menu-dropdown .vic-delete-comment:hover {
    background: #FEF2F2;
}

/* Comment menu report styling */
.vic-comment-menu-dropdown .vic-report-comment {
    color: #F59E0B;
}

.vic-comment-menu-dropdown .vic-report-comment:hover {
    background: #FFFBEB;
}

/* ========================================
   Profile Popup on Hover (Skool Style)
   ======================================== */

/* Hoverable elements */
.vic-profile-hover {
    cursor: pointer;
    position: relative;
}

/* Profile Popup Container */
.vic-profile-popup {
    position: fixed;
    z-index: 100001;
    background: var(--vic-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 340px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.vic-profile-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Two-column layout */
.vic-profile-popup-content {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

/* Left column - Avatar with progress ring */
.vic-profile-popup-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.vic-profile-popup-avatar {
    position: relative;
    width: 100px;
    height: 100px;
}

/* Progress ring SVG */
.vic-profile-popup-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    transform: rotate(-90deg);
}

.vic-profile-popup-progress-ring circle {
    fill: none;
    stroke-width: 4;
}

.vic-profile-popup-progress-ring .progress-bg {
    stroke: var(--vic-gray-200);
}

.vic-profile-popup-progress-ring .progress-bar {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.vic-profile-popup-avatar img {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
}

.vic-profile-popup-level-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Level info under avatar */
.vic-profile-popup-level-info {
    text-align: center;
    margin-top: 10px;
}

.vic-profile-popup-level-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--vic-gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.vic-profile-popup-points-info {
    font-size: 12px;
    color: var(--vic-gray-500);
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.vic-profile-popup-points-help {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--vic-gray-200);
    color: var(--vic-gray-500);
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

/* Right column - User info */
.vic-profile-popup-right {
    flex: 1;
    min-width: 0;
}

.vic-profile-popup-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.vic-profile-popup-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--vic-gray-900);
    margin: 0;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vic-profile-popup-verified {
    color: #3B82F6;
    font-size: 16px;
}

.vic-profile-popup-star {
    color: #FBBF24;
    font-size: 16px;
}

/* Active Status */
.vic-profile-popup-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--vic-gray-500);
    margin-bottom: 12px;
}

.vic-profile-popup-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vic-gray-400);
}

.vic-profile-popup-status-dot.active {
    background: #10B981;
}

.vic-profile-popup-online {
    color: #10B981;
    font-weight: 500;
}

/* Bio */
.vic-profile-popup-bio {
    font-size: 14px;
    color: var(--vic-gray-600);
    line-height: 1.5;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action Buttons */
.vic-profile-popup-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--vic-gray-200);
}

.vic-profile-popup-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    border: 1px solid var(--vic-gray-200);
    background: var(--vic-white);
    color: var(--vic-gray-700);
}

.vic-profile-popup-btn:hover {
    background: var(--vic-gray-50);
    border-color: var(--vic-gray-300);
    color: var(--vic-gray-900);
}

.vic-profile-popup-btn-chat {
    background: #FBBF24;
    border-color: #FBBF24;
    color: var(--vic-gray-900);
}

.vic-profile-popup-btn-chat:hover {
    background: #F59E0B;
    border-color: #F59E0B;
}

/* Loading State */
.vic-profile-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
}

.vic-profile-popup-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--vic-gray-200);
    border-top-color: var(--vic-primary);
    border-radius: 50%;
    animation: vic-spin 0.8s linear infinite;
}

@keyframes vic-spin {
    to { transform: rotate(360deg); }
}

/* Comment avatar wrapper */
.vic-comment-avatar-wrapper {
    flex-shrink: 0;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .vic-profile-popup {
        width: 290px;
        padding: 20px;
    }

    .vic-profile-popup-avatar img {
        width: 64px;
        height: 64px;
    }

    .vic-profile-popup-level-badge {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .vic-profile-popup-name {
        font-size: 16px;
    }

    .vic-profile-popup-stats {
        gap: 16px;
    }

    .vic-profile-popup-stat-value {
        font-size: 16px;
    }
}

/* =====================================================
   USER ACTIVITY PAGE STYLES
   ===================================================== */

.vic-user-activity-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Activity Header */
.vic-activity-header {
    margin-bottom: 24px;
}

.vic-activity-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--vic-gray-600);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.vic-activity-back:hover {
    color: var(--vic-gray-900);
}

.vic-activity-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vic-activity-user-info img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.vic-activity-user-details h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--vic-gray-900);
}

.vic-activity-user-level {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

/* Activity Tabs */
.vic-activity-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--vic-gray-200);
    padding-bottom: 0;
}

.vic-activity-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--vic-gray-500);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.vic-activity-tab:hover {
    color: var(--vic-gray-700);
}

.vic-activity-tab.active {
    color: var(--vic-gray-900);
}

.vic-activity-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--vic-gray-900);
}

.vic-tab-count {
    background: var(--vic-gray-100);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 6px;
}

.vic-activity-tab.active .vic-tab-count {
    background: var(--vic-gray-900);
    color: white;
}

/* Activity Items */
.vic-activity-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vic-activity-item {
    background: var(--vic-white);
    border: 1px solid var(--vic-gray-200);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vic-activity-item:hover {
    border-color: var(--vic-gray-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.vic-activity-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.vic-activity-item-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.vic-activity-item-meta {
    flex: 1;
    font-size: 14px;
    color: var(--vic-gray-600);
}

.vic-activity-author {
    font-weight: 600;
    color: var(--vic-gray-900);
}

.vic-activity-context {
    color: var(--vic-gray-500);
}

.vic-activity-context strong {
    color: var(--vic-gray-700);
}

.vic-activity-date {
    color: var(--vic-gray-400);
}

.vic-activity-category {
    background: var(--vic-gray-100);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--vic-gray-600);
}

/* Post Item */
.vic-activity-post-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--vic-gray-900);
    line-height: 1.4;
}

.vic-activity-post-excerpt {
    margin: 0;
    font-size: 14px;
    color: var(--vic-gray-600);
    line-height: 1.5;
}

.vic-activity-item-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--vic-gray-100);
    font-size: 13px;
    color: var(--vic-gray-500);
}

/* Comment Item - Parent Post Preview */
.vic-activity-parent-post {
    background: var(--vic-gray-50);
    border: 1px solid var(--vic-gray-200);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.vic-activity-parent-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.vic-activity-parent-header img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.vic-activity-parent-author {
    font-size: 13px;
    font-weight: 500;
    color: var(--vic-gray-700);
}

.vic-activity-parent-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--vic-gray-800);
}

/* Comment Content */
.vic-activity-comment-content {
    padding-left: 50px;
}

.vic-activity-comment-content p {
    margin: 0;
    font-size: 14px;
    color: var(--vic-gray-700);
    line-height: 1.5;
    background: var(--vic-gray-50);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid var(--vic-primary);
}

/* No Activity */
.vic-no-activity {
    text-align: center;
    padding: 40px;
    color: var(--vic-gray-500);
    font-size: 14px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .vic-user-activity-page {
        padding: 16px;
    }

    .vic-activity-user-info img {
        width: 48px;
        height: 48px;
    }

    .vic-activity-user-details h2 {
        font-size: 20px;
    }

    .vic-activity-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .vic-activity-item-header img {
        width: 32px;
        height: 32px;
    }

    .vic-activity-comment-content {
        padding-left: 0;
    }
}

/* Highlighted comment (when navigating from activity) */
.vic-comment-highlighted {
    background: #FEF3C7 !important;
    border-radius: 8px;
    border-left: 3px solid #F59E0B !important;
    padding-left: 12px !important;
    margin-left: -15px !important;
}

.vic-comment-flash {
    animation: vic-highlight-pulse 2s ease-out;
}

@keyframes vic-highlight-pulse {
    0% { background: #FDE68A; box-shadow: 0 0 20px rgba(245, 158, 11, 0.5); }
    50% { background: #FEF3C7; box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
    100% { background: #FEF3C7; box-shadow: none; }
}

/* =====================================================
   ACTIVITY MODAL STYLES
   ===================================================== */

.vic-activity-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 2000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.vic-activity-modal {
    background: #ffffff !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 600px !important;
    max-height: 80vh !important;
    overflow: hidden !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.vic-activity-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--vic-gray-100);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vic-gray-600);
    transition: all 0.2s;
    z-index: 10;
}

.vic-activity-modal-close:hover {
    background: var(--vic-gray-200);
    color: var(--vic-gray-900);
}

.vic-activity-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--vic-gray-100);
}

.vic-activity-modal-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.vic-activity-modal-user-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--vic-gray-900);
}

.vic-activity-modal .vic-activity-tabs {
    padding: 0 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--vic-gray-200);
}

.vic-activity-modal .vic-activity-content {
    padding: 16px 20px;
    overflow-y: auto;
    max-height: calc(80vh - 180px);
}

.vic-activity-modal .vic-activity-item {
    margin-bottom: 12px;
}

.vic-activity-modal .vic-activity-item:last-child {
    margin-bottom: 0;
}

.vic-activity-modal .vic-activity-item-header img {
    width: 36px;
    height: 36px;
}

.vic-activity-modal .vic-activity-post-title {
    font-size: 15px;
    margin: 0 0 6px;
}

.vic-activity-modal .vic-activity-post-excerpt {
    font-size: 13px;
}

.vic-activity-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

/* Mobile */
@media (max-width: 640px) {
    .vic-activity-modal-overlay {
        padding: 10px;
    }

    .vic-activity-modal {
        max-height: 90vh;
    }

    .vic-activity-modal .vic-activity-content {
        max-height: calc(90vh - 180px);
    }

    .vic-activity-modal-header {
        padding: 16px;
    }

    .vic-activity-modal .vic-activity-tabs {
        padding: 0 16px;
    }

    .vic-activity-modal .vic-activity-content {
        padding: 12px 16px;
    }
}
