﻿/* ================================
   History Point Page - Blue & White Theme
   ================================ */

/* Main Wrapper */
.main-wrapper {
    min-height: calc(100dvh - 340px);
    padding: 20px 16px 40px;
}

@media (min-width: 1024px) {
    .main-wrapper {
        min-height: calc(100dvh - 310px);
        padding: 32px 24px 60px;
    }
}

/* Page Title */
.heading-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a5fb4;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.heading-page-title img {
    width: 28px;
    height: 28px;
    cursor: pointer;
    padding: 6px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(26, 95, 180, 0.15);
    transition: all 0.2s ease;
}

.heading-page-title img:hover {
    background: #e8f1fc;
    transform: translateX(-2px);
}

@media (min-width: 768px) {
    .heading-page-title {
        font-size: 24px;
        gap: 16px;
    }

    .heading-page-title img {
        width: 32px;
        height: 32px;
    }
}

/* List Point History Container - acts as table since <tr> are direct children */
#list-point-history {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(26, 95, 180, 0.08);
    max-width: 560px;
    margin: 0 auto;
}

/* Table Styling - Override inline styles */
#list-point-history table,
.account__content table {
    width: 100%;
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-family: 'Montserrat', 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
    border-radius: 12px;
    overflow: hidden;
}

/* Table Header */
#list-point-history tr:first-child th,
#list-point-history thead th,
.account__content table thead th,
.account__content table tr th {
    background: linear-gradient(135deg, #1a5fb4 0%, #3584e4 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 14px !important;
    text-align: left !important;
    border: none !important;
    text-shadow: none !important;
    white-space: nowrap;
}

#list-point-history tr:first-child th:first-child,
.account__content table thead th:first-child {
    border-radius: 12px 0 0 0;
}

#list-point-history tr:first-child th:last-child,
.account__content table thead th:last-child {
    border-radius: 0 12px 0 0;
}

/* Table Body Cells */
#list-point-history tr td,
#list-point-history tbody td,
.account__content table tbody td {
    background: #ffffff !important;
    color: #2e3440 !important;
    padding: 14px !important;
    border: none !important;
    border-bottom: 1px solid #e8f1fc !important;
    text-shadow: none !important;
    font-size: 14px !important;
    font-weight: 500;
    transition: background 0.2s ease;
}

/* Row hover effect */
#list-point-history tr:hover td,
.account__content table tbody tr:hover td {
    background: #f5f9ff !important;
}

/* Alternating row colors */
#list-point-history tr:nth-child(even) td,
.account__content table tbody tr:nth-child(even) td {
    background: #fafcff !important;
}

#list-point-history tr:nth-child(even):hover td,
.account__content table tbody tr:nth-child(even):hover td {
    background: #f0f6ff !important;
}

/* Last row styling */
#list-point-history tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

#list-point-history tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

#list-point-history tr:last-child td {
    border-bottom: none !important;
}

/* Number column styling */
#list-point-history tr td:first-child,
.account__content table tbody td:first-child {
    font-weight: 600;
    color: #1a5fb4 !important;
    text-align: center;
    width: 50px;
}

/* Point column styling - typically 3rd column */
#list-point-history tr td:nth-child(3),
.account__content table tbody td:nth-child(3) {
    font-weight: 700;
    color: #1a5fb4 !important;
    position: relative;
}

#list-point-history tr td:nth-child(3)::before {
    content: '+';
    margin-right: 2px;
    color: #2ec27e;
}

/* Date column styling */
#list-point-history tr td:nth-child(2),
.account__content table tbody td:nth-child(2) {
    color: #5e6472 !important;
    font-size: 13px !important;
}

/* Empty state */
#list-point-history:empty::after {
    content: 'Belum ada riwayat poin';
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #8899a6;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
}

/* Scrollable table on mobile */
@media (max-width: 576px) {
    .account__content {
        padding: 12px;
        border-radius: 12px;
    }

    #list-point-history {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #list-point-history table {
        min-width: 400px;
    }

    #list-point-history tr td,
    #list-point-history tbody td {
        padding: 12px 10px !important;
        font-size: 13px !important;
    }

    #list-point-history tr:first-child th,
    #list-point-history thead th {
        padding: 14px 10px !important;
        font-size: 11px !important;
    }
}

/* Hide the inline style table styling */
.account__content > style + * {
    margin-top: 0;
}

/* Additional visual enhancements */
#list-point-history tr {
    display: table-row;
}

/* Card-like appearance for the whole section */
.account__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a5fb4, #3584e4, #62a0ea);
    border-radius: 20px 20px 0 0;
    opacity: 0;
}

/* Info column - 4th column */
#list-point-history tr td:nth-child(4),
.account__content table tbody td:nth-child(4) {
    color: #8899a6 !important;
    font-style: italic;
}

/* If info is empty, show dash */
#list-point-history tr td:nth-child(4):empty::after {
    content: '—';
    color: #c5d0db;
}

/* Smooth scrollbar for webkit browsers */
#list-point-history::-webkit-scrollbar {
    height: 6px;
}

#list-point-history::-webkit-scrollbar-track {
    background: #f0f7ff;
    border-radius: 3px;
}

#list-point-history::-webkit-scrollbar-thumb {
    background: #c5d8ed;
    border-radius: 3px;
}

#list-point-history::-webkit-scrollbar-thumb:hover {
    background: #99bde0;
}

/* Animation for table rows */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#list-point-history tr {
    animation: fadeInUp 0.3s ease forwards;
}

#list-point-history tr:nth-child(1) { animation-delay: 0.05s; }
#list-point-history tr:nth-child(2) { animation-delay: 0.1s; }
#list-point-history tr:nth-child(3) { animation-delay: 0.15s; }
#list-point-history tr:nth-child(4) { animation-delay: 0.2s; }
#list-point-history tr:nth-child(5) { animation-delay: 0.25s; }
#list-point-history tr:nth-child(6) { animation-delay: 0.3s; }
#list-point-history tr:nth-child(7) { animation-delay: 0.35s; }
#list-point-history tr:nth-child(8) { animation-delay: 0.4s; }
