/**
 * Pagination + pencarian + tabel — tampilan ramah HP.
 */

@media (max-width: 767.98px) {
    /* --- Toolbar Cari --- */
    .list-search-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.9rem;
    }

    .list-search-field {
        flex: 1 1 auto;
        width: 100%;
    }

    .list-search-input {
        font-size: 16px;
        min-height: 44px;
        padding: 0.65rem 1rem;
        border-radius: 12px;
    }

    .list-search-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        width: 100%;
    }

    .list-search-btn {
        min-height: 44px;
        width: 100%;
        flex: none;
        font-size: 0.92rem;
        border-radius: 12px;
    }

    .list-search-status {
        font-size: 0.82rem;
        line-height: 1.45;
        margin-top: 0;
    }

    .list-search-empty {
        font-size: 0.9rem;
        padding: 0.85rem;
    }

    /* --- Pagination Sebelumnya / Selanjutnya --- */
    .list-pager-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-top: 0.85rem;
        padding-top: 0.15rem;
    }

    .list-pager-info {
        text-align: center;
        font-size: 0.82rem;
        line-height: 1.45;
        width: 100%;
    }

    .list-pager-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        width: 100%;
    }

    .list-pager-btn {
        min-height: 44px;
        width: 100%;
        font-size: 0.92rem;
        border-radius: 12px;
        padding: 0.55rem 0.85rem;
    }

    /* --- Tabel → kartu di HP --- */
    .list-table-mobile {
        border: 0;
    }

    .list-table-mobile thead {
        display: none;
    }

    .list-table-mobile tbody tr.list-pager-item {
        display: block;
        margin-bottom: 0.85rem;
        border: 1px solid rgba(74, 13, 24, 0.12) !important;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(74, 13, 24, 0.06);
        overflow: hidden;
    }

    .list-table-mobile tbody td {
        display: block;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        white-space: normal !important;
        border: none !important;
        border-bottom: 1px solid rgba(74, 13, 24, 0.07) !important;
        padding: 0.7rem 0.9rem !important;
        text-align: left;
    }

    .list-table-mobile tbody td:last-child {
        border-bottom: none !important;
    }

    .list-table-mobile tbody td::before {
        display: block;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #745b62;
        margin-bottom: 0.25rem;
    }

    #pengumumanTable.list-table-mobile tbody td:nth-child(1)::before { content: "Tanggal"; }
    #pengumumanTable.list-table-mobile tbody td:nth-child(2)::before { content: "Judul"; }
    #pengumumanTable.list-table-mobile tbody td:nth-child(3)::before { content: "Keterangan"; }

    #jadwalSakramenTable.list-table-mobile tbody td:nth-child(1)::before { content: "Sakramen"; }
    #jadwalSakramenTable.list-table-mobile tbody td:nth-child(2)::before { content: "Jadwal"; }
    #jadwalSakramenTable.list-table-mobile tbody td:nth-child(3)::before { content: "Syarat"; }
    #jadwalSakramenTable.list-table-mobile tbody td:nth-child(4)::before { content: "Keterangan"; }

    #hasilPublikTable.list-table-mobile tbody td:nth-child(1)::before { content: "Peringkat"; }
    #hasilPublikTable.list-table-mobile tbody td:nth-child(2)::before { content: "Program Pastoral"; }
    #hasilPublikTable.list-table-mobile tbody td:nth-child(3)::before { content: "Skor Vi"; }

    #danaItemsTable.list-table-mobile tbody td:nth-child(1)::before { content: "Tanggal"; }
    #danaItemsTable.list-table-mobile tbody td:nth-child(2)::before { content: "Kategori"; }
    #danaItemsTable.list-table-mobile tbody td:nth-child(3)::before { content: "Jenis"; }
    #danaItemsTable.list-table-mobile tbody td:nth-child(4)::before { content: "Judul"; }
    #danaItemsTable.list-table-mobile tbody td:nth-child(5)::before { content: "Donatur"; }
    #danaItemsTable.list-table-mobile tbody td:nth-child(6)::before { content: "Nominal"; }
    #danaItemsTable.list-table-mobile tbody td:nth-child(7)::before { content: "Keterangan"; }

    #pengumumanAdminTable.list-table-mobile tbody td:nth-child(1)::before { content: "Urutan"; }
    #pengumumanAdminTable.list-table-mobile tbody td:nth-child(2)::before { content: "Tanggal"; }
    #pengumumanAdminTable.list-table-mobile tbody td:nth-child(3)::before { content: "Judul"; }
    #pengumumanAdminTable.list-table-mobile tbody td:nth-child(4)::before { content: "Isi"; }
    #pengumumanAdminTable.list-table-mobile tbody td:nth-child(5)::before { content: "Status"; }
    #pengumumanAdminTable.list-table-mobile tbody td:nth-child(6)::before { content: "Aksi"; }

    #pengumumanAdminTable.list-table-mobile tbody td:nth-child(6) .btn {
        min-height: 40px;
        margin: 0.15rem 0.25rem 0.15rem 0;
    }

    .list-table-mobile .table-responsive,
    .table-responsive:has(.list-table-mobile) {
        overflow: visible;
    }

    .list-table-mobile tbody td.long-text-display .long-text-content {
        font-size: 0.92rem;
        line-height: 1.65;
    }

    mark.list-search-highlight {
        padding: 0.12em 0.15em;
    }

    /* Pengumuman beranda — lebar kolom desktop tidak dipaksa di HP */
    #pengumumanTable th:nth-child(2),
    #pengumumanTable td:nth-child(2) {
        width: auto !important;
        max-width: none !important;
    }

    /* Daftar edisi warta */
    .warta-list-item {
        min-height: 48px;
        padding: 0.95rem 1rem;
        border-radius: 14px;
        -webkit-tap-highlight-color: rgba(214, 177, 93, 0.25);
    }

    .warta-list-item strong {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    /* Kegiatan paroki — 1 kolom penuh */
    #kegiatanParokiGrid .kegiatan-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #kegiatanParokiGrid .beranda-artikel-card {
        border-radius: 14px;
    }
}

@media (max-width: 575px) {
    .list-search-toolbar {
        padding: 0.75rem;
    }
}
