/* ============================================================================
   FILE: assets/css/referral.css
   Referral System Frontend Styles
   ============================================================================ */

/* Dashboard Container */
.vis-referral-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.vis-ref-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.vis-ref-header h1 {
    font-size: 36px;
    margin: 0 0 10px;
    font-weight: 700;
}

.vis-ref-header p {
    font-size: 18px;
    opacity: 0.95;
    margin: 0;
}

/* Referral Link Section */
.vis-ref-link-section {
    margin-bottom: 40px;
}

.vis-ref-link-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vis-ref-link-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    margin: 0 0 20px;
    color: #1f2937;
}

.vis-ref-link-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.vis-ref-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background: #f9fafb;
    color: #374151;
}

.vis-ref-link-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.vis-ref-copy-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.vis-ref-copy-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* QR Code */
.vis-ref-qr-code {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    margin: 20px 0;
}

.vis-ref-qr-code canvas {
    margin: 0 auto;
}

/* Share Section */
.vis-ref-share-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    margin-top: 20px;
}

.vis-ref-share-section h4 {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vis-ref-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.vis-share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    color: white;
}

.vis-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.vis-share-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.vis-facebook { background: #1877f2; }
.vis-twitter { background: #1da1f2; }
.vis-whatsapp { background: #25d366; }
.vis-linkedin { background: #0077b5; }
.vis-email { background: #ea4335; }

/* Statistics Grid */
.vis-ref-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.vis-ref-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.vis-ref-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.vis-ref-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.vis-ref-stat-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.vis-ref-stat-content h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.vis-ref-stat-content p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 14px;
}

/* Progress Section */
.vis-ref-progress-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}

.vis-ref-progress-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #1f2937;
}

.vis-ref-progress-wrapper {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
}

.vis-ref-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.vis-ref-progress-bar {
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.vis-ref-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
    position: relative;
}

.vis-ref-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Rewards Section */
.vis-ref-rewards-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}

.vis-ref-rewards-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 18px;
    color: #1f2937;
}

.vis-ref-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vis-ref-reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.vis-ref-reward-item:hover {
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vis-ref-reward-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vis-ref-reward-info strong {
    font-size: 16px;
    color: #1f2937;
}

.vis-ref-reward-info span {
    font-size: 14px;
    color: #6b7280;
}

.vis-ref-reward-info small {
    font-size: 12px;
    color: #9ca3af;
}

.vis-ref-claim-btn {
    padding: 8px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vis-ref-claim-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Recent Referrals Section */
.vis-ref-recent-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
}

.vis-ref-recent-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 18px;
    color: #1f2937;
}

.vis-ref-table {
    width: 100%;
    border-collapse: collapse;
}

.vis-ref-table thead th {
    text-align: left;
    padding: 12px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.vis-ref-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
}

.vis-ref-table tbody tr:hover {
    background: #f9fafb;
}

.vis-ref-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vis-ref-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.vis-ref-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vis-ref-status-approved {
    background: #d1fae5;
    color: #065f46;
}

.vis-ref-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.vis-ref-status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.vis-ref-empty {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 16px;
}

/* How It Works Section */
.vis-ref-how-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
}

.vis-ref-how-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 30px;
    font-size: 20px;
    color: #1f2937;
    text-align: center;
    justify-content: center;
}

.vis-ref-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.vis-ref-step {
    text-align: center;
    position: relative;
}

.vis-ref-step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.vis-ref-step h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #1f2937;
}

.vis-ref-step p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Leaderboard */
.vis-ref-leaderboard {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.vis-ref-leaderboard h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #1f2937;
    text-align: center;
}

.vis-ref-leader-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vis-ref-leader-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.vis-ref-leader-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vis-ref-leader-rank {
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #374151;
}

.vis-ref-leader-item:nth-child(1) .vis-ref-leader-rank {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.vis-ref-leader-item:nth-child(2) .vis-ref-leader-rank {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    color: white;
}

.vis-ref-leader-item:nth-child(3) .vis-ref-leader-rank {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    color: white;
}

.vis-ref-leader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.vis-ref-leader-info {
    flex: 1;
}

.vis-ref-leader-name {
    font-weight: 600;
    color: #1f2937;
    display: block;
}

.vis-ref-leader-stats {
    font-size: 13px;
    color: #6b7280;
}

.vis-ref-leader-score {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vis-referral-dashboard {
        padding: 15px;
    }
    
    .vis-ref-header {
        padding: 30px 15px;
    }
    
    .vis-ref-header h1 {
        font-size: 28px;
    }
    
    .vis-ref-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .vis-ref-link-wrapper {
        flex-direction: column;
    }
    
    .vis-ref-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .vis-ref-steps {
        grid-template-columns: 1fr;
    }
    
    .vis-ref-table {
        font-size: 12px;
    }
    
    .vis-ref-table thead {
        display: none;
    }
    
    .vis-ref-table tbody td {
        display: block;
        padding: 8px;
        border: none;
    }
    
    .vis-ref-table tbody tr {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 10px;
        display: block;
    }
    
    .vis-ref-reward-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .vis-ref-claim-btn {
        width: 100%;
    }
}

/* Loading States */
.vis-ref-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.vis-ref-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: vis-ref-spin 0.8s linear infinite;
}

@keyframes vis-ref-spin {
    to { transform: rotate(360deg); }
}

/* Notifications */
.vis-ref-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    max-width: 350px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.vis-ref-notification.show {
    transform: translateX(0);
}

.vis-ref-notification.success {
    border-left: 4px solid #10b981;
}

.vis-ref-notification.error {
    border-left: 4px solid #ef4444;
}