/* WP Simple Search List — plugin-scoped styles. No Bootstrap dependency. */

/* ── Container ─────────────────────────────────────────────────────────── */
.wpssl-container {
    margin-bottom: 1rem;
}

/* ── Search bar ─────────────────────────────────────────────────────────── */
.wpssl-search-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-bottom: 1rem;
}

.wpssl-search-label {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 1rem;
    font-weight: 400;
    color: #495057;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 4px 0 0 4px;
    white-space: nowrap;
}

.wpssl-search-input {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    padding: 6px 12px;
    font-size: 1rem;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0 4px 4px 0;
    outline: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wpssl-search-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* ── List ───────────────────────────────────────────────────────────────── */
.wpssl-list {
    list-style-type: disc;
    list-style-position: inside;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px 20px;
    /* Column counts are driven by CSS custom properties set inline on .wpssl-container.
       Breakpoint rules below read those vars with fallback defaults. */
    grid-template-columns: repeat(var(--wpssl-cols-phone, 1), 1fr);
}

@media only screen and (min-width: 768px) {
    .wpssl-list {
        grid-template-columns: repeat(var(--wpssl-cols-tablet, 3), 1fr);
    }
}

@media only screen and (min-width: 1024px) {
    .wpssl-list {
        grid-template-columns: repeat(var(--wpssl-cols-desktop, 4), 1fr);
    }
}

/* columns_all: a data attribute on the container triggers a flat override */
.wpssl-container[data-cols-all] .wpssl-list {
    grid-template-columns: repeat(var(--wpssl-cols-all), 1fr) !important;
}

.wpssl-list li {
    margin: 0;
    /* Grid items are atomic — no break-inside needed — but kept for safety
       if the list ever falls back to a non-grid context. */
    break-inside: avoid;
    page-break-inside: avoid;
}

/* ── Hidden state (replaces Bootstrap d-none) ───────────────────────────── */
.wpssl-hidden {
    display: none !important;
}

/* ── Pagination buttons ─────────────────────────────────────────────────── */
.wpssl-actions {
    margin-top: 15px;
    text-align: center;
}

.wpssl-btn {
    display: inline-block;
    margin: 0 4px;
    padding: 4px 15px;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
}

.wpssl-btn:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}
