/* ============================================================
   feed.css — Feed page styles for LegalnyMedyk
   Adapted from Aidrops 3.0 feed/index.html inline styles.
   All rules are scoped to avoid conflicts with main.css.
   ============================================================ */

/* ---- Layout ---- */
.feed-container {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ---- Left Sidebar ---- */
.feed-sidebar-left {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.company-profile-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    text-align: center;
    border: 1px solid #eee;
    transition: border-color 0.2s ease;
}

.company-profile-card:hover {
    border-color: #ddd;
}

.company-logo {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    border-radius: 6px;
    object-fit: contain;
    margin-bottom: 12px;
}

.company-profile-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.subscription-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f0f0;
    color: #666;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid #e0e0e0;
}

/* ---- Main Feed ---- */
.feed-main {
    min-height: 100vh;
}

/* ---- Composer ---- */
.feed-composer {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s ease;
}

.feed-composer:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.composer-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.composer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8B647, #D9A636);
    color: #2B2B2B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(232,182,71,0.3);
}

.composer-input-wrapper {
    flex: 1;
}

.composer-trigger {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #d0d0d0;
    border-radius: 28px;
    background: #fafbfc;
    cursor: pointer;
    text-align: left;
    color: #666;
    font-size: 15px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.composer-trigger:hover {
    background: #e9ecef;
    border-color: #999;
}

.composer-trigger:focus {
    outline: 2px solid #E8B647;
    outline-offset: 2px;
}

.composer-editor {
    display: none;
    margin-top: 16px;
}

.composer-editor.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Post type tabs ---- */
.post-type-tabs {
    display: flex;
    gap: 4px;
    padding: 0 0 12px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 12px;
}

.post-type-tab {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-type-tab:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.post-type-tab.active {
    background: #E8B647;
    color: #2B2B2B;
    border-color: #E8B647;
}

/* ---- LinkedIn embed section ---- */
.linkedin-embed-section {
    display: none;
    padding: 0;
}

.linkedin-embed-section.visible {
    display: block;
}

.linkedin-embed-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.linkedin-iframe-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-family: monospace;
    resize: vertical;
    min-height: 80px;
    background: #fafbfc;
    transition: border-color 0.2s;
}

.linkedin-iframe-input:focus {
    outline: none;
    border-color: #0A66C2;
    background: #fff;
}

.linkedin-embed-hint {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    line-height: 1.4;
}

.linkedin-preview-container {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
}

.linkedin-preview-label {
    font-size: 12px;
    color: #666;
    padding: 8px 12px;
    background: #f0f0f0;
    border-bottom: 1px solid #e5e5e5;
}

.linkedin-preview-container iframe {
    display: block;
    width: 100% !important;
    max-width: 504px;
    margin: 0 auto;
    border: none;
}

/* ---- Formatting toolbar ---- */
.toolbar-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.15s;
    margin-bottom: 6px;
}

.toolbar-toggle:hover {
    background: #f0f0f0;
    color: #555;
}

.toolbar-toggle-icon {
    font-size: 14px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}

.toolbar-toggle.active .toolbar-toggle-icon {
    transform: rotate(180deg);
}

.editor-toolbar {
    display: none;
    gap: 4px;
    padding: 8px 12px;
    background: #fafbfc;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    align-items: center;
}

.editor-toolbar.show {
    display: flex;
    animation: slideDown 0.2s ease;
}

.toolbar-group {
    display: flex;
    gap: 2px;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: #e5e5e5;
    margin: 0 4px;
}

.toolbar-btn {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
    min-width: 30px;
    text-align: center;
}

.toolbar-btn:hover {
    background: #eee;
    color: #333;
}

.toolbar-btn.active {
    color: #333;
    background: transparent;
    border-bottom: 2px solid #E8B647;
    border-radius: 4px 4px 0 0;
}

.toolbar-btn:focus,
.composer-richtext:focus {
    outline: 2px solid #E8B647;
    outline-offset: 2px;
}

/* ---- Rich text editor area ---- */
.editor-container {
    display: flex;
    gap: 0;
    background: white;
    min-height: 120px;
}

.editor-pane {
    flex: 1;
    overflow: hidden;
}

.editor-container.split-mode .editor-pane {
    flex: 1;
    border-right: 2px solid #e0e0e0;
}

.editor-container.split-mode .editor-preview-pane {
    border-right: none;
}

.editor-container.preview-mode .editor-edit-pane {
    display: none;
}

