/* ── Controls bar ────────────────────────────────────────────────────────── */

.fbl-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.fbl-search-wrap {
    flex: 1 1 200px;
    max-width: 360px;
}

.fbl-search {
    width: 100%;
    padding: 9px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 50px;
    background: #fff;
    color: #07072D;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s;
}
.fbl-search::placeholder { color: #aaa; }
.fbl-search:focus { border-color: #FFC500; }

.fbl-per-page-wrap {
    flex: 0 0 auto;
    white-space: nowrap;
}

.fbl-per-page-label {
    font-size: 14px;
    color: #555;
}

.fbl-per-page {
    padding: 7px 32px 7px 12px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 50px;
    background: #fff;
    color: #07072D;
    margin: 0 4px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2307072D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color .15s;
}
.fbl-per-page:focus { border-color: #FFC500; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.fbl-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 14px;
}
.fbl-breadcrumb:empty { display: none; }

.fbl-crumb {
    color: #6699CC;
    text-decoration: none;
    font-weight: 600;
}
.fbl-crumb:hover { text-decoration: underline; }

.fbl-crumb-sep { color: #bbb; }

.fbl-crumb-current {
    color: #07072D;
    font-weight: 700;
}

/* ── Table wrapper ───────────────────────────────────────────────────────── */

.fbl-wrapper {
    margin: 1.5em 0;
    font-size: 16px;
    line-height: 1.6;
    color: #07072D;
}

.fbl-table-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(7,7,45,0.07);
    background: #fff;
    overflow-x: auto;
    overflow-y: clip;
}

/* ── Table ───────────────────────────────────────────────────────────────── */

.fbl-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: auto;
}

.fbl-table thead th {
    background: #F1F0F4;
    padding: 12px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #07072D;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    user-select: none;
}

.fbl-table thead th.fbl-sortable {
    cursor: pointer;
    transition: background .15s;
}
.fbl-table thead th.fbl-sortable:hover { background: #D3E5EF; }

.fbl-sort-icon {
    display: inline-block;
    width: 10px;
    margin-left: 4px;
    color: #aaa;
    font-size: 11px;
}
.fbl-sort-icon::before { content: '\2195'; }

.fbl-sort-asc .fbl-sort-icon::before {
    content: '\2191';
    color: #07072D;
}
.fbl-sort-desc .fbl-sort-icon::before {
    content: '\2193';
    color: #07072D;
}

.fbl-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    color: #07072D;
}
.fbl-table tbody tr:hover { background: #F9F3ED; }
.fbl-table tbody tr:last-child td { border-bottom: none; }

/* File Name column expands to fill available space */
.fbl-table .fbl-name { width: 100%; }

.fbl-name a {
    font-weight: 600;
    color: #07072D;
    text-decoration: none;
}
.fbl-name a:hover { color: #6699CC; }

/* Folder rows */
.fbl-folder-row { cursor: pointer; }

.fbl-name a.fbl-folder-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.fbl-folder-icon {
    color: #AA8E6F;
    flex-shrink: 0;
}

.fbl-type .fbl-type-folder {
    background: #D3E5EF;
}

/* Download column: shrink to fit button content */
.fbl-table th:last-child,
.fbl-table td.fbl-download {
    width: 1%;
    white-space: nowrap;
}

.fbl-size,
.fbl-type,
.fbl-modified {
    white-space: nowrap;
    font-size: 14px;
    color: #555;
}

.fbl-type span {
    display: inline-block;
    background: #F1F0F4;
    color: #07072D;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 30px;
}

.fbl-table .fbl-col-modified { display: none; }

/* ── Download button ─────────────────────────────────────────────────────── */

.fbl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #07072D;
    background: #FFC500;
    border: 2px solid #FFC500;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
}
.fbl-btn:hover { opacity: .88; color: #07072D; }

/* Open (folder) button: secondary, outlined */
.fbl-btn-open {
    background: transparent;
    border-color: #6699CC;
    color: #07072D;
}
.fbl-btn-open:hover {
    background: #6699CC;
    border-color: #6699CC;
    color: #fff;
    opacity: 1;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.fbl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0 4px;
    flex-wrap: wrap;
}

.fbl-pagination-info {
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.fbl-pagination a,
.fbl-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 50px;
    text-decoration: none;
    color: #07072D;
    background: #fff;
    font-weight: 600;
    transition: background .15s, border-color .15s;
}
.fbl-pagination a:hover {
    border-color: #FFC500;
    background: #fff6cc;
}

.fbl-pagination .fbl-page-current {
    background: #FFC500;
    border-color: #FFC500;
    color: #07072D;
}

.fbl-pagination .fbl-page-disabled {
    color: #ccc;
    cursor: default;
    background: #fafafa;
    border-color: #eee;
}

.fbl-pagination .fbl-page-info {
    border: none;
    background: transparent;
    font-size: 13px;
    color: #888;
    min-width: auto;
}

/* ── States ──────────────────────────────────────────────────────────────── */

.fbl-no-results {
    text-align: center;
    color: #888;
    padding: 32px 16px;
    font-size: 16px;
}

.fbl-error {
    padding: 12px 16px;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #a00;
    margin: 1em 0;
}

.fbl-empty {
    padding: 12px 16px;
    background: #F1F0F4;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #555;
    margin: 1em 0;
}
