/* Tabel Wilayah Harga - Responsive Card View */
.twh-table-container {
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.twh-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

/* Desktop Styles */
.twh-table th, .twh-table td {
    padding: 12px 15px;
    border: 1px solid #eee;
}

@media screen and (min-width: 769px) {
    .twh-table tr {
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff;
    }
}


@media screen and (max-width: 768px) {
    .twh-table-container {
        width: 100%;
        overflow-x: hidden;
        border: none; /* Hapus border pada container utama */
        box-shadow: none;
    }

    .twh-table {
        border: 0;
        background: transparent; /* Biarkan background diatur oleh baris */
    }

    /* Sembunyikan header tabel asli */
    .twh-table thead {
        display: none;
    }

    /* Tampilkan setiap baris sebagai block (kartu) */
    .twh-table tr {
        display: block;
        margin-bottom: 0;
        border-bottom: 10px solid #f9f9f9; /* Jarak antar tabel jika ada banyak */
    }
    
    .twh-table tr:last-child {
        border-bottom: 0;
    }

    /* Tampilkan setiap sel sebagai block dengan labelnya */
    .twh-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start; /* Ubah ke flex-start agar label tetap di atas jika konten panjang */
        text-align: right;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 12px 15px;
        font-size: 14px;
        min-height: 45px;
        gap: 10px; /* Beri jarak antara label dan konten */
        word-break: break-word; /* Pastikan kata panjang tidak meluap */
    }

    .twh-table td:last-child {
        border-bottom: 0;
    }

    /* Buat label menggunakan pseudo-element ::before */
    .twh-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #444;
        text-align: left;
        padding-right: 10px;
        flex-shrink: 0;
        max-width: 40%; /* Batasi lebar label agar konten punya ruang */
    }
    
    /* Styling khusus untuk nilai (data) agar lebih menonjol jika mengandung harga */
    .twh-table td {
        color: #333;
    }
    
    /* Jika teks mengandung "Rp", buat warna hijau dan tebal seperti di gambar */
    .twh-table td {
        color: #333;
    }
}

/* Styling khusus untuk nilai harga (mengandung Rp) */
.twh-table td.twh-cell-price {
    color: #27ae60; /* Warna hijau sesuai gambar */
    font-weight: bold;
}

@media screen and (max-width: 768px) {
    .twh-table td:not(.twh-mobile-heading) {
        font-weight: 500;
    }
    .twh-table td.twh-cell-price {
        color: #27ae60;
    }
}

/* Mobile Heading Feature */
@media screen and (max-width: 768px) {
    .twh-table tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 12px; /* Border radius pada setiap baris */
        overflow: hidden;
        margin-bottom: 20px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .twh-table td.twh-mobile-heading {
        display: block;
        text-align: center;
        background-color: #1a2b3c; /* Warna gelap sesuai gambar */
        color: #ffffff;
        font-weight: bold;
        font-size: 0.7em;
        padding: 15px;
        border: none;
        border-bottom: 1px solid #1a2b3c;
    }

    .twh-table td.twh-mobile-heading::before {
        display: none !important; /* Pastikan label benar-benar hilang */
    }
    
    /* Pastikan konten heading mobile mengambil lebar penuh dan rata tengah */
    .twh-table td.twh-mobile-heading {
        justify-content: center;
    }
}
