/* ==================== EXTRATO DE PONTOS (PREMIUM) ==================== */

.points-history {
    margin-top: 24px;
    background: var(--color-surface, #ffffff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.05));
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
}

/* Header & Filters */
.history-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(249, 250, 251, 0.5);
    backdrop-filter: blur(10px);
}

.history-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    /* For scrollbar */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
}

.history-filters::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray, #6B7280);
    background: transparent;
    border: 1px solid var(--border-color, #E5E7EB);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--color-gray-light, #D1D5DB);
}

.filter-chip.active {
    background: var(--color-primary, #FF6B35);
    border-color: var(--color-primary, #FF6B35);
    color: white;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.2);
}

/* List */
.points-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: background 0.2s ease;
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.history-item:hover {
    background: rgba(255, 107, 53, 0.02);
}

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

/* Icons */
.history-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.history-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0.1;
}

.history-icon.earn {
    color: #10B981;
}

.history-icon.spend {
    color: #EF4444;
}

.history-icon.refund {
    color: #3B82F6;
}

.history-icon.withdrawal {
    color: #F59E0B;
}

.history-icon.purchase {
    color: #8B5CF6;
}

.history-icon.quiz {
    color: #FF6B35;
}

/* Content */
.history-details {
    flex: 1;
    min-width: 0;
}

.history-description {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark, #1F2937);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-date {
    font-size: 12px;
    color: var(--color-gray, #9CA3AF);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Amounts */
.history-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 100px;
    text-align: right;
}

.history-amount {
    font-size: 16px;
}

/* States */
.history-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--color-gray, #9CA3AF);
}

.history-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--color-gray-light, #E5E7EB);
}

.history-empty p {
    margin: 0;
    font-size: 14px;
}

.loading-container {
    padding: 40px;
    text-align: center;
    color: var(--color-primary, #FF6B35);
}

/* Load More */
.history-load-more {
    padding: 16px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-load-more {
    background: transparent;
    color: var(--color-primary, #FF6B35);
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    background: rgba(255, 107, 53, 0.05);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Optimization */
@media (max-width: 600px) {
    .history-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .history-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .history-description {
        font-size: 14px;
    }

    .history-amount {
        font-size: 15px;
    }
}