/* Table Container Styles */
.simple-table-container {
    margin: 25px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    max-width: 100%;
}

/* Base Table Styles */
.simple-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #dddddd;
}

/* Table Header */
.simple-table thead th {
    background-color: #A6192E;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    padding: 12px 15px;
    letter-spacing: 0.5px;
    border: 1px solid rgb(100, 30, 43);
}

/* Center align headers except the second column */
.simple-table thead th:nth-child(1),
.simple-table thead th:nth-child(3),
.simple-table thead th:nth-child(4) {
    text-align: center;
}
.simple-table thead th:nth-child(2) {
    text-align: left;
}

/* Table Body */
.simple-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.simple-table tbody tr:nth-of-type(even) {
    background-color: #f6f6f6;
}

.simple-table tbody tr:last-of-type {
    border-bottom: 2px solid rgb(120, 36, 51);
}

.simple-table tbody td {
    padding: 12px 15px;
    color: #333333;
    border: 1px solid #dddddd !important;
}

/* Center align all cells except the second column */
.simple-table tbody td:nth-child(1),
.simple-table tbody td:nth-child(3),
.simple-table tbody td:nth-child(4) {
    text-align: center;
}

.simple-table tbody td:nth-child(2) {
    text-align: left;
}

/* Hover effect */
.simple-table tbody tr:hover {
    background-color: rgb(248, 235, 238);
}

/* Responsive styling */
@media screen and (max-width: 767px) {
    .simple-table-container {
        width: 100%;
        margin: 10px 0;
    }
    
    .simple-table {
        width: 100%;
        table-layout: auto;
    }
    
    /* Column width adjustments for mobile */
    .simple-table th:nth-child(1),
    .simple-table td:nth-child(1) {
        width: 10%; /* STT column - very narrow */
    }
    
    .simple-table th:nth-child(2),
    .simple-table td:nth-child(2) {
        width: 40%; /* Product name - give it more space */
    }
    
    .simple-table th:nth-child(3),
    .simple-table td:nth-child(3) {
        width: 25%; /* Price column */
    }
    
    .simple-table th:nth-child(4),
    .simple-table td:nth-child(4) {
        width: 25%; /* Points column */
    }
    
    .simple-table th,
    .simple-table td {
        padding: 6px 5px; /* Smaller padding */
        font-size: 12px; /* Smaller font size */
        line-height: 1.2; /* Tighter line height */
        word-wrap: break-word; /* Allow words to break */
        overflow-wrap: break-word;
        hyphens: auto; /* Enable hyphenation */
    }
    
    /* Force wrap even on long strings without spaces */
    .simple-table td:nth-child(2) {
        word-break: break-word;
    }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
    .simple-table th,
    .simple-table td {
        padding: 5px 3px; /* Even smaller padding */
        font-size: 12px; /* Even smaller font */
    }
    
    .simple-table th:nth-child(1),
    .simple-table td:nth-child(1) {
        width: 8%; /* Make STT even narrower */
    }
}