/* =====================================================
   BFI Cabang Table — Frontend Styles
   ===================================================== */

/* Container */
.bfi-cabang-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

/* ── Reset border bawaan WordPress / theme pada tabel ── */
.bfi-cabang-wrap table,
.bfi-cabang-wrap table th,
.bfi-cabang-wrap table td,
.bfi-cabang-wrap table tr,
.bfi-cabang-wrap table thead,
.bfi-cabang-wrap table tbody {
    border: none !important;
    box-shadow: none;
}

/* ── Search Form ─────────────────────────────────── */
.bfi-search-form {
    margin-bottom: 20px;
}

.bfi-search-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bfi-search-row input[type="text"] {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    border: 1.5px solid #d0d5dd !important;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    background: #fff !important;
    color: #333 !important;
    -webkit-text-fill-color: #333 !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.bfi-search-row input[type="text"]::placeholder {
    color: #aab0bc !important;
    -webkit-text-fill-color: #aab0bc !important;
    opacity: 1;
}

.bfi-search-row input[type="text"]:focus {
    border-color: #1a56b0 !important;
    box-shadow: 0 0 0 3px rgba(26,86,176,0.12);
}

.bfi-search-row button {
    width: 100%;
    padding: 13px 22px;
    background: #1a56b0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(26,86,176,0.18);
}

.bfi-search-row button:hover {
    background: #154391;
}

.bfi-reset {
    display: inline-block;
    text-align: center;
    padding: 7px 14px;
    background: #f0f4ff;
    color: #1a56b0;
    border: 1px solid #b8ccee;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
    align-self: flex-start;
}

.bfi-reset:hover {
    background: #dce8ff;
    color: #154391;
}

/* ── Info Bar ────────────────────────────────────── */
.bfi-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f0f4ff;
    border-left: 4px solid #1a56b0;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: #555;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.bfi-page-info { color: #888; }

/* ── Table Wrapper ───────────────────────────────── */
.bfi-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

/* ── Table ───────────────────────────────────────── */
.bfi-table {
    width: 100%;
    border-collapse: collapse !important;
    font-size: 14px;
    background: #fff;
    border: none !important;
}

.bfi-table thead tr {
    background: #1a56b0;
    color: #fff;
    border: none !important;
}

.bfi-table thead th {
    padding: 13px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: none !important;
}

.bfi-table tbody tr {
	border: 1px solid #f0f0f0 !important;
	transition: background 0.15s;
}

/*.bfi-table tbody tr:first-child {*/
/*    border-top: none !important;*/
/*}*/

.bfi-table tbody tr:hover { background: #f5f8ff; }
.bfi-table tbody tr:nth-child(even) { background: #fafafa; }
.bfi-table tbody tr:nth-child(even):hover { background: #f0f4ff; }

.bfi-table tbody td {
    padding: 12px 14px;
    vertical-align: top;
    color: #333;
    line-height: 1.5;
    border: none !important;
}

/* Column widths */
.bfi-table .col-no     { width: 50px; text-align: center; color: #888; font-weight: 600; }
.bfi-table .col-kota   { min-width: 180px; color: #444; }
.bfi-table .col-nama   { min-width: 200px; font-weight: 600; color: #1a1a2e; }
.bfi-table .col-alamat { min-width: 280px; font-size: 13px; color: #555; }
.bfi-table .col-aksi   { text-align: center; white-space: nowrap; }

/* ── Tombol "Ajukan Sekarang" ──────────────────── */
.bfi-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #f4901e;
    color: #fff !important;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(244,144,30,0.25);
}

.bfi-btn:hover {
    background: #d97b10;
    transform: translateY(-1px);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(244,144,30,0.35);
}

/* ── Search Highlight ────────────────────────────── 
.bfi-table mark {
    background: #fff176;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}
*/
/* ── No Results ──────────────────────────────────── */
.bfi-no-results {
    text-align: center;
    padding: 40px !important;
    color: #888;
    font-size: 15px;
}

/* ── Pagination ──────────────────────────────────── */
.bfi-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin: 20px 0 8px;
    align-items: center;
}

.bfi-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333 !important;
    font-size: 14px;
    text-decoration: none !important;
    transition: all 0.15s;
}

.bfi-page-btn:hover {
    background: #f0f4ff;
    border-color: #1a56b0;
    color: #1a56b0 !important;
}

.bfi-page-btn.active {
    background: #1a56b0;
    border-color: #1a56b0;
    color: #fff !important;
    font-weight: 700;
    pointer-events: none;
}

.bfi-ellipsis {
    padding: 0 4px;
    color: #aaa;
    line-height: 38px;
}

.bfi-page-counter {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin: 4px 0 0;
}

/* ── Mobile: Card style ──────────────────────────── */
@media (max-width: 768px) {

    .bfi-table thead { display: none; }

    .bfi-table,
    .bfi-table tbody { display: block; width: 100%; }

    .bfi-table tr {
        display: block;
        margin-bottom: 14px;
        border: 1px solid #e0e7f3 !important;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    }

    /* Sembunyikan kolom nomor di mobile */
    .bfi-table td.col-no { display: none; }

    .bfi-table td {
        display: block;
        border: none !important;
        border-bottom: 1px solid #f0f4f8 !important;
        line-height: 1.5;
    }

    .bfi-table td:last-child {
        border-bottom: none !important;
    }

    /* Kota — tampil pertama sebagai label kategori */
    .bfi-table td.col-kota {
        font-size: 12px;
        font-weight: 600;
        color: #7a90b0;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding: 12px 16px 4px;
        border-bottom: none !important;
    }

    /* Nama — judul kartu biru bold, tepat di bawah kota */
    .bfi-table td.col-nama {
        font-size: 15px;
        font-weight: 700;
        color: #1a56b0;
        padding: 2px 16px 10px;
        border-bottom: 1px solid #f0f4f8 !important;
    }

    /* Alamat */
    .bfi-table td.col-alamat {
        font-size: 13.5px;
        color: #444;
        padding: 10px 16px;
    }

    /* Tombol full width */
    .bfi-table td.col-aksi {
        padding: 12px 16px 14px;
        text-align: center;
        border-top: none !important;
    }

    .bfi-table td.col-aksi .bfi-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 13px 0;
        font-size: 14px;
        border-radius: 50px;
    }

    .bfi-info-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .bfi-page-btn { min-width: 32px; height: 32px; font-size: 13px; padding: 0 8px; }
}
