/* ── BloomSocial Filter Plugin v2.0 ── */

.bsf-wrapper {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    font-family: inherit;
}

/* ── Sidebar ── */
.bsf-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #f8f8fb;
    border-radius: 12px;
    padding: 22px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    box-sizing: border-box;
}

.bsf-sidebar-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #111;
    letter-spacing: .3px;
}

.bsf-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bsf-category-item {
    margin-bottom: 10px;
}

.bsf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: #333;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

.bsf-checkbox-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #6c63ff;
    flex-shrink: 0;
}

/* ── Main ── */
.bsf-main {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* ── Toolbar ── */
.bsf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.bsf-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bsf-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsf-sort-label {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bsf-sort-select,
.bsf-per-page-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    color: #444;
}

.bsf-total-count {
    font-size: 13px;
    color: #777;
}

/* ── Grid ── */
.bsf-grid {
    display: grid;
    gap: 20px;
}

.bsf-cols-1 { grid-template-columns: 1fr; }
.bsf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bsf-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bsf-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ── */
.bsf-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
    border: 1px solid transparent;
}

.bsf-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.bsf-card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.bsf-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bsf-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.4;
    transition: color .2s ease;
}

.bsf-card-excerpt {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.bsf-card-date {
    font-size: 12px;
    color: #aaa;
    margin-top: auto;
}

.bsf-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ── Loading ── */
.bsf-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.bsf-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: bsf-spin .7s linear infinite;
}

@keyframes bsf-spin { to { transform: rotate(360deg); } }

/* ── Pagination ── */
.bsf-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.bsf-page-btn {
    padding: 7px 13px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #444;
    transition: all .15s ease;
    line-height: 1;
}

.bsf-page-btn:hover:not(:disabled):not(.bsf-active) {
    border-color: #6c63ff;
    color: #6c63ff;
}

.bsf-page-btn.bsf-active {
    background: #6c63ff;
    border-color: #6c63ff;
    color: #fff;
    font-weight: 600;
}

.bsf-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.bsf-page-ellipsis {
    padding: 0 4px;
    color: #aaa;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* ── Responsive (defaults — overridden by widget inline styles) ── */
@media (max-width: 768px) {
    .bsf-wrapper {
        flex-direction: column;
    }
    .bsf-sidebar {
        width: 100% !important;
    }
    .bsf-cols-2,
    .bsf-cols-3,
    .bsf-cols-4 {
        grid-template-columns: 1fr;
    }
    .bsf-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
