/**
 * Social Share Styles
 * Lightweight styles for funeral notice sharing functionality
 * @since 2.4.0
 */

/* Share Button */
.wfn-share-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--wfn-color-primary, #2c5282);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border-radius: 4px;
}

.wfn-share-button:hover,
.wfn-share-button:focus {
    color: var(--wfn-color-secondary, #1a365d);
    background: rgba(0, 0, 0, 0.05);
    outline: none;
}

.wfn-share-button:focus-visible {
    outline: 2px solid var(--wfn-color-primary, #2c5282);
    outline-offset: 2px;
}

.wfn-share-button .wfn-share-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

/* Share Menu Popup */
.wfn-share-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px;
    min-width: 160px;
    z-index: 1000;
    animation: wfnShareMenuSlideIn 0.2s ease-out;
}

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

.wfn-share-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #1a202c !important;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.wfn-share-menu-item:hover,
.wfn-share-menu-item:focus {
    background: #f7fafc !important;
    color: #1a202c !important;
    outline: none;
}

.wfn-share-menu-item:focus-visible {
    background: #edf2f7;
    box-shadow: 0 0 0 2px var(--wfn-color-primary, #2c5282) inset;
}

/* Share Menu Icons - SVG with Brand Colors */
.wfn-share-icon-facebook,
.wfn-share-icon-email,
.wfn-share-icon-sms,
.wfn-share-icon-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wfn-share-icon-facebook svg,
.wfn-share-icon-email svg,
.wfn-share-icon-sms svg,
.wfn-share-icon-whatsapp svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.wfn-share-icon-facebook {
    /* Facebook blue #1877F2 */
    color: #1877F2;
}

.wfn-share-icon-email {
    /* Neutral gray for email */
    color: #5E6C84;
}

.wfn-share-icon-sms {
    /* iOS Messages green */
    color: #34C759;
}

.wfn-share-icon-whatsapp {
    /* WhatsApp green #25D366 */
    color: #25D366;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wfn-share-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .wfn-share-menu-item {
        padding: 12px 16px;
        font-size: 16px; /* Larger tap targets on mobile */
    }
}

/* Print styles - hide share button when printing */
@media print {
    .wfn-share-button,
    .wfn-share-menu {
        display: none !important;
    }
}
