/**
 * Ultra Wallet - Referral Campaign Styles
 * @since 3.2.0
 */

/* ==================== Landing Page ==================== */
.dw-referral-landing {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    max-width: 100%;
    margin: 0 auto;
    color: #1e293b;
}

.dw-referral-landing.dw-referral-full {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    min-height: 100vh;
}

/* ==================== Hero Section ==================== */
.dw-referral-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dw-referral-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.dw-referral-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.dw-referral-hero-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
    animation: float 3s ease-in-out infinite;
}

.dw-referral-hero-emoji {
    font-size: 100px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.dw-referral-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.dw-referral-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.8;
}

.dw-referral-cta-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    background: #fff;
    color: #6366f1;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.dw-referral-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    color: #6366f1;
}

/* ==================== Stats Section ==================== */
.dw-referral-stats-section {
    padding: 40px 20px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

.dw-referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.dw-referral-stat-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.dw-referral-stat-card:hover {
    transform: translateY(-5px);
}

.dw-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.dw-stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 5px;
}

.dw-stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.dw-stat-invites .dw-stat-value { color: #6366f1; }
.dw-stat-converted .dw-stat-value { color: #10b981; }
.dw-stat-earnings .dw-stat-value { color: #f59e0b; }

/* ==================== Link Section ==================== */
.dw-referral-link-section {
    padding: 40px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.dw-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 25px;
    color: #1e293b;
}

.dw-referral-link-box {
    display: flex;
    gap: 10px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.dw-referral-link-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: #fff;
    border-radius: 12px;
    font-size: 1rem;
    color: #475569;
    direction: ltr;
    text-align: center;
    font-family: monospace;
}

.dw-referral-copy-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.dw-referral-copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.dw-referral-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.dw-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.dw-share-btn svg {
    width: 20px;
    height: 20px;
}

.dw-share-telegram {
    background: #0088cc;
    color: #fff;
}

.dw-share-telegram:hover {
    background: #006699;
    color: #fff;
}

.dw-share-whatsapp {
    background: #25D366;
    color: #fff;
}

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

.dw-share-copy {
    background: #f1f5f9;
    color: #475569;
}

.dw-share-copy:hover {
    background: #e2e8f0;
}

/* ==================== How It Works ==================== */
.dw-referral-how-section {
    padding: 60px 20px;
    background: #fff;
}

.dw-referral-steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto 50px;
}

.dw-step {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    text-align: center;
    padding: 20px;
}

.dw-step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 auto 15px;
}

.dw-step-icon {
    margin-bottom: 15px;
}

.dw-step-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.dw-step-emoji {
    font-size: 4rem;
    display: block;
}

.dw-step-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1e293b;
}

.dw-step-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.dw-step-arrow {
    font-size: 2rem;
    color: #cbd5e1;
    padding-top: 60px;
}

/* ==================== Rewards Summary ==================== */
.dw-referral-rewards-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.dw-reward-box {
    background: #f8fafc;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dw-reward-box:hover {
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.dw-reward-box-premium {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.dw-reward-box-invitee {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.dw-reward-box-icon {
    font-size: 3rem;
}

.dw-reward-box-title {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
}

.dw-reward-box-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 5px;
}

.dw-reward-box-value small {
    font-size: 0.8rem;
    font-weight: 500;
}

.dw-reward-box-desc {
    font-size: 0.85rem;
    color: #64748b;
}

/* ==================== History Section ==================== */
.dw-referral-history {
    padding: 40px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.dw-referral-list {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

.dw-referral-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.dw-referral-item:last-child {
    border-bottom: none;
}

.dw-referral-item-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.dw-referral-item-info {
    flex: 1;
}

.dw-referral-item-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
}

.dw-referral-item-date {
    font-size: 0.85rem;
    color: #94a3b8;
}

.dw-referral-item-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.dw-status-success {
    background: #d1fae5;
    color: #065f46;
}

.dw-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.dw-referral-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 1rem;
}

/* ==================== Embedded View ==================== */
.dw-referral-embedded {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.dw-referral-header {
    text-align: center;
    margin-bottom: 25px;
}

.dw-referral-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1e293b;
}

.dw-referral-header p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.dw-referral-mini-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 16px;
}

.dw-mini-stat {
    text-align: center;
    color: #fff;
}

.dw-mini-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
}

.dw-mini-stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.dw-referral-link-compact {
    margin-bottom: 20px;
}

.dw-referral-link-compact label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
}

.dw-link-row {
    display: flex;
    gap: 10px;
}

.dw-link-row input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    direction: ltr;
    text-align: center;
    font-family: monospace;
}

.dw-link-row button {
    padding: 12px 20px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dw-link-row button:hover {
    background: #4f46e5;
}

.dw-referral-rewards-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.dw-reward-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.dw-reward-item:last-child {
    border-bottom: none;
}

.dw-reward-icon {
    font-size: 1.3rem;
}

.dw-reward-text {
    flex: 1;
    font-size: 0.9rem;
    color: #475569;
}

.dw-reward-amount {
    font-weight: 700;
    color: #10b981;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .dw-referral-title {
        font-size: 1.8rem;
    }
    
    .dw-referral-subtitle {
        font-size: 1rem;
    }
    
    .dw-referral-hero {
        padding: 40px 15px;
    }
    
    .dw-referral-link-box {
        flex-direction: column;
    }
    
    .dw-referral-copy-btn {
        justify-content: center;
    }
    
    .dw-step-arrow {
        display: none;
    }
    
    .dw-referral-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .dw-step {
        max-width: 100%;
    }
    
    .dw-referral-mini-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .dw-mini-stat {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .dw-referral-hero-emoji {
        font-size: 70px;
    }
    
    .dw-referral-title {
        font-size: 1.5rem;
    }
    
    .dw-stat-value {
        font-size: 1.5rem;
    }
    
    .dw-share-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* ==================== Notice ==================== */
.dw-notice {
    padding: 15px 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.dw-notice-info {
    background: #dbeafe;
    color: #1e40af;
}
