/* Share Feature Styles for Mahanama */

/* Share icon button on paragraphs */
.share-icon-btn {
    position: absolute;
    right: -32px;
    top: 4px;
    width: 24px;
    height: 24px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-size: 12px;
}

p:hover .share-icon-btn {
    opacity: 1;
}

.share-icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-focus);
    transform: scale(1.1);
}

/* Share modal overlay */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

/* Share modal */
.share-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

/* Close button */
.share-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.share-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Modal title */
.share-modal-title {
    margin: 0 0 var(--space-md) 0;
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 400;
}

/* Preview text */
.share-modal-preview {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    font-style: italic;
    max-height: 120px;
    overflow-y: auto;
}

/* Share buttons container */
.share-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Individual share button */
.share-btn-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn-option:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
    transform: translateX(4px);
}

.share-btn-option i {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.share-btn-option span {
    flex: 1;
    text-align: left;
}

/* Platform-specific colors */
.share-btn-x:hover i {
    color: #000000;
}

.share-btn-ig:hover i {
    color: #E4405F;
}

.share-btn-threads:hover i {
    color: #000000;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive design */
@media (max-width: 640px) {
    .share-modal {
        width: 95%;
        padding: var(--space-lg);
    }
    
    .share-icon-btn {
        right: -28px;
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .share-btn-option {
        padding: var(--space-sm) var(--space-md);
    }
    
    .share-btn-option i {
        font-size: 20px;
        width: 28px;
    }
}

/* For very small screens, show icon below paragraph */
@media (max-width: 480px) {
    .share-icon-btn {
        position: static;
        display: inline-flex;
        margin-left: var(--space-xs);
        opacity: 0.7;
    }
    
    p:hover .share-icon-btn {
        opacity: 1;
    }
}