/* CSS đặc biệt cho bảng giá trên màn hình di động */

/* Màn hình nhỏ */
@media (max-width: 575px) {
    .price-table {
        margin: 0 auto;
        width: 100%;
        table-layout: fixed; /* Quan trọng: đảm bảo các cột có chiều rộng cố định */
    }

    .price-table thead tr th {
        font-size: 12px !important;
        padding: 8px 2px !important;
        letter-spacing: -0.5px;
        white-space: normal;
        line-height: 1.2;
    }
    
    .price-table tbody tr td {
        font-size: 11px !important;
        padding: 8px 2px !important;
        white-space: normal;
        line-height: 1.2;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    /* Tối ưu hiển thị mũi tên */
    .price-table td:first-child {
        letter-spacing: -0.5px;
    }

    /* Điều chỉnh kích thước cho từng cột */
    .price-table th:first-child,
    .price-table td:first-child {
        width: 32%;
    }
    
    .price-table th:nth-child(2),
    .price-table td:nth-child(2) {
        width: 34%;
    }
    
    .price-table th:nth-child(3),
    .price-table td:nth-child(3) {
        width: 34%;
    }

    /* Rút gọn các tiêu đề */
    .price-table thead th:first-child {
        font-size: 11px !important;
    }
    
    .price-table thead th:nth-child(2) {
        font-size: 11px !important;
    }
    
    .price-table thead th:nth-child(3) {
        font-size: 11px !important;
    }

    /* Bo tròn bảng với padding nhỏ hơn */
    .price-table-wrapper {
        padding: 0;
        overflow: hidden;
    }
}

/* Màn hình rất nhỏ */
@media (max-width: 375px) {
    .price-table thead tr th {
        font-size: 10px !important;
        padding: 5px 0 !important;
        letter-spacing: -0.5px;
    }
    
    .price-table tbody tr td {
        font-size: 10px !important;
        padding: 5px 0 !important;
        letter-spacing: -0.5px;
    }

    /* Giảm kích thước mũi tên và thay bằng ký hiệu ngắn hơn cho di động */
    .price-table td:first-child {
        word-spacing: -2px;
    }

    /* Thêm thuộc tính mới cho chữ trong bảng */
    .price-table td, .price-table th {
        word-break: break-word;
        font-weight: 600;
    }
    
    /* Rút gọn tiêu đề cho màn hình rất nhỏ */
    .price-table thead th:first-child {
        font-size: 9px !important;
    }
    
    .price-table thead th:nth-child(2) {
        font-size: 9px !important;
    }
    
    .price-table thead th:nth-child(3) {
        font-size: 9px !important;
    }
    
    /* Thêm class đặc biệt cho tiêu đề có thể được thêm vào HTML */
    .mobile-th {
        display: block;
        line-height: 1;
    }
}

/* Màn hình cực nhỏ */
@media (max-width: 320px) {
    /* Thay đổi font-size và padding để tránh mất chữ */
    .price-table thead tr th {
        font-size: 9px !important;
        padding: 4px 0 !important;
        letter-spacing: -1px;
    }
    
    .price-table tbody tr td {
        font-size: 9px !important;
        padding: 4px 0 !important;
        letter-spacing: -0.8px;
    }
    
    /* Điều chỉnh kích thước cột */
    .price-table th:first-child,
    .price-table td:first-child {
        width: 30%;
    }
    
    .price-table th:nth-child(2),
    .price-table td:nth-child(2) {
        width: 35%;
    }
    
    .price-table th:nth-child(3),
    .price-table td:nth-child(3) {
        width: 35%;
    }
}