/**
 * WAEN Social Share Styles
 * 
 * Unified styling for social share buttons across all post types
 * 
 * @package WAEN_Features
 * @since 1.2.0
 */

/* Container */
.waen-social-share {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin: 30px 0 0 0;
    padding: 20px 0 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: transparent;
}

/* Title */
.waen-share-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--waen-social-primary, var(--waen-primary-color, #1a75ac));
    margin: 0;
    white-space: nowrap;
    display: block;
    width: 100%;
}

/* Buttons container */
.waen-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Base button styles */
.waen-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
    /* Default: Primary color background with low opacity, primary color icon */
    background-color: rgba(var(--waen-primary-rgb, 26, 117, 172), 0.15);
    color: var(--waen-social-primary, var(--waen-primary-color, #1a75ac));
}

.waen-share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.waen-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
}

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

/* Labels */
.waen-share-label {
    display: none;
    margin-right: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* With Labels variant */
.waen-social-share.with-labels .waen-share-btn {
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 6px;
}

.waen-social-share.with-labels .waen-share-label {
    display: inline;
}

/* ==================== */
/* Style: Colored */
/* ==================== */
.waen-social-share.style-colored .waen-share-btn {
    background-color: rgba(var(--waen-primary-rgb, 26, 117, 172), 0.15);
    color: var(--waen-social-primary, var(--waen-primary-color, #1a75ac));
}

/* Hover colors for each network - set via inline styles from PHP */
.waen-social-share.style-colored .waen-share-btn.facebook:hover {
    background-color: #1877f2;
    color: #fff;
}

.waen-social-share.style-colored .waen-share-btn.twitter:hover {
    background-color: #000000;
    color: #fff;
}

.waen-social-share.style-colored .waen-share-btn.linkedin:hover {
    background-color: #0a66c2;
    color: #fff;
}

.waen-social-share.style-colored .waen-share-btn.whatsapp:hover {
    background-color: #25d366;
    color: #fff;
}

.waen-social-share.style-colored .waen-share-btn.telegram:hover {
    background-color: #0088cc;
    color: #fff;
}

.waen-social-share.style-colored .waen-share-btn.pinterest:hover {
    background-color: #e60023;
    color: #fff;
}

.waen-social-share.style-colored .waen-share-btn.email:hover {
    background-color: #ea4335;
    color: #fff;
}

.waen-social-share.style-colored .waen-share-btn.copy:hover {
    background-color: #6c757d;
    color: #fff;
}

/* ==================== */
/* Style: Outline */
/* ==================== */
.waen-social-share.style-outline .waen-share-btn {
    background-color: transparent;
    border: 2px solid rgba(var(--waen-primary-rgb, 26, 117, 172), 0.3);
    color: var(--waen-social-primary, var(--waen-primary-color, #1a75ac));
}

.waen-social-share.style-outline .waen-share-btn.facebook:hover {
    background-color: #1877f2;
    border-color: #1877f2;
    color: #fff;
}

.waen-social-share.style-outline .waen-share-btn.twitter:hover {
    background-color: #000000;
    border-color: #000000;
    color: #fff;
}

.waen-social-share.style-outline .waen-share-btn.linkedin:hover {
    background-color: #0a66c2;
    border-color: #0a66c2;
    color: #fff;
}

.waen-social-share.style-outline .waen-share-btn.whatsapp:hover {
    background-color: #25d366;
    border-color: #25d366;
    color: #fff;
}

.waen-social-share.style-outline .waen-share-btn.telegram:hover {
    background-color: #0088cc;
    border-color: #0088cc;
    color: #fff;
}

.waen-social-share.style-outline .waen-share-btn.pinterest:hover {
    background-color: #e60023;
    border-color: #e60023;
    color: #fff;
}

.waen-social-share.style-outline .waen-share-btn.email:hover {
    background-color: #ea4335;
    border-color: #ea4335;
    color: #fff;
}

.waen-social-share.style-outline .waen-share-btn.copy:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* ==================== */
/* Style: Minimal */
/* ==================== */
.waen-social-share.style-minimal .waen-share-btn {
    background-color: transparent;
    border: none;
    color: var(--waen-social-primary, var(--waen-primary-color, #1a75ac));
    width: 36px;
    height: 36px;
}

.waen-social-share.style-minimal .waen-share-btn.facebook:hover {
    background-color: rgba(24, 119, 242, 0.1);
    color: #1877f2;
}

.waen-social-share.style-minimal .waen-share-btn.twitter:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000000;
}

.waen-social-share.style-minimal .waen-share-btn.linkedin:hover {
    background-color: rgba(10, 102, 194, 0.1);
    color: #0a66c2;
}

.waen-social-share.style-minimal .waen-share-btn.whatsapp:hover {
    background-color: rgba(37, 211, 102, 0.1);
    color: #25d366;
}

.waen-social-share.style-minimal .waen-share-btn.telegram:hover {
    background-color: rgba(0, 136, 204, 0.1);
    color: #0088cc;
}

.waen-social-share.style-minimal .waen-share-btn.pinterest:hover {
    background-color: rgba(230, 0, 35, 0.1);
    color: #e60023;
}

.waen-social-share.style-minimal .waen-share-btn.email:hover {
    background-color: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

.waen-social-share.style-minimal .waen-share-btn.copy:hover {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.waen-social-share.style-minimal.with-labels .waen-share-btn {
    padding: 6px 12px;
}

/* ==================== */
/* Style: Primary (using theme primary color) */
/* ==================== */
.waen-social-share.style-primary .waen-share-btn {
    background-color: rgba(var(--waen-primary-rgb, 26, 117, 172), 0.15);
    color: var(--waen-social-primary, var(--waen-primary-color, #1a75ac));
}

.waen-social-share.style-primary .waen-share-btn:hover {
    background-color: var(--waen-social-primary, var(--waen-primary-color, #1a75ac));
    color: #fff;
}

/* ==================== */
/* Copy button feedback */
/* ==================== */
.waen-share-btn.copy.copied {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
}

/* ==================== */
/* Responsive Design */
/* ==================== */
@media (max-width: 768px) {
    .waen-social-share {
        gap: 12px;
        padding: 15px 0 0 0;
        margin: 20px 0 0 0;
    }
    
    .waen-share-title {
        margin: 0 0 3px 0;
    }
    
    .waen-share-buttons {
        justify-content: flex-start;
        width: 100%;
    }
    
    .waen-share-btn {
        width: 38px;
        height: 38px;
    }
    
    .waen-share-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .waen-social-share.with-labels .waen-share-btn {
        padding: 6px 12px;
    }
    
    .waen-share-label {
        font-size: 12px;
    }
}

/* ==================== */
/* RTL Support (Persian) */
/* ==================== */
[dir="rtl"] .waen-social-share,
html:lang(fa) .waen-social-share,
html:lang(ar) .waen-social-share {
    direction: rtl;
}

[dir="rtl"] .waen-share-label,
html:lang(fa) .waen-share-label,
html:lang(ar) .waen-share-label {
    margin-right: 0;
    margin-left: 6px;
}

/* ==================== */
/* Position variants - Optional custom styling */
/* ==================== */

/* Floating style (bottom-right fixed) */
.waen-social-share.style-floating {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: auto;
    margin: 0;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    z-index: 999;
    flex-direction: column;
    gap: 8px;
}

.waen-social-share.style-floating .waen-share-title {
    font-size: 12px;
    margin: 0;
}

.waen-social-share.style-floating .waen-share-buttons {
    flex-direction: column;
    gap: 6px;
}

.waen-social-share.style-floating .waen-share-btn {
    width: 36px;
    height: 36px;
}

[dir="rtl"] .waen-social-share.style-floating,
html:lang(fa) .waen-social-share.style-floating,
html:lang(ar) .waen-social-share.style-floating {
    left: auto;
    right: 20px;
}

@media (max-width: 768px) {
    .waen-social-share.style-floating {
        bottom: 10px;
        left: 10px;
        padding: 8px;
    }
    
    .waen-social-share.style-floating .waen-share-btn {
        width: 32px;
        height: 32px;
    }
    
    [dir="rtl"] .waen-social-share.style-floating,
    html:lang(fa) .waen-social-share.style-floating,
    html:lang(ar) .waen-social-share.style-floating {
        left: auto;
        right: 10px;
    }
}
