/* static/css/social-share.css */
/* Social Share Buttons - Platform-specific sharing */

/* Share Buttons Container */
.social-share-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.social-share-container.horizontal {
    flex-direction: row;
    justify-content: center;
}

.social-share-container.vertical {
    flex-direction: column;
    align-items: stretch;
}

/* Base Social Share Button */
.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
    min-width: 44px;
    min-height: 44px;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-share-btn:active {
    transform: translateY(0);
}

.social-share-btn i {
    font-size: 1.1rem;
}

/* Icon-only mode */
.social-share-btn.icon-only {
    padding: 10px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

.social-share-btn.icon-only .btn-text {
    display: none;
}

/* WhatsApp */
.social-share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.social-share-btn.whatsapp:hover {
    background: linear-gradient(135deg, #2be371, #169d8d);
}

/* Facebook */
.social-share-btn.facebook {
    background: linear-gradient(135deg, #1877F2, #0d5cbf);
}

.social-share-btn.facebook:hover {
    background: linear-gradient(135deg, #3d8cf4, #1470e4);
}

/* Telegram */
.social-share-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.social-share-btn.telegram:hover {
    background: linear-gradient(135deg, #1a9fe0, #0099e6);
}

/* Instagram */
.social-share-btn.instagram {
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
}

.social-share-btn.instagram:hover {
    background: linear-gradient(135deg, #9544c8, #f04a80, #ff9052);
}

/* Copy Link */
.social-share-btn.copy-link {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.social-share-btn.copy-link:hover {
    background: linear-gradient(135deg, #7d868f, #5a6268);
}

.social-share-btn.copy-link.copied {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

/* Native Share (fallback) */
.social-share-btn.native-share {
    background: linear-gradient(90deg, #a855f7, #ec4899);
}

.social-share-btn.native-share:hover {
    background: linear-gradient(90deg, #b970f9, #f04da1);
}

/* Share Modal Overlay */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Share Modal Content */
.share-modal {
    background: #1f2937;
    border-radius: 16px;
    padding: 24px;
    max-width: 380px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid #374151;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.share-modal-overlay.active .share-modal {
    transform: scale(1);
}

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

.share-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #f3f4f6;
}

.share-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.share-modal-close:hover {
    color: #f3f4f6;
}

/* Preview in modal */
.share-modal-preview {
    text-align: center;
    margin-bottom: 20px;
}

.share-modal-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #374151;
}

.share-modal-preview p {
    margin: 10px 0 0 0;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* Share options grid */
.share-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.share-options-grid .social-share-btn {
    width: 100%;
    padding: 12px 16px;
}

/* Full width option */
.share-options-grid .social-share-btn.full-width {
    grid-column: span 2;
}

/* Toast notification */
.share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: #f3f4f6;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1100;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: 1px solid #374151;
}

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

.share-toast.success {
    border-color: #22c55e;
}

.share-toast.error {
    border-color: #ef4444;
}

/* Compact mode for card actions */
.social-share-compact {
    display: flex;
    gap: 6px;
}

.social-share-compact .social-share-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    min-width: 36px;
    min-height: 36px;
}

.social-share-compact .social-share-btn i {
    font-size: 1rem;
}

.social-share-compact .social-share-btn.icon-only {
    width: 36px;
    height: 36px;
    padding: 6px;
}

/* Responsive */
@media (max-width: 480px) {
    .share-options-grid {
        grid-template-columns: 1fr;
    }

    .share-options-grid .social-share-btn.full-width {
        grid-column: span 1;
    }

    .share-modal {
        padding: 18px;
        width: 95%;
    }
}
