/**
 * Referral Share Component Styles
 * Dark/light theme support using CSS variables
 */

/* Container for logged-in users */
.referral-share-container {
    background: linear-gradient(135deg, var(--referral-bg-start, #1a1a2e), var(--referral-bg-end, #16213e));
    border-radius: 16px;
    padding: 20px;
    margin: 20px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--referral-border, rgba(108, 92, 231, 0.3));
}

/* Header */
.referral-share-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.referral-icon {
    font-size: 24px;
}

.referral-share-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--referral-title, #fff);
}

.referral-share-desc {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--referral-text, #b8b8c8);
    line-height: 1.5;
}

.referral-share-desc strong {
    color: var(--referral-highlight, #a855f7);
}

/* Link input box */
.referral-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.referral-link-input {
    flex: 1;
    background: var(--referral-input-bg, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--referral-input-border, rgba(255, 255, 255, 0.2));
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--referral-input-text, #fff);
    outline: none;
}

.referral-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    white-space: nowrap;
}

.referral-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.referral-copy-btn.copied {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.copy-icon {
    font-size: 16px;
}

/* Social share section */
.referral-social-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.share-label {
    font-size: 13px;
    color: var(--referral-label, #8b8b9e);
    font-weight: 500;
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Social icon colors */
.social-icon.whatsapp { background: #25D366; }
.social-icon.telegram { background: #0088cc; }
.social-icon.facebook { background: #1877F2; }
.social-icon.messenger { background: linear-gradient(135deg, #00B2FF, #006AFF); }
.social-icon.twitter { background: #000; }
.social-icon.reddit { background: #FF4500; }

/* Earnings link */
.referral-earnings-link {
    text-align: center;
}

.btn-referral-earnings {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--referral-btn-border, rgba(108, 92, 231, 0.5));
    color: var(--referral-btn-text, #a855f7);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-referral-earnings:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: #a855f7;
    color: #fff;
}

/* CTA Container for non-logged users */
.referral-cta-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 20px auto;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
}

.referral-cta-content {
    text-align: center;
}

.referral-cta-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.referral-cta-text h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.referral-cta-text p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.referral-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.btn-referral-cta {
    display: inline-block;
    background: #ffd700;
    color: #000;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 280px;
    text-align: center;
}

.btn-referral-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    color: #000;
}

.btn-referral-calc {
    display: inline-block;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-referral-calc:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* Light theme overrides */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .referral-share-container {
        --referral-bg-start: #f8f9fa;
        --referral-bg-end: #e9ecef;
        --referral-border: rgba(108, 92, 231, 0.2);
        --referral-title: #1a1a2e;
        --referral-text: #4a4a5a;
        --referral-highlight: #6c5ce7;
        --referral-input-bg: #fff;
        --referral-input-border: #e5e7eb;
        --referral-input-text: #1f2937;
        --referral-label: #6b7280;
        --referral-btn-border: rgba(108, 92, 231, 0.4);
        --referral-btn-text: #6c5ce7;
    }
}

/* Explicit light theme */
[data-theme="light"] .referral-share-container,
body:not(.dark) .referral-share-container {
    --referral-bg-start: #f8f9fa;
    --referral-bg-end: #e9ecef;
    --referral-border: rgba(108, 92, 231, 0.2);
    --referral-title: #1a1a2e;
    --referral-text: #4a4a5a;
    --referral-highlight: #6c5ce7;
    --referral-input-bg: #fff;
    --referral-input-border: #e5e7eb;
    --referral-input-text: #1f2937;
    --referral-label: #6b7280;
    --referral-btn-border: rgba(108, 92, 231, 0.4);
    --referral-btn-text: #6c5ce7;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .referral-share-container,
    .referral-cta-container {
        padding: 16px;
        border-radius: 12px;
        margin: 15px 0;
    }
    
    .referral-share-header h3 {
        font-size: 16px;
    }
    
    .referral-link-box {
        flex-direction: column;
    }
    
    .referral-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
        width: 100%;
    }
    
    .social-icon {
        width: 38px;
        height: 38px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .referral-cta-text h3 {
        font-size: 18px;
    }
}
