/*
 * Dashboard-specific styles for NutriBox Referral Plugin
 * This file contains additional styles specifically for the dashboard components
 */

/* Dashboard Widget Styles */
.nutribox-referral-dashboard .widget {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nutribox-referral-dashboard .widget-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Shortcode Widget Styles */
.nutribox-referral-link-widget {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
}

.referral-code-widget,
.referral-link-widget {
    margin-bottom: 15px;
}

.referral-code-widget:last-child,
.referral-link-widget:last-child {
    margin-bottom: 0;
}

.referral-code-widget label,
.referral-link-widget label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.code-display {
    display: inline-block;
    background: #fff;
    border: 2px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 16px;
    color: #2c3e50;
    margin-right: 10px;
}

.link-display {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.copy-code-btn,
.copy-link-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.copy-code-btn:hover,
.copy-link-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* Wallet Balance Shortcode Styles */
.wallet-balance-simple {
    font-size: 18px;
    font-weight: 600;
    color: #27ae60;
}

.wallet-balance-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}

.wallet-balance-full {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.balance-label {
    font-weight: 500;
    color: #6c757d;
}

.wallet-balance-full .balance-amount {
    font-size: 20px;
    font-weight: 700;
    color: #27ae60;
}

.wallet-balance-error {
    color: #e74c3c;
    font-style: italic;
}

/* Referral Stats Shortcode Styles */
.nutribox-referral-stats {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
}

.nutribox-referral-stats.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.nutribox-referral-stats.list .stat-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.nutribox-referral-stats.list .stat-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.nutribox-referral-stats.inline {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nutribox-referral-stats .stat-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.nutribox-referral-stats.list .stat-item {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
}

.nutribox-referral-stats.inline .stat-item {
    text-align: center;
}

.nutribox-referral-stats .stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.nutribox-referral-stats .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.nutribox-referral-stats.list .stat-label,
.nutribox-referral-stats.inline .stat-label {
    margin-bottom: 0;
}

/* Loading and Error States */
.nutribox-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.nutribox-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nutribox-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 15px 0;
}

.nutribox-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin: 15px 0;
}

/* Print Styles for Referral Codes */
@media print {
    .nutribox-referral-dashboard {
        box-shadow: none;
        border: none;
    }
    
    .tab-navigation,
    .copy-button,
    .share-buttons,
    .tool-buttons {
        display: none !important;
    }
    
    .tab-content {
        display: block !important;
    }
    
    .referral-code-display,
    .referral-link-display {
        page-break-inside: avoid;
    }
    
    .code-display {
        border: 2px solid #000;
        font-size: 18px;
        font-weight: bold;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .nutribox-referral-dashboard {
        background: #2c3e50;
        color: #ecf0f1;
    }
 
    .stat-card {
        background: #34495e;
        border-color: #4a5f7a;
    }
    
    .stat-value {
        color: #ecf0f1;
    }
    
    .tab-button {
        color: #bdc3c7;
    }
    
    .tab-button:hover,
    .tab-button.active {
        color: #ecf0f1;
        background-color: #4a5f7a;
    }
    
    .code-input-group input,
    .link-input-group input,
    .link-display {
        background: #4a5f7a;
        border-color: #5a6f8a;
        color: #ecf0f1;
    }
    
    .transactions-table th,
    .referrals-table th {
        background: #4a5f7a;
        color: #ecf0f1;
    }
    
    .transactions-table table,
    .referrals-table table {
        background: #34495e;
    }
    
    .transactions-table td,
    .referrals-table td {
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .nutribox-referral-dashboard {
        border: 2px solid #000;
    }
    
    .copy-button,
    .copy-code-btn,
    .copy-link-btn {
        border: 2px solid #000;
    }
    
    .stat-card {
        border: 2px solid #000;
    }
    
    .tab-button.active {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .copy-button:hover,
    .tab-button:hover,
    .stat-card:hover {
        transform: none;
    }
}
