/**
 * Squizito Fan - Share Component Styles V2
 *
 * Complete redesign featuring:
 * - Two-tier reward system display (instant + referral bonus)
 * - Gamified visual design with animations
 * - Sports betting excitement language
 * - Mobile-first responsive design
 * - Compact and full variants
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES
   ============================================================================= */

:root {
    /* Squizito Brand Colors */
    --sqz-lime: #b3f400;
    --sqz-lime-glow: rgba(179, 244, 0, 0.3);
    --sqz-lime-dim: rgba(179, 244, 0, 0.1);

    /* Dark Theme */
    --sqz-bg-primary: #0a0a0f;
    --sqz-bg-secondary: #12121a;
    --sqz-bg-tertiary: #1a1a24;
    --sqz-bg-card: #1e1e2a;

    /* Success & Rewards */
    --sqz-success: #00c853;
    --sqz-gold: #ffd700;
    --sqz-gold-glow: rgba(255, 215, 0, 0.4);

    /* Text */
    --sqz-text-primary: #ffffff;
    --sqz-text-secondary: #a0a0b0;
    --sqz-text-dim: #707080;

    /* Shadows */
    --sqz-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --sqz-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --sqz-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --sqz-shadow-glow-lime: 0 0 20px var(--sqz-lime-glow);
    --sqz-shadow-glow-gold: 0 0 24px var(--sqz-gold-glow);
}

/* =============================================================================
   MAIN COMPONENT CONTAINER
   ============================================================================= */

.share-component {
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 24px;
    margin: 16px 0;
    position: relative;
    overflow: hidden;
}

/* Content wrapper */
.share-component > * {
    position: relative;
    z-index: 1;
}

/* Compact variant */
.share-component.share-compact {
    padding: 16px;
    margin: 12px 0;
}

/* =============================================================================
   LOADING STATE
   ============================================================================= */

.share-component.share-loading {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.share-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(179, 244, 0, 0.2);
    border-top-color: var(--sqz-lime);
    border-radius: 50%;
    animation: share-spin 0.8s linear infinite;
}

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

/* =============================================================================
   HEADER SECTION
   ============================================================================= */

.share-header {
    text-align: center;
    margin-bottom: 20px;
}

.share-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.share-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px var(--sqz-lime-glow));
}

.share-compact .share-icon {
    font-size: 1.5rem;
}

.share-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--sqz-lime, #b3f400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(179, 244, 0, 0.3);
}

.share-compact .share-title {
    font-size: 1rem;
}

.share-description {
    color: var(--sqz-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* =============================================================================
   TWO-TIER REWARD DISPLAY (THE STAR OF THE SHOW!)
   ============================================================================= */

.share-rewards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.share-compact .share-rewards-container {
    gap: 8px;
    margin-bottom: 16px;
}

/* Individual reward card */
.share-reward-card {
    background: linear-gradient(135deg,
        rgba(179, 244, 0, 0.15) 0%,
        rgba(179, 244, 0, 0.05) 100%);
    border: 2px solid rgba(179, 244, 0, 0.3);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.share-compact .share-reward-card {
    padding: 12px 8px;
    border-radius: 8px;
}

.share-reward-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sqz-shadow-glow-lime);
}

/* Instant reward card (left) */
.share-reward-instant {
    border-color: rgba(179, 244, 0, 0.4);
}

/* Referral reward card (right) - MORE PROMINENT */
.share-reward-referral {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.2) 0%,
        rgba(255, 215, 0, 0.08) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    animation: share-referral-pulse 3s ease-in-out infinite;
}

@keyframes share-referral-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
        transform: scale(1.02);
    }
}

/* Reward card label */
.share-reward-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--sqz-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.share-compact .share-reward-label {
    font-size: 0.65rem;
    gap: 4px;
}

.share-reward-icon {
    font-size: 1rem;
}

.share-compact .share-reward-icon {
    font-size: 0.85rem;
}

/* Reward amount display */
.share-reward-amount {
    font-size: 2rem;
    font-weight: 900;
    color: var(--sqz-lime);
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px var(--sqz-lime-glow);
}

.share-reward-referral .share-reward-amount {
    color: var(--sqz-gold);
    text-shadow: 0 0 15px var(--sqz-gold-glow);
}

.share-compact .share-reward-amount {
    font-size: 1.5rem;
}

/* Reward subtitle */
.share-reward-subtitle {
    font-size: 0.7rem;
    color: var(--sqz-text-dim);
    line-height: 1.2;
}

.share-compact .share-reward-subtitle {
    font-size: 0.65rem;
}

/* Sparkle animation for referral card */
.share-reward-referral::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 215, 0, 0.3),
        transparent
    );
    animation: share-sparkle 3s ease-in-out infinite;
}

@keyframes share-sparkle {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* =============================================================================
   PLATFORM BUTTONS
   ============================================================================= */

.share-platforms {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 16px;
    flex-wrap: wrap;
}

.share-compact .share-platforms {
    gap: 10px;
    margin: 16px 0 12px;
}

.share-platform-btn {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    box-shadow: var(--sqz-shadow-sm);
    background-size: 200% 200%;
    background-position: 0% 50%;
}

.share-compact .share-platform-btn {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

/* Hover effect */
.share-platform-btn:hover:not(:disabled) {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
    background-position: 100% 50%;
}

/* Active/click effect */
.share-platform-btn:active:not(:disabled) {
    transform: translateY(-2px) scale(0.98);
}

/* Disabled state */
.share-platform-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Platform icon SVG */
.platform-icon-svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.share-compact .platform-icon-svg {
    width: 22px;
    height: 22px;
}

/* Text fallback icon */
.platform-icon-text {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Loading state */
.share-platform-btn.share-btn-loading {
    pointer-events: none;
    opacity: 0.6;
}

.share-platform-btn.share-btn-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: share-spin 0.6s linear infinite;
}

/* Success animation */
.share-platform-btn.share-btn-success {
    animation: share-btn-success-burst 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes share-btn-success-burst {
    0% { transform: scale(1); }
    30% { transform: scale(1.2); box-shadow: 0 0 30px var(--sqz-lime); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* =============================================================================
   STATS & PROGRESS
   ============================================================================= */

.share-stats-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
}

.share-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.share-stats-label {
    color: var(--sqz-text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.share-stats-value {
    color: var(--sqz-text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.share-count-highlight {
    color: var(--sqz-lime);
    font-size: 1.1rem;
}

/* Progress bar */
.share-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.share-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sqz-lime), var(--sqz-success));
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.share-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: share-progress-shimmer 2s ease-in-out infinite;
}

@keyframes share-progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* =============================================================================
   COOLDOWN NOTICE
   ============================================================================= */

.share-cooldown {
    background: linear-gradient(135deg, rgba(255, 153, 102, 0.2), rgba(255, 153, 102, 0.1));
    border: 1px solid rgba(255, 153, 102, 0.4);
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffaa77;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 12px;
    font-weight: 600;
}

.share-cooldown::before {
    content: '⏱️ ';
    margin-right: 6px;
}

/* =============================================================================
   SUCCESS FLOATER ANIMATION
   ============================================================================= */

.share-success-floater {
    position: fixed;
    background: linear-gradient(135deg, var(--sqz-lime), var(--sqz-success));
    color: #000;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 1.5rem;
    font-weight: 900;
    z-index: 10000;
    pointer-events: none;
    animation: share-float-up-v2 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform: translateX(-50%);
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(179, 244, 0, 0.7);
    font-family: 'Courier New', monospace;
}

@keyframes share-float-up-v2 {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(0.8);
    }
    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px) scale(1.2);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(-30px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-120px) scale(1.3);
    }
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 480px) {
    .share-component {
        padding: 18px;
        border-radius: 12px;
    }

    .share-title {
        font-size: 1.1rem;
    }

    .share-rewards-container {
        gap: 10px;
        margin-bottom: 20px;
    }

    .share-reward-card {
        padding: 14px 10px;
    }

    .share-reward-amount {
        font-size: 1.6rem;
    }

    .share-reward-label {
        font-size: 0.7rem;
    }

    .share-reward-subtitle {
        font-size: 0.65rem;
    }

    .share-platform-btn {
        width: 52px;
        height: 52px;
    }

    .platform-icon-svg {
        width: 24px;
        height: 24px;
    }

    .share-success-floater {
        font-size: 1.2rem;
        padding: 12px 20px;
    }
}

@media (max-width: 360px) {
    .share-rewards-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .share-reward-card {
        padding: 12px;
    }

    .share-platforms {
        gap: 8px;
    }

    .share-platform-btn {
        width: 48px;
        height: 48px;
    }
}

/* =============================================================================
   PLACEMENT VARIANTS
   ============================================================================= */

/* For placing in cards */
.card .share-component {
    margin: 20px -20px -20px;
    border-radius: 0 0 16px 16px;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

/* For modal placement */
.modal .share-component {
    margin: 20px 0;
}

/* Inline variant (ultra-compact) */
.share-inline .share-component {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 12px 16px;
    background: rgba(179, 244, 0, 0.08);
    border-width: 1px;
}

.share-inline .share-rewards-container {
    grid-template-columns: auto auto;
    gap: 8px;
    margin-bottom: 12px;
}

.share-inline .share-reward-card {
    padding: 8px 12px;
}

.share-inline .share-reward-amount {
    font-size: 1.2rem;
}

.share-inline .share-platforms {
    margin: 8px 0 0;
}

.share-inline .share-platform-btn {
    width: 40px;
    height: 40px;
}

.share-inline .platform-icon-svg {
    width: 20px;
    height: 20px;
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

.share-platform-btn:focus-visible {
    outline: 3px solid var(--sqz-lime);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .share-component::before,
    .share-reward-referral,
    .share-reward-referral::before,
    .share-progress-fill::after {
        animation: none;
    }

    .share-platform-btn:hover:not(:disabled) {
        transform: none;
    }
}

/* =============================================================================
   THEME INTEGRATION
   ============================================================================= */

/* Light mode support (if needed) */
@media (prefers-color-scheme: light) {
    .share-component {
        /*background: linear-gradient(135deg, #ffffff, #f5f5f7);*/
        background: #000;
        border-color: #b3f400;
    }

    .share-title {
        color: #b3f400;
    }

    .share-description,
    .share-stats-label {
        color: #b3f400;
    }

    .share-reward-card {
        background: linear-gradient(135deg,
            rgba(179, 244, 0, 0.2) 0%,
            rgba(179, 244, 0, 0.08) 100%);
    }

    .share-stats-container {
        background: rgba(0, 0, 0, 0.05);
    }
}
