/**
 * FIP Share Component Styles
 * Social sharing buttons and UI components
 */

/* ===========================
   SHARE BUTTONS - General
   =========================== */

.fip-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    min-width: 120px;
}

.fip-share-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

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

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

/* ===========================
   MODERN ICON-ONLY DESIGN
   =========================== */

.fip-share-modern {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fip-share-modern .share-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fip-share-modern .share-header svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #6B7280;
}

.fip-share-icon-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fip-share-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fip-share-icon-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

.fip-share-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fip-share-icon-btn:active {
    transform: scale(1.05);
}

/* Tooltip on hover */
.fip-share-icon-btn::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #1F2937;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.fip-share-icon-btn:hover::after {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Platform-specific colors */
.fip-share-whatsapp {
    background-color: #25D366;
}

.fip-share-whatsapp:hover {
    background-color: #1da851;
}

.fip-share-facebook {
    background-color: #1877F2;
}

.fip-share-facebook:hover {
    background-color: #145dbf;
}

.fip-share-linkedin {
    background-color: #0A66C2;
}

.fip-share-linkedin:hover {
    background-color: #084d92;
}

.fip-share-twitter,
.fip-share-x {
    background-color: #000000;
}

.fip-share-twitter:hover,
.fip-share-x:hover {
    background-color: #1a1a1a;
}

.fip-share-instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.fip-share-instagram:hover {
    background: linear-gradient(45deg, #d67d2b 0%,#ce5a34 25%,#c41f3b 50%,#b41b5e 75%,#a4107a 100%);
}

.fip-share-tiktok {
    background-color: #000000;
    border: 2px solid #00f2ea;
}

.fip-share-tiktok:hover {
    background-color: #00f2ea;
}

.fip-share-tiktok svg {
    filter: drop-shadow(1px 1px 0 #fe2c55);
}

.fip-share-copy {
    background-color: #6B7280;
}

.fip-share-copy:hover {
    background-color: #4B5563;
}

/* ===========================
   SHARE SECTION - Prominent
   =========================== */

.share-results-section {
    background: linear-gradient(135deg, #EEF2FF 0%, #F3E8FF 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.share-results-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.share-results-section p {
    color: #6B7280;
    margin-bottom: 1.5rem;
}

.share-results-section .fip-share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .share-results-section {
        padding: 1.5rem;
    }

    .share-results-section h3 {
        font-size: 1.25rem;
    }

    .share-results-section .fip-share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================
   SHARE BAR - Minimal
   =========================== */

.fip-share-bar-minimal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.fip-share-bar-minimal .label {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
}

.fip-share-bar-minimal .fip-share-btn {
    padding: 0.5rem;
    min-width: auto;
    border-radius: 0.375rem;
}

.fip-share-bar-minimal .fip-share-btn span {
    display: none;
}

.fip-share-bar-minimal .fip-share-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* ===========================
   SHARE MODAL
   =========================== */

.fip-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.fip-share-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.fip-share-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.fip-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.fip-share-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.fip-share-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.fip-share-close:hover {
    background-color: #F3F4F6;
    color: #111827;
}

.fip-share-modal .fip-share-buttons {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.fip-share-modal .fip-share-btn {
    width: 100%;
}

@media (max-width: 640px) {
    .fip-share-modal .fip-share-buttons {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   FLOATING SHARE BUTTON (Mobile)
   =========================== */

.fip-share-fab {
    position: fixed;
    bottom: 5rem;
    right: 1rem;
    z-index: 1000;
    background-color: #4F46E5;
    color: white;
    border: none;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fip-share-fab svg {
    width: 1.5rem;
    height: 1.5rem;
}

.fip-share-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.fip-share-fab:active {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .fip-share-fab {
        display: none;
    }
}

/* ===========================
   TOAST NOTIFICATION
   =========================== */

.fip-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #10B981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    z-index: 10000;
    transform: translateY(150%);
    transition: transform 0.3s ease;
}

.fip-toast.show {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .fip-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        text-align: center;
    }
}

/* ===========================
   PRODUCT SIDEBAR SHARE
   =========================== */

.product-share-sidebar {
    background-color: #F9FAFB;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.product-share-sidebar h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
}

.product-share-sidebar .fip-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-share-sidebar .fip-share-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.product-share-sidebar .fip-share-btn svg {
    width: 1rem;
    height: 1rem;
}

/* ===========================
   SHARE ICON ONLY (Compact)
   =========================== */
/* Removed duplicate - using modern icon design from above */

/* ===========================
   UTILITIES
   =========================== */

.fip-share-divider {
    height: 1px;
    background-color: #E5E7EB;
    margin: 1rem 0;
}

.fip-share-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 0.5rem;
    display: block;
}

/* Loading state */
.fip-share-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.fip-share-btn.loading::after {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