.editor-container.preview-mode .editor-preview-pane {
    display: block;
}

.editor-container.split-mode .editor-edit-pane,
.editor-container.split-mode .editor-preview-pane {
    display: block;
}

.composer-richtext {
    width: 100%;
    min-height: 180px;
    max-height: 500px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    cursor: text;
}

.composer-richtext:focus {
    outline: none;
    background: #fafbfc;
    border-color: #E8B647;
    box-shadow: 0 0 0 3px rgba(232,182,71,0.15);
}

.composer-richtext.is-empty::before {
    content: attr(data-placeholder);
    color: #999;
    font-weight: 400;
    pointer-events: none;
    position: absolute;
}

.composer-richtext h2 { font-size: 22px; font-weight: 700; margin: 12px 0 8px; color: #1a1a1a; }
.composer-richtext h3 { font-size: 18px; font-weight: 700; margin: 10px 0 6px; color: #1a1a1a; }
.composer-richtext h4 { font-size: 16px; font-weight: 600; margin: 8px 0 4px; color: #1a1a1a; }
.composer-richtext blockquote {
    border-left: 3px solid #E8B647;
    background: #FEFCF3;
    padding: 8px 14px;
    margin: 8px 0;
    border-radius: 0 4px 4px 0;
    color: #555;
}
.composer-richtext code {
    background: #f6f8fa;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    color: #24292f;
}
.composer-richtext mark {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
}
.composer-richtext a { color: #E8B647; text-decoration: underline; }
.composer-richtext ul, .composer-richtext ol {
    margin: 8px 0;
    padding-left: 24px;
}
.composer-richtext li { margin: 4px 0; }

/* ---- Editor footer stats ---- */
.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: transparent;
    font-size: 12px;
    color: #999;
}

.editor-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.char-counter, .word-counter {
    font-weight: 500;
    color: #666;
}

.char-counter.warning {
    color: #dc3545;
    font-weight: 600;
}

.editor-tips {
    color: #999;
    font-size: 11px;
    font-style: italic;
}

/* ---- Editor action row ---- */
.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 16px;
}

.composer-upload {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-upload {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    color: #666;
}

.btn-upload:hover {
    background: #f0f0f0;
    color: #333;
}

.attachment-preview {
    display: none;
    font-size: 13px;
    color: #2E7D32;
    font-weight: 500;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #E8F5E9;
    border-radius: 16px;
}

.attachment-preview.visible {
    display: flex;
}

.composer-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.btn-post {
    padding: 12px 28px;
    background: #E8B647;
    color: #2B2B2B;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(232,182,71,0.3);
    min-width: 120px;
}

.btn-post:hover {
    background: #D9A636;
    box-shadow: 0 4px 8px rgba(232,182,71,0.4);
    transform: translateY(-1px);
}

.btn-post:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(232,182,71,0.3);
}

.btn-post:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.btn-post.loading {
    position: relative;
    color: transparent;
}

.btn-post.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #2B2B2B;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

.btn-cancel-composer {
    padding: 10px 20px;
    background: transparent;
    color: #666;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-cancel-composer:hover {
    background: #f0f0f0;
    color: #333;
}

/* ---- Posts ---- */
.feed-post {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    transition: border-color 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.feed-post:hover {
    border-color: #e0e0e0;
    border-left-color: #E8B647;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 17px;
    flex-shrink: 0;
}

.author-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.author-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.company-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.company-link:hover {
    color: #E8B647;
    text-decoration: underline;
}

/* ---- Post dropdown ---- */
.post-dropdown {
    position: relative;
}

.post-dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    transition: background 0.2s;
}

.post-dropdown-btn:hover {
    background: #f0f0f0;
}

.post-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: none;
    min-width: 150px;
    z-index: 1000;
}

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

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

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

.post-dropdown-menu button.danger {
    color: #dc3545;
}

.post-dropdown-menu button.danger:hover {
    background: #fff0f0;
}

/* ---- Post content ---- */
.post-content {
    margin-bottom: 18px;
    line-height: 1.75;
    font-size: 15px;
    color: #2c2c2c;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.01em;
}

.post-content p { margin: 0 0 10px 0; }
.post-content p:last-child { margin-bottom: 0; }

.post-content h2, .post-content h3, .post-content h4 {
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
}
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }
.post-content h4 { font-size: 18px; }

