/* Standardized Social Engagement Styles */

.ig-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 6px;
    border-top: 1px solid var(--border-default);
}

.ig-modal-actions-left { display: flex; gap: 14px; align-items: center; }

.ig-modal-action-btn {
    background: none; border: none;
    color: var(--text-primary);
    font-size: 22px; cursor: pointer;
    padding: 0; display: flex;
    transition: opacity 0.2s;
}
.ig-modal-action-btn:hover { opacity: 0.6; }

.ig-modal-likes {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0 16px 8px;
}

/* Comment Input Row */
.ig-modal-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-default);
    background: var(--surface-page);
}
.ig-modal-input-row img {
    width: 32px; height: 32px;
    border-radius: 50%; object-fit: cover; flex-shrink: 0;
}

.ig-modal-input {
    flex: 1;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    padding: 4px 0;
}
.ig-modal-input::placeholder { color: var(--text-secondary); }

.ig-modal-post-btn {
    background: none; border: none;
    color: #0095f6;
    font-size: 13px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
}
.ig-modal-post-btn:disabled { opacity: 0.3; cursor: default; }

/* Comment Context Menus (Ellipsis) */
.ig-comment-more-container { position: relative; }
.ig-comment-more-menu {
    position: absolute; left: 50%; top: 20px;
    transform: translateX(-50%);
    background: var(--surface-raised);
    border: 1px solid var(--border-default);
    border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none; flex-direction: column; z-index: 100; min-width: 100px;
    overflow: hidden;
}
.ig-comment-more-menu.show { display: flex; }
.ig-comment-more-item {
    padding: 8px 12px; font-size: 13px; color: var(--text-primary);
    cursor: pointer; transition: background 0.2s; text-align: left;
    display: flex; align-items: center; gap: 8px;
}
.ig-comment-more-item:hover { background: rgba(128,128,128,0.1); }
.ig-comment-more-item.delete { color: #ed4956; }

/* Nested Replies Indentation */
.nested-replies {
    margin-top: 12px;
    padding-left: 12px;
}


.ig-comment-content {
    word-break: break-word;
}

/* Instagram-style Share Modal for Gallery */
.gallery-share-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.gallery-share-overlay.show { display: flex; }

.gallery-share-modal {
    background: var(--surface-raised);
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gallery-share-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gallery-share-header h5 {
    font-size: 16px; font-weight: 600; color: var(--text-primary);
}
.gallery-share-close {
    background: none; border: none; font-size: 24px;
    color: var(--text-secondary); cursor: pointer;
}

.gallery-share-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 20px 16px;
}

.share-grid-item {
    background: none; border: none;
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    cursor: pointer; transition: transform 0.2s;
}
.share-grid-item:hover { transform: scale(1.05); }

.share-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white;
}
.share-icon.facebook { background: #1877F2; }
.share-icon.twitter { background: #000000; }
.share-icon.whatsapp { background: #25D366; }
.share-icon.copy { background: #6c757d; }
.share-icon.linkedin { background: #0A66C2; }
.share-icon.reddit { background: #FF4500; }
.share-icon.mail { background: #EA4335; }
.share-icon.messenger { background: #0084FF; }
.share-icon.viber { background: #7360F2; }

.share-grid-item span {
    font-size: 11px; color: var(--text-secondary);
    font-weight: 500;
}

/* Colorless Gallery Icons (except like) */
.insta-icon-btn i.fa-heart, .insta-icon-btn svg.fa-heart {
    color: inherit;
}

/* Force ALL liked heart icons to be red, regardless of the button class */
.liked i.fa-heart, 
.liked svg.fa-heart,
.insta-icon-btn.liked i.fa-heart, 
.insta-icon-btn.liked svg.fa-heart,
.reaction-btn.liked i.fa-heart,
.reaction-btn.liked svg.fa-heart,
.action-btn.liked i.fa-heart,
.action-btn.liked svg.fa-heart,
.comment-heart-btn.liked i, 
.comment-heart-btn.liked svg {
    color: #ef4444 !important;
}

.insta-icon-btn.shared i {
    color: var(--text-primary) !important;
}

/* Comment & Reply Heart Colors */
.comment-heart-btn {
    background: none; border: none; padding: 0;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: center; justify-content: center;
}
.comment-heart-btn i, .comment-heart-btn svg {
    font-size: 12px; color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Global QR Modal Styles */
.qr-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 10001;
    text-align: center;
    color: #333;
}
.qr-modal.show { display: block; }
.qr-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
}
.qr-overlay.show { display: block; }


