/**
 * Blog szűrő oldalsáv – kreativoldal.hu
 * Saját osztálynevek (.klb-*), mert a style.css a Tailwind bg-primary/bg-highlight
 * utility-ket GOMB-ként stílusozza, a CDN-es Tailwind pedig a custom színeket
 * nem minden esetben generálja le megbízhatóan.
 */

.klb-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.klb-side {
    width: 100%;
}

.klb-main {
    flex: 1 1 auto;
    min-width: 0;
}

@media (min-width: 1024px) {
    .klb-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .klb-side {
        width: 296px;
        flex: 0 0 296px;
        position: sticky;
        top: 96px;
    }
}

/* --- Panel --- */
.klb-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.klb-panel+.klb-panel {
    margin-top: 1rem;
}

.klb-panel-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: "Paytone One", sans-serif;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #0f172a;
    margin: 0 0 .9rem;
}

.klb-panel-title .material-symbols-outlined {
    font-size: 1.1rem;
    color: #004AAD;
}

/* --- Kereső --- */
.klb-search {
    position: relative;
    display: flex;
    align-items: center;
}

.klb-search-icon {
    position: absolute;
    left: .75rem;
    color: #94a3b8;
    font-size: 1.25rem;
    pointer-events: none;
}

.klb-search input[type="search"],
.klb-search input[type="text"] {
    width: 100%;
    padding: .7rem 3rem .7rem 2.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-family: "Pavanam", sans-serif;
    font-size: .95rem;
    color: #0f172a;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    -webkit-appearance: none;
    appearance: none;
}

.klb-search input::placeholder {
    color: #94a3b8;
}

.klb-search input:focus {
    background: #ffffff;
    border-color: #38B6FF;
    box-shadow: 0 0 0 3px rgba(56, 182, 255, .18);
}

.klb-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.klb-search-btn {
    position: absolute;
    right: .3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 8px;
    background: #004AAD;
    color: #fff;
    cursor: pointer;
    transition: background-color .2s, transform .15s;
}

.klb-search-btn:hover {
    background: #003580;
}

.klb-search-btn:active {
    transform: scale(.95);
}

.klb-search-btn .material-symbols-outlined {
    font-size: 1.2rem;
    color: #fff !important;
}

/* --- Kategória lista --- */
.klb-cats-wrap {
    position: relative;
}

/* Mobilon/tableten vízszintesen görgethető a chip-sor → jobb szélen halványítás jelzi */
@media (max-width: 1023px) {
    .klb-cats-wrap::after {
        content: '';
        position: absolute;
        top: 0;
        right: -.25rem;
        bottom: .35rem;
        width: 2.75rem;
        background: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 70%);
        pointer-events: none;
    }
}

.klb-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: .35rem;
}

.klb-cats::-webkit-scrollbar {
    height: 6px;
}

.klb-cats::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

.klb-cats li {
    margin: 0;
    flex: 0 0 auto;
}

.klb-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    white-space: nowrap;
    padding: .5rem .75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font-size: .92rem;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .18s, border-color .18s, color .18s;
}

.klb-cat:hover {
    background: #eff6ff;
    border-color: #38B6FF;
    color: #004AAD;
}

.klb-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.35rem;
    padding: 0 .4rem;
    border-radius: 99px;
    background: #e2e8f0;
    color: #475569;
    font-size: .72rem;
    font-weight: 700;
}

.klb-cat.is-active {
    background: #004AAD;
    border-color: #004AAD;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 74, 173, .22);
}

.klb-cat.is-active .klb-cat-count {
    background: rgba(255, 255, 255, .22);
    color: #ffffff;
}

@media (min-width: 1024px) {
    .klb-cats {
        flex-direction: column;
        overflow: visible;
        gap: .35rem;
        padding-bottom: 0;
    }

    .klb-cats li {
        flex: 1 1 auto;
    }

    .klb-cat {
        white-space: normal;
    }
}

/* --- Rendezés select --- */
.klb-select {
    position: relative;
    display: block;
}

.klb-select select {
    width: 100%;
    padding: .65rem 2.2rem .65rem .8rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font-family: "Pavanam", sans-serif;
    font-size: .92rem;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color .2s, box-shadow .2s;
}

.klb-select select:focus {
    border-color: #38B6FF;
    box-shadow: 0 0 0 3px rgba(56, 182, 255, .18);
}

.klb-select .material-symbols-outlined {
    position: absolute;
    right: .55rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94a3b8;
    font-size: 1.2rem;
}

/* --- Aktív szűrők / találatszám --- */
.klb-resultbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.5rem;
}

.klb-count {
    font-size: .95rem;
    color: #475569;
}

.klb-count strong {
    color: #0f172a;
    font-weight: 700;
}

.klb-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .5rem .3rem .7rem;
    border-radius: 99px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #004AAD;
    font-size: .82rem;
    text-decoration: none;
    transition: background-color .18s, border-color .18s;
}

.klb-chip:hover {
    background: #dbeafe;
    border-color: #38B6FF;
}

.klb-chip .material-symbols-outlined {
    font-size: 1rem;
    color: inherit !important;
}

.klb-reset {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: #64748b;
    text-decoration: none;
    transition: color .18s;
}

.klb-reset:hover {
    color: #FF5757;
}

.klb-reset .material-symbols-outlined {
    font-size: 1rem;
    color: inherit !important;
}

/* --- Oldalsávi CTA --- */
.klb-cta {
    background: linear-gradient(135deg, #004AAD 0%, #0066CC 55%, #38B6FF 100%);
    border: 0;
    color: #fff;
}

.klb-cta .klb-panel-title {
    color: #fff;
}

.klb-cta .klb-panel-title .material-symbols-outlined {
    color: #FFD43D;
}

.klb-cta p {
    font-size: .9rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .9);
    margin: 0 0 1rem;
}

.klb-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    padding: .7rem 1rem;
    border-radius: 10px;
    background: #FFD43D;
    color: #0f172a !important;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    transition: background-color .2s, transform .15s;
}

.klb-cta-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.klb-cta-btn .material-symbols-outlined {
    font-size: 1.1rem;
    color: inherit !important;
}
