/* ── eFenix Desk — Knowledge Base Frontend ─────────────────────────── */

.efenix-kb { font-family: inherit; line-height: 1.6; color: #1d2327; }

/* Toolbar */
.efenix-kb-toolbar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.efenix-kb-search-form { display: flex; gap: 8px; flex: 1 1 auto; flex-wrap: wrap; }
.efenix-kb-search-input {
    flex: 1 1 200px;
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
}
.efenix-kb-search-input:focus { outline: none; border-color: #2271b1; box-shadow: 0 0 0 2px rgba(34,113,177,.15); }

/* Buttons */
.efenix-kb-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #2271b1;
    background: #2271b1;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.efenix-kb-btn:hover { background: #135e96; border-color: #135e96; color: #fff; }
.efenix-kb-btn-ghost { background: transparent; color: #2271b1; }
.efenix-kb-btn-ghost:hover { background: #f0f6fc; color: #135e96; }

/* Category tabs */
.efenix-kb-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.efenix-kb-cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #c3c4c7;
    background: #f6f7f7;
    color: #50575e;
    font-size: 13px;
    text-decoration: none;
    transition: all .15s;
}
.efenix-kb-cat-tab:hover,
.efenix-kb-cat-tab.is-active { background: #2271b1; border-color: #2271b1; color: #fff; }
.efenix-kb-cat-tab .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* Results count */
.efenix-kb-results-count { font-size: 13px; color: #646970; margin: 0 0 16px; }

/* Grid */
.efenix-kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.efenix-kb-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.efenix-kb-card:hover { border-color: #2271b1; box-shadow: 0 2px 8px rgba(0,0,0,.08); color: inherit; }

.efenix-kb-card-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #646970;
    margin-bottom: 8px;
}
.efenix-kb-card-cat .dashicons { font-size: 13px; width: 13px; height: 13px; }
.efenix-kb-card-title { font-size: 16px; font-weight: 600; margin: 0 0 8px; line-height: 1.4; }
.efenix-kb-card-excerpt { font-size: 13px; color: #646970; flex: 1; margin: 0 0 12px; }
.efenix-kb-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #646970;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
}
.efenix-kb-card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.efenix-kb-card-meta .dashicons { font-size: 13px; width: 13px; height: 13px; }

/* Featured badge */
.efenix-kb-badge-featured {
    background: #f0b429;
    color: #7d4e01;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
}

/* Empty state */
.efenix-kb-empty { text-align: center; padding: 60px 20px; background: #fff; border: 1px solid #dcdcde; border-radius: 6px; }
.efenix-kb-empty .dashicons { font-size: 40px; width: 40px; height: 40px; color: #c3c4c7; display: block; margin: 0 auto 12px; }
.efenix-kb-empty p { color: #646970; margin: 0; }

/* Pagination */
.efenix-kb-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 24px; }
.efenix-kb-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    background: #fff;
    color: #2271b1;
    font-size: 14px;
    text-decoration: none;
    transition: all .15s;
}
.efenix-kb-page-btn:hover { background: #f0f6fc; border-color: #2271b1; }
.efenix-kb-page-btn.is-current { background: #2271b1; border-color: #2271b1; color: #fff; font-weight: 600; }

/* ── Article Detail ────────────────────────────────────────────────────────── */

.efenix-kb-detail { max-width: 860px; }

/* Breadcrumb */
.efenix-kb-breadcrumb { font-size: 13px; color: #646970; margin-bottom: 24px; }
.efenix-kb-breadcrumb a { color: #2271b1; text-decoration: none; }
.efenix-kb-breadcrumb a:hover { text-decoration: underline; }
.efenix-kb-breadcrumb-sep { margin: 0 6px; }

/* Article header */
.efenix-kb-article-header { margin-bottom: 28px; }
.efenix-kb-article-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #646970;
    margin-bottom: 10px;
}
.efenix-kb-article-cat .dashicons { font-size: 14px; width: 14px; height: 14px; }
.efenix-kb-article-title { font-size: 28px; font-weight: 700; margin: 0 0 12px; line-height: 1.3; }
.efenix-kb-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #646970;
}
.efenix-kb-article-meta span { display: inline-flex; align-items: center; gap: 4px; }
.efenix-kb-article-meta .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* Content */
.efenix-kb-article-content {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 28px 32px;
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.7;
}
.efenix-kb-article-content h2,
.efenix-kb-article-content h3,
.efenix-kb-article-content h4 { margin-top: 1.5em; }
.efenix-kb-article-content img { max-width: 100%; height: auto; border-radius: 4px; }
.efenix-kb-article-content pre { background: #f6f7f7; padding: 16px; border-radius: 4px; overflow-x: auto; }
.efenix-kb-article-content code { background: #f6f7f7; padding: 1px 5px; border-radius: 3px; font-size: .9em; }
.efenix-kb-article-content pre code { background: none; padding: 0; }

/* Helpful votes */
.efenix-kb-helpful {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 20px 24px;
    text-align: center;
    margin-bottom: 28px;
}
.efenix-kb-helpful-question { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.efenix-kb-helpful-buttons { display: flex; justify-content: center; gap: 12px; }
.efenix-kb-helpful-yes,
.efenix-kb-helpful-no { background: #fff; color: #2271b1; border: 1px solid #c3c4c7; }
.efenix-kb-helpful-yes:hover { background: #edfaef; border-color: #1a7a2a; color: #1a7a2a; }
.efenix-kb-helpful-no:hover { background: #fceaea; border-color: #c02b2b; color: #c02b2b; }
.efenix-kb-helpful-thanks { font-size: 14px; color: #2a8c3a; font-weight: 600; margin: 0; }

/* Back link */
.efenix-kb-back { margin-bottom: 20px; }

/* Notice */
.efenix-kb-notice { padding: 16px 20px; background: #fcf9e8; border-left: 4px solid #f0b429; border-radius: 3px; }

@media (max-width: 640px) {
    .efenix-kb-grid { grid-template-columns: 1fr; }
    .efenix-kb-article-content { padding: 20px; }
    .efenix-kb-article-title { font-size: 22px; }
}
