/* UpConnect History Styles */

.upconnect-history-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.upconnect-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.upconnect-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    flex: 1;
}

.upconnect-user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.upconnect-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upconnect-user-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.upconnect-user-points {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upconnect-total-points {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.upconnect-total-points .dashicons {
    color: #ffd700;
}

/* Stats Cards */
.upconnect-history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    flex: 1;
}

.upconnect-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.upconnect-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.upconnect-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.5rem;
}

.upconnect-stat-card:nth-child(1) .upconnect-stat-icon {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
}

.upconnect-stat-card:nth-child(2) .upconnect-stat-icon {
    background: linear-gradient(135deg, #f44336, #ef5350);
    color: white;
}

.upconnect-stat-card:nth-child(3) .upconnect-stat-icon {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: white;
}

.upconnect-stat-card:nth-child(4) .upconnect-stat-icon {
    background: linear-gradient(135deg, #9c27b0, #ba68c8);
    color: white;
}

.upconnect-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.upconnect-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.upconnect-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* Filters */
.upconnect-history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.upconnect-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upconnect-filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
}

.upconnect-filter-select,
.upconnect-date-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 150px;
}

.upconnect-filter-select:focus,
.upconnect-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.upconnect-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upconnect-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Content */
.upconnect-history-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.upconnect-history-table-wrapper {
    overflow-x: auto;
}

.upconnect-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.upconnect-history-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.upconnect-history-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.upconnect-history-table tr:hover {
    background: #f8f9ff;
}

/* Activity Row */
.upconnect-activity-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.upconnect-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1rem;
}

.upconnect-activity-post .upconnect-activity-icon {
    background: #e3f2fd;
    color: #1976d2;
}

.upconnect-activity-comment .upconnect-activity-icon {
    background: #f3e5f5;
    color: #7b1fa2;
}

.upconnect-activity-delete_post .upconnect-activity-icon,
.upconnect-activity-delete_comment .upconnect-activity-icon {
    background: #ffebee;
    color: #d32f2f;
}

.upconnect-activity-wallet_exchange .upconnect-activity-icon {
    background: #e8f5e8;
    color: #388e3c;
}

.upconnect-activity-level_up .upconnect-activity-icon {
    background: #fff3e0;
    color: #f57c00;
}

.upconnect-activity-manual .upconnect-activity-icon {
    background: #f3e5f5;
    color: #7b1fa2;
}

.upconnect-activity-label {
    font-weight: 500;
    color: #2c3e50;
}

.upconnect-activity-description {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Points Column */
.upconnect-points-value {
    font-weight: 600;
    font-size: 1rem;
}

.upconnect-points-positive {
    color: #388e3c;
}

.upconnect-points-negative {
    color: #d32f2f;
}

.upconnect-points-neutral {
    color: #6c757d;
}

/* Date Column */
.upconnect-activity-date {
    color: #6c757d;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Pagination */
.upconnect-history-pagination {
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.upconnect-load-more-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #2c3e50;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upconnect-load-more-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* Empty State */
.upconnect-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: #6c757d;
}

.upconnect-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading */
.upconnect-history-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
}

.upconnect-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.upconnect-history-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #ffebee;
    color: #d32f2f;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .upconnect-history-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .upconnect-history-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .upconnect-history-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upconnect-filter-group {
        width: 100%;
    }
    
    .upconnect-filter-select,
    .upconnect-date-input {
        width: 100%;
    }
    
    .upconnect-history-stats {
        grid-template-columns: 1fr;
    }
    
    .upconnect-history-table {
        font-size: 0.8rem;
    }
    
    .upconnect-history-table th,
    .upconnect-history-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .upconnect-user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .upconnect-stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .upconnect-history-table {
        font-size: 0.75rem;
    }
    
    .upconnect-history-table th,
    .upconnect-history-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Custom Scrollbar */
.upconnect-history-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.upconnect-history-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.upconnect-history-table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.upconnect-history-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
