/* =============================================================================
   SHARE COMPONENT STYLES
   Add this to both styles.css and archive-styles.css
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Share Bar - Horizontal/Vertical button group
   ----------------------------------------------------------------------------- */

.share-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

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

.share-bar-icons-only .share-btn-label {
    display: none;
}

.share-bar-icons-only .share-btn {
    padding: 8px;
}

/* -----------------------------------------------------------------------------
   Share Buttons
   ----------------------------------------------------------------------------- */

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #fff;
    background: #374151;
}

.share-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

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

.share-btn svg {
    flex-shrink: 0;
}

.share-btn-small {
    padding: 6px 10px;
    font-size: 12px;
}

.share-btn-small svg {
    width: 14px;
    height: 14px;
}

/* Platform-specific colors */
.share-btn-twitter {
    background: #000000;
}

.share-btn-twitter:hover {
    background: #1a1a1a;
}

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

.share-btn-facebook:hover {
    background: #0d65d9;
}

.share-btn-whatsapp {
    background: #25D366;
}

.share-btn-whatsapp:hover {
    background: #1fb855;
}

.share-btn-copy {
    background: #4B5563;
}

.share-btn-copy:hover {
    background: #374151;
}

.share-btn-native {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-weight: 600;
}

.share-btn-native:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* -----------------------------------------------------------------------------
   Share Dropdown
   ----------------------------------------------------------------------------- */

.share-dropdown {
    position: relative;
    display: inline-block;
}

.share-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #374151;
    border-radius: 6px;
    background: transparent;
    color: #9CA3AF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-dropdown-trigger:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.share-dropdown.active .share-dropdown-trigger {
    border-color: #f59e0b;
    color: #f59e0b;
}

.share-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.share-dropdown.active .share-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #d1d5db;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.share-dropdown-item:hover {
    background: #374151;
    color: #fff;
}

.share-dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* -----------------------------------------------------------------------------
   Toast Notification
   ----------------------------------------------------------------------------- */

.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10001;
}

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

.share-toast-success {
    border-color: #10B981;
}

.share-toast-success svg {
    color: #10B981;
}

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

.share-toast-error svg {
    color: #EF4444;
}

.share-toast-info {
    border-color: #3B82F6;
}

.share-toast-info svg {
    color: #3B82F6;
}

/* -----------------------------------------------------------------------------
   Share Section - For scoreboard/game details
   ----------------------------------------------------------------------------- */

.share-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin-top: 16px;
    border-top: 1px solid #374151;
}

.share-section-label {
    color: #6B7280;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* -----------------------------------------------------------------------------
   Game Card Share Button (for archive cards)
   ----------------------------------------------------------------------------- */

.card-share-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: rgba(55, 65, 81, 0.8);
    color: #9CA3AF;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.game-card:hover .card-share-btn {
    opacity: 1;
}

.card-share-btn:hover {
    background: #f59e0b;
    color: #000;
    transform: scale(1.05);
}

/* -----------------------------------------------------------------------------
   Mobile Adjustments
   ----------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .share-bar {
        justify-content: center;
    }
    
    .share-btn-label {
        display: none;
    }
    
    .share-btn {
        padding: 10px;
    }
    
    .share-dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
    
    .share-dropdown.active .share-dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
    
    .share-toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(20px);
    }
    
    .share-toast.visible {
        transform: translateX(0) translateY(0);
    }
}

/* -----------------------------------------------------------------------------
   Print - Hide share elements
   ----------------------------------------------------------------------------- */

@media print {
    .share-bar,
    .share-dropdown,
    .share-section,
    .card-share-btn,
    .share-toast {
        display: none !important;
    }
}
