/* Purchase History Styles */

#purchase-history-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s;
}

#purchase-history-table th.sortable:hover {
    background-color: rgba(91, 92, 227, 0.08);
}

.sort-arrows {
    display: inline-flex;
    flex-direction: column;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 0.5em;
    gap: 1px;
}

.sort-arrows .arrow-up,
.sort-arrows .arrow-down {
    display: block;
    color: #cbd5e0;
    font-size: 0.75em;
    transition: all 0.2s;
    height: 8px;
    line-height: 8px;
}

#purchase-history-table th.sortable:hover .sort-arrows .arrow-up,
#purchase-history-table th.sortable:hover .sort-arrows .arrow-down {
    color: #94a3b8;
}

#purchase-history-table th.sorted-asc .arrow-up {
    color: #5b5ce3;
    font-weight: 900;
}

#purchase-history-table th.sorted-desc .arrow-down {
    color: #5b5ce3;
    font-weight: 900;
}

.ph-sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ph-sort-controls label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f1629;
    white-space: nowrap;
}

.ph-sort-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--white);
    color: #0f1629;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ph-sort-select:hover {
    border-color: #cbd5e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ph-sort-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#purchase-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#purchase-history-table thead th {
    background-color: #f8f6f2;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #0f1629;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#purchase-history-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

#purchase-history-table tbody tr:hover {
    background-color: #faf9f7;
}

#purchase-history-table tbody td {
    padding: 12px 10px;
    color: #1e293b;
    vertical-align: middle;
}

#purchase-history-table thead th:nth-child(6),
#purchase-history-table thead th:nth-child(7) {
    text-align: right;
}

#purchase-history-table tbody tr td:nth-child(6),
#purchase-history-table tbody tr td:nth-child(7) {
    text-align: right;
    font-weight: 600;
}