.post-content strong { font-weight: 700; color: #1a1a1a; }
.post-content em { font-style: italic; color: #2c2c2c; }

.post-content a {
    color: #E8B647;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}

.post-content a:hover { border-bottom-color: #E8B647; }

.post-content ul, .post-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

.post-content li { margin: 8px 0; line-height: 1.6; }

.post-content blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    border-left: 3px solid #E8B647;
    background: #FEFCF3;
    color: #555;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.post-content code {
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    color: #24292f;
    border: 1px solid #e8e8e8;
}

.post-content mark {
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
}

/* ---- Read more ---- */
.post-content.collapsed {
    max-height: 300px;
    overflow: hidden;
    position: relative;
}

.post-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.read-more-btn {
    background: transparent;
    border: none;
    color: #E8B647;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.read-more-btn:hover {
    background: rgba(232,182,71,0.1);
    color: #D9A636;
}

/* ---- Pinned badge ---- */
.pinned-badge {
    display: inline-block;
    background: #FDF3D7;
    color: #92600a;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    border: 1px solid #E8B647;
}

/* ---- Post attachments ---- */
.post-attachments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 16px;
}

.post-attachment {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    max-height: 380px;
    cursor: pointer;
}

.post-attachment img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.post-attachment.img-clipped::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.95) 100%);
    pointer-events: none;
    border-radius: 0 0 8px 8px;
}

.post-attachment.img-clipped .img-expand-hint { display: block; }

.img-expand-hint {
    display: none;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 14px;
    z-index: 2;
    pointer-events: none;
}

.post-attachment.img-expanded {
    max-height: none;
}

.post-attachment.img-expanded::after { display: none; }
.post-attachment.img-expanded .img-expand-hint { display: none; }

.post-attachment-document {
    padding: 16px 18px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-attachment-document:hover {
    background: #e9ecef;
    border-color: #E8B647;
    box-shadow: 0 2px 8px rgba(232,182,71,0.15);
}

.post-attachment-document a {
    text-decoration: none;
    color: #E8B647;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.post-attachment-document a:hover { color: #D9A636; }

/* ---- LinkedIn embed in post ---- */
.feed-post.linkedin-embed-post .post-linkedin-embed {
    margin: 12px 0 0 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.feed-post.linkedin-embed-post .post-linkedin-embed iframe {
    display: block;
    width: 100% !important;
    max-width: 504px;
    margin: 0 auto;
    border: none;
}

.linkedin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #EBF3FB;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #0A66C2;
    margin-left: 8px;
    vertical-align: middle;
}

/* ---- Product attachments ---- */
.post-products {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.post-products-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #aaa;
    font-size: 12px;
    font-weight: 500;
}

.post-products-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}

.product-attachment {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #fafbfc;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.15s ease;
    border: 1px solid #eee;
}

.product-attachment:hover {
    background: #f5f6f8;
    border-color: #ddd;
}

.product-attachment img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.product-attachment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.product-attachment h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.product-attachment .description {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    flex: 1;
}

.product-attachment .price {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #2E7D32;
    background: #E8F5E9;
    padding: 2px 10px;
    border-radius: 10px;
    width: fit-content;
}

.product-attachment-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.btn-view-product {
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    font-family: inherit;
    background: white;
    color: #555;
}

.btn-view-product:hover {
    background: #f0f0f0;
    border-color: #bbb;
    color: #333;
}

/* ---- Post footer / reactions ---- */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #f5f5f5;
}

.post-reactions-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reactions-summary {
    display: flex;
    align-items: center;
    gap: 6px;
}

.emoji-stack {
    display: flex;
    align-items: center;
}

.emoji-stack .emoji-bubble {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0f2f5;
    border: 1.5px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    margin-left: -5px;
}

.emoji-stack .emoji-bubble:first-child { margin-left: 0; }

.reactions-summary .total-count {
    font-size: 13px;
    color: #65676b;
    font-weight: 500;
}

/* Reaction trigger */
.reaction-trigger-wrap { position: relative; }

.reaction-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    color: #65676b;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.15s ease;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

.reaction-trigger-btn:hover { background: #f0f2f5; }

.reaction-trigger-emoji { font-size: 18px; line-height: 1; }
.reaction-trigger-label { font-size: 14px; }

.reaction-trigger-btn.has-reaction[data-reaction="valuable"]         { color: #7c3aed; }
.reaction-trigger-btn.has-reaction[data-reaction="inspiring"]         { color: #b45309; }
.reaction-trigger-btn.has-reaction[data-reaction="practical"]         { color: #047857; }
.reaction-trigger-btn.has-reaction[data-reaction="business_potential"]{ color: #dc2626; }
.reaction-trigger-btn.has-reaction[data-reaction="unconvincing"]      { color: #6b7280; }

/* Reaction picker popup */
.reaction-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #fff;
    border-radius: 40px;
    padding: 4px 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex;
    gap: 2px;
    opacity: 0;
    transform: translateY(8px) scale(0.8);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4,0,0.2,1),
                transform 0.25s cubic-bezier(0.4,0,0.2,1),
                visibility 0.25s;
    z-index: 200;
    white-space: nowrap;
}

.reaction-picker.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
}

.reaction-pick-item {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 28px;
    padding: 6px 4px;
    line-height: 1;
    transition: transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reaction-pick-item:hover {
    transform: scale(1.35) translateY(-6px);
}

.reaction-pick-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e2e;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 201;
}

.reaction-pick-item:hover::after { opacity: 1; }

@keyframes reactionPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ---- Post footer right actions ---- */
.post-footer-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.feed-show-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.feed-show-btn:hover {
    background: rgba(232,182,71,0.1);
    color: #E8B647;
}

.btn-report {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.btn-report:hover {
    color: #dc3545;
    background: #fff0f0;
}

/* ---- Edit post form ---- */
.edit-post-form { margin: 12px 0; }

.edit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 10px;
}

.edit-textarea:focus {
    outline: none;
    border-color: #E8B647;
}

.edit-actions { display: flex; gap: 10px; }

.btn-save, .btn-edit-cancel {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save { background: #2E7D32; color: white; }
.btn-save:hover { background: #1B5E20; }
.btn-edit-cancel { background: #6c757d; color: white; }
.btn-edit-cancel:hover { background: #5a6268; }

/* ---- Load more ---- */
.btn-load-more {
    display: block;
    margin: 20px auto;
    width: auto;
    padding: 10px 32px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.15s ease;
}

.btn-load-more:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #333;
}

/* ---- Right Sidebar ---- */
.feed-sidebar-right {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.news-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.news-widget h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.news-widget-empty {
    padding: 16px 0;
    text-align: center;
    color: #bbb;
    font-size: 13px;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        #fafafa 8px,
        #fafafa 16px
    );
    border-radius: 6px;
    border: 1px dashed #e0e0e0;
}

/* ---- Notification toast ---- */
.feed-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.feed-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.feed-notification-success { background: #2E7D32; color: white; }
.feed-notification-error   { background: #C0392B; color: white; }
.feed-notification-info    { background: #1D4ED8; color: white; }

/* ---- Loading state ---- */
.feed-posts-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    gap: 12px;
    color: #888;
    font-size: 14px;
}

.feed-posts-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #E8B647;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.feed-posts-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.feed-posts-empty p { font-size: 15px; margin: 8px 0 0 0; }

/* ---- Report modal ---- */
.feed-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.feed-modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
}

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

.feed-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.feed-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.feed-form-group { margin-bottom: 16px; }

.feed-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.feed-form-group select,
.feed-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.feed-form-group select:focus,
.feed-form-group textarea:focus {
    outline: none;
    border-color: #E8B647;
}

.feed-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-modal-cancel {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-modal-submit {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-modal-submit:hover { background: #c82333; }

/* ---- Product selector modal ---- */
.ps-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ps-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ps-modal {
    position: relative;
    z-index: 10001;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 820px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: psModalIn 0.25s ease-out;
}

@keyframes psModalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ps-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #E8B647 0%, #D9A636 100%);
    flex-shrink: 0;
}

.ps-header-icon {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #2B2B2B;
    flex-shrink: 0;
}

.ps-header-text { flex: 1; }
.ps-header-text h3 { margin: 0; font-size: 19px; font-weight: 700; color: #2B2B2B; }
.ps-header-sub { font-size: 13px; color: rgba(43,43,43,0.7); }

.ps-close {
    width: 36px; height: 36px;
    border: none;
    background: rgba(43,43,43,0.15);
    color: #2B2B2B;
    font-size: 22px;
    cursor: pointer;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.ps-close:hover { background: rgba(43,43,43,0.25); }

.ps-search {
    position: relative;
    padding: 16px 24px 0;
    flex-shrink: 0;
}

.ps-search-icon {
    position: absolute;
    left: 38px; top: 50%;
    transform: translateY(-50%);
    margin-top: 8px;
    color: #D1D1D1;
    pointer-events: none;
}

.ps-search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid #D1D1D1;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #2B2B2B;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ps-search input:focus {
    outline: none;
    border-color: #E8B647;
    box-shadow: 0 0 0 3px rgba(232,182,71,0.1);
}

.ps-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    min-height: 200px;
    max-height: 420px;
}

.ps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.ps-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 12px;
}

.ps-empty p { margin: 0; font-size: 15px; color: #6B6B6B; }

.ps-card {
    position: relative;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    overflow: hidden;
}

.ps-card:hover {
    border-color: #E8B647;
    box-shadow: 0 4px 16px rgba(232,182,71,0.15);
    transform: translateY(-2px);
}

.ps-card.selected {
    border-color: #E8B647;
    background: rgba(232,182,71,0.06);
}

.ps-card-check {
    position: absolute;
    top: 10px; right: 10px;
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid #D1D1D1;
    background: white;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.ps-card.selected .ps-card-check {
    border-color: #E8B647;
    background: #E8B647;
    color: white;
}

.ps-card-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: #F5F5F5;
}

.ps-card-body { padding: 12px; }

.ps-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #2B2B2B;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ps-card-desc {
    font-size: 12px;
    color: #6B6B6B;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ps-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #D9A636;
}

.ps-card-badge {
    display: inline-block;
    background: rgba(232,182,71,0.15);
    color: #D9A636;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
    vertical-align: middle;
}

.ps-selected {
    padding: 12px 24px;
    border-top: 1px solid #E8E8E8;
    background: #F5F5F5;
    flex-shrink: 0;
}

.ps-selected-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B6B6B;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.ps-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ps-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E8B647;
    color: #2B2B2B;
    padding: 4px 10px 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.ps-chip-remove {
    background: none;
    border: none;
    color: #4A4A4A;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.ps-chip-remove:hover { opacity: 1; }

.ps-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #E8E8E8;
    flex-shrink: 0;
}

.ps-counter { font-size: 13px; font-weight: 500; color: #6B6B6B; }

.ps-footer-actions { display: flex; gap: 10px; }

.ps-btn-cancel {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #D1D1D1;
    background: #fff;
    color: #4A4A4A;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ps-btn-cancel:hover {
    background: #F5F5F5;
    border-color: #6B6B6B;
}

.ps-btn-confirm {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #E8B647;
    background: #E8B647;
    color: #2B2B2B;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ps-btn-confirm:hover {
    background: #D9A636;
    border-color: #D9A636;
    box-shadow: 0 4px 12px rgba(232,182,71,0.3);
}

/* ---- Feed lightbox ---- */
.feed-lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 5000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feed-lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.feed-lightbox-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 720px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.3s ease;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.feed-lightbox-overlay.active .feed-lightbox-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.feed-lightbox-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 12px 0 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.06);
    color: #2B2B2B;
    font-size: 22px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 2;
    line-height: 1;
}

.feed-lightbox-close:hover { background: rgba(0,0,0,0.12); }

.feed-lightbox-body { padding: 32px; }

.feed-lightbox-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.feed-lightbox-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #E8B647;
    color: #2B2B2B;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.feed-lightbox-author { font-weight: 600; font-size: 16px; color: #2B2B2B; }
.feed-lightbox-company { font-size: 13px; color: #888; }
.feed-lightbox-date { font-size: 12px; color: #aaa; margin-left: auto; flex-shrink: 0; }

.feed-lightbox-content {
    font-size: 15px;
    line-height: 1.7;
    color: #2B2B2B;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.feed-lightbox-attachments {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.feed-lightbox-attachments img {
    width: 100%;
    border-radius: 10px;
    cursor: default;
    max-height: 600px;
    object-fit: contain;
    background: #fafafa;
}

.feed-lightbox-attachments .lightbox-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 10px;
    text-decoration: none;
    color: #2B2B2B;
    transition: background 0.2s;
}

.feed-lightbox-attachments .lightbox-doc:hover { background: #f0f0f0; }

.feed-lightbox-linkedin {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.feed-lightbox-linkedin iframe {
    width: 100%;
    border: none;
    border-radius: 10px;
    min-height: 400px;
}

.feed-lightbox-products { border-top: 1px solid #f0f0f0; padding-top: 16px; }

.feed-lightbox-products-title {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.feed-lightbox-product {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #fafafa;
    margin-bottom: 8px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.feed-lightbox-product:hover { background: #f0f0f0; }

.feed-lightbox-product img {
    width: 80px; height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.feed-lightbox-product-info { flex: 1; min-width: 0; }
.feed-lightbox-product-name { font-weight: 600; font-size: 15px; color: #2B2B2B; margin-bottom: 4px; }
.feed-lightbox-product-desc {
    font-size: 13px; color: #666; margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feed-lightbox-product-price { font-weight: 700; color: #E8B647; font-size: 15px; }
.feed-lightbox-linkedin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0A66C2;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .feed-container {
        grid-template-columns: 200px 1fr 260px;
        gap: 16px;
    }

    .editor-tips { display: none; }
}

@media (max-width: 968px) {
    .feed-container {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .feed-sidebar-left,
    .feed-sidebar-right { display: none; }

    .feed-composer {
        padding: 16px;
        border-radius: 8px;
    }

    .composer-avatar { width: 40px; height: 40px; font-size: 16px; }
    .feed-post { padding: 16px; margin-bottom: 12px; border-radius: 8px; }
    .post-header { margin-bottom: 12px; }
    .author-avatar { width: 40px; height: 40px; font-size: 15px; }
    .author-info h4 { font-size: 14px; }
    .author-info p { font-size: 12px; }
    .post-content { font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
    .post-attachments { grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
    .post-attachment { max-height: 280px; }
    .product-attachment { flex-direction: column; gap: 14px; padding: 16px; }
    .product-attachment img { width: 100%; height: 200px; }
    .product-attachment-actions { flex-direction: column; gap: 8px; }
    .btn-view-product { width: 100%; padding: 10px; justify-content: center; }
    .post-reactions-area { gap: 8px; }
    .reaction-trigger-btn { padding: 6px 10px; font-size: 13px; }
    .reaction-trigger-emoji { font-size: 16px; }
    .editor-toolbar { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
    .toolbar-btn { padding: 6px 10px; font-size: 12px; }
    .toolbar-separator { display: none; }
    .composer-richtext { min-height: 140px; font-size: 14px; padding: 12px; }
    .composer-actions { padding: 12px 0 0 0; margin-top: 12px; }
}

@media (max-width: 640px) {
    .feed-container { padding: 8px; }
    .feed-composer { padding: 12px; border-radius: 8px; margin-bottom: 16px; }
    .composer-header { gap: 8px; }
    .composer-trigger { padding: 12px 16px; font-size: 14px; border-radius: 24px; }
    .feed-post { padding: 12px; margin-bottom: 10px; border-radius: 6px; }
    .post-header { margin-bottom: 10px; }
    .post-author { gap: 10px; }
    .author-avatar { width: 40px; height: 40px; font-size: 15px; }
    .author-info h4 { font-size: 13px; }
    .author-info p { font-size: 11px; }
    .post-content { font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
    .post-content h2 { font-size: 20px; }
    .post-content h3 { font-size: 18px; }
    .post-content h4 { font-size: 16px; }
    .post-attachments { gap: 8px; margin-bottom: 14px; }
    .post-attachment { max-height: 220px; }
    .product-attachment { padding: 12px; gap: 12px; }
    .product-attachment img { height: 180px; }
    .product-attachment h5 { font-size: 15px; }
    .product-attachment .description { font-size: 13px; }
    .product-attachment .price { font-size: 18px; }
    .post-footer { padding-top: 12px; margin-top: 12px; flex-wrap: wrap; gap: 8px; }
    .post-reactions-area { gap: 6px; }
    .reaction-trigger-btn { padding: 5px 8px; font-size: 12px; }
    .reaction-trigger-emoji { font-size: 15px; }
    .reaction-trigger-label { font-size: 12px; }
    .reaction-pick-item { font-size: 24px; padding: 4px 3px; }
    .btn-report { padding: 6px 10px; font-size: 12px; }
    .toolbar-toggle { font-size: 12px; padding: 6px 10px; margin-bottom: 6px; }
    .editor-toolbar { padding: 8px; gap: 4px; }
    .toolbar-group { gap: 3px; }
    .toolbar-btn { padding: 6px 8px; font-size: 11px; min-width: 32px; }
    .composer-richtext { min-height: 120px; font-size: 14px; padding: 10px; }
    .composer-actions { flex-direction: column; gap: 10px; padding: 10px 0 0 0; margin-top: 10px; }
    .composer-upload { width: 100%; justify-content: space-around; gap: 6px; }
    .composer-footer { width: 100%; justify-content: space-between; }
    .btn-upload { font-size: 12px; padding: 8px 10px; flex: 1; justify-content: center; }
    .btn-post { flex: 1; padding: 10px 20px; font-size: 14px; }
    .btn-cancel-composer { flex: 1; padding: 10px 16px; }
    .editor-stats { gap: 8px; font-size: 10px; }
    .editor-footer { padding: 6px 0; }
    .editor-tips { display: none; }
    .feed-lightbox-overlay { padding: 20px 10px; }
    .feed-lightbox-modal { max-width: 100%; border-radius: 12px; }
    .feed-lightbox-body { padding: 20px; }
    .feed-lightbox-product { flex-direction: column; }
    .feed-lightbox-product img { width: 100%; height: 180px; }
    .ps-overlay { padding: 12px; }
    .ps-modal { max-width: 100%; max-height: calc(100vh - 24px); border-radius: 10px; }
    .ps-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .ps-card-img { height: 100px; }
    .ps-header { padding: 16px 18px; }
}

@media (max-width: 480px) {
    .feed-lightbox-body { padding: 16px; }
    .feed-lightbox-header { flex-wrap: wrap; }
    .feed-lightbox-date { width: 100%; margin-left: 60px; margin-top: -4px; }
    .post-type-tabs { gap: 4px; }
    .post-type-tab { font-size: 12px; padding: 5px 10px; }
}

/* ============================================================
   Additional components — generated for Django template
   ============================================================ */

/* ---- Feed filters ---- */
.feed-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.feed-filter-btn {
    padding: 7px 18px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.feed-filter-btn:hover {
    border-color: #E8B647;
    color: #2B2B2B;
}

.feed-filter-btn.active {
    background: #E8B647;
    border-color: #E8B647;
    color: #2B2B2B;
    font-weight: 600;
}

/* ---- Feed empty / error states ---- */
.feed-empty-state,
.feed-error-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.feed-empty-state i,
.feed-error-state i {
    display: block;
    margin-bottom: 12px;
}

.feed-empty-state p,
.feed-error-state p {
    font-size: 15px;
}

.feed-error-state button {
    background: none;
    border: none;
    color: #E8B647;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
}

/* ---- Skeleton loading ---- */
.feed-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-post {
    height: 160px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 8px;
    border: 1px solid #eee;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Sidebar widgets ---- */
.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #eee;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sidebar-widget-title {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

.sidebar-widget-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ---- Activity stats (right sidebar) ---- */
.activity-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.activity-stat-label {
    color: #666;
}

.activity-stat-value {
    font-weight: 600;
    color: #2B2B2B;
}

/* ---- Feed stats card (left sidebar) ---- */
.feed-stats-card {
    background: white;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
    border: 1px solid #eee;
    display: flex;
    gap: 16px;
}

.feed-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.feed-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #2B2B2B;
}

.feed-stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ---- Generic modals (report, etc.) ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-select:focus,
.form-textarea:focus {
    border-color: #E8B647;
    outline: none;
    box-shadow: 0 0 0 3px rgba(232,182,71,0.15);
}

.form-error {
    color: #C0392B;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #FFEBEE;
    border-radius: 4px;
}

.btn-secondary {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.btn-danger {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #C0392B;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #962d22;
}

.btn-primary {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #E8B647;
    color: #2B2B2B;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #D9A636;
}

/* ---- Lightbox container ---- */
.feed-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1;
    padding: 0;
    color: #333;
}

.lightbox-close:hover {
    background: #f5f5f5;
}

/* ---- Composer extras ---- */
.composer-error {
    margin: 8px 16px 0;
    padding: 8px 12px;
    background: #FFEBEE;
    border-radius: 4px;
    font-size: 13px;
    color: #C0392B;
}

.composer-success {
    margin: 8px 16px 0;
    padding: 8px 12px;
    background: #E8F5E9;
    border-radius: 4px;
    font-size: 13px;
    color: #2E7D32;
    font-weight: 600;
}

.composer-char-count {
    text-align: right;
    font-size: 11px;
    color: #aaa;
    padding: 4px 16px;
}

/* ---- Inline post editor ---- */
.post-inline-editor {
    border: 1px solid #E8B647;
    border-radius: 6px;
    padding: 10px 14px;
    min-height: 80px;
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    margin-bottom: 8px;
}

.post-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 8px;
}

/* ---- User avatar (no company) ---- */
.user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8B647, #D9A636);
    color: #2B2B2B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 12px;
}

/* ---- Company logo placeholder ---- */
.company-logo-placeholder {
    width: 80px;
    height: 40px;
    border-radius: 6px;
    background: linear-gradient(135deg, #E8B647, #D9A636);
    color: #2B2B2B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin: 0 auto 12px;
}

/* ---- Product selector items ---- */
.ps-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 6px;
}

.ps-item:hover {
    border-color: #E8B647;
    background: rgba(232,182,71,0.05);
}

.ps-item.selected {
    border-color: #E8B647;
    background: rgba(232,182,71,0.1);
}

.ps-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.ps-item-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #aaa;
    flex-shrink: 0;
}

.ps-item.selected .ps-item-check {
    background: #E8B647;
    color: #2B2B2B;
}

.ps-loading,
.ps-empty {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-size: 14px;
}

.ps-footer {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ps-footer #psSelectedCount {
    font-size: 13px;
    color: #666;
}

/* ---- Attachment & product chips in composer ---- */
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 14px;
    font-size: 12px;
    color: #444;
    margin: 4px 4px 0 0;
}

.attachment-chip-remove,
.product-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.attachment-chip-remove:hover,
.product-chip-remove:hover {
    color: #C0392B;
}

.product-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(232,182,71,0.12);
    border: 1px solid rgba(232,182,71,0.4);
    border-radius: 14px;
    font-size: 12px;
    color: #5a4200;
    margin: 4px 4px 0 0;
}

.composer-products {
    padding: 8px 16px 0;
}

/* ---- Attachment display in posts ---- */
.post-attachment-img {
    margin-bottom: 10px;
}

.post-attachment-img img {
    max-width: 100%;
    border-radius: 6px;
    cursor: zoom-in;
}

.post-attachment-video video {
    max-width: 100%;
    border-radius: 6px;
}

.post-attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
}

.post-attachment-file:hover {
    background: #ebebeb;
}

/* ---- Products in posts ---- */
.post-products {
    margin: 12px 0;
    padding: 12px;
    background: rgba(232,182,71,0.06);
    border: 1px solid rgba(232,182,71,0.2);
    border-radius: 6px;
}

.post-products-title {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.post-product-chip {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(232,182,71,0.15);
    border-radius: 12px;
    font-size: 13px;
    color: #5a4200;
    margin: 3px 4px 3px 0;
}

/* ---- Post badges ---- */
.post-pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #E8B647;
    font-weight: 600;
    margin-left: 6px;
}

.post-edited-badge {
    font-size: 11px;
    color: #aaa;
    font-style: italic;
    margin-left: 6px;
}

/* ---- Post content variants ---- */
.post-content-html {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    word-break: break-word;
}

.post-content-html h1, .post-content-html h2, .post-content-html h3,
.post-content-html h4, .post-content-html h5 {
    margin: 12px 0 8px;
}

.post-content-html ul, .post-content-html ol {
    padding-left: 20px;
    margin: 8px 0;
}

.post-content-html a {
    color: #D9A636;
    text-decoration: underline;
}

.post-content-text {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---- LinkedIn embed ---- */
.linkedin-embed-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.linkedin-embed-wrapper iframe {
    width: 100%;
    display: block;
}

/* ---- Post author avatar ---- */
.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8B647, #D9A636);
    color: #2B2B2B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.post-author-company {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* ---- Composer editor ---- */
.composer-editor {
    min-height: 100px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    border: none;
    font-family: inherit;
}

.composer-editor:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
}

/* ---- LinkedIn input in composer ---- */
.linkedin-embed-input {
    padding: 16px;
}

.linkedin-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0077B5;
}

.linkedin-url-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.linkedin-url-input:focus {
    border-color: #0077B5;
    outline: none;
}

.linkedin-hint {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* ---- Composer footer / submit ---- */
.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
    gap: 12px;
    flex-wrap: wrap;
}

.composer-actions {
    display: flex;
    gap: 4px;
}

.composer-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    color: #888;
    font-size: 16px;
    transition: background 0.15s, color 0.15s;
}

.composer-action-btn:hover {
    background: #f5f5f5;
    color: #555;
}

.composer-submit-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-cancel-compose {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-cancel-compose:hover {
    background: #f5f5f5;
}

.btn-publish {
    padding: 8px 22px;
    border: none;
    border-radius: 6px;
    background: #E8B647;
    color: #2B2B2B;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-publish:hover {
    background: #D9A636;
}

.btn-publish:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
