/* Category directory: native disclosure and search behavior from CSDOWN,
   using the supplied CS.COM.RU theme's charcoal and orange palette. */
.cscom-categories { background: #10131a; border: 1px solid #292d38; border-radius: 10px; overflow: hidden; }
.cscom-categories [hidden] { display: none !important; }
.cscom-categories details { width: 100%; margin: 0; }
.cscom-categories summary { cursor: pointer; list-style: none; }
.cscom-categories summary::before { display: none; content: none; }
.cscom-categories summary::-webkit-details-marker { display: none; }
.cscom-categories .cscom-category-heading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 17px 18px; background: #151922; border-bottom: 1px solid #292d38; }
.cscom-categories .cscom-category-heading .cside-cat-head-ico { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; color: #ff5a00; }
.cscom-categories .cscom-category-heading .cside-cat-head-ico svg { width: 15px; height: 15px; }
.cscom-categories .cscom-category-heading .cside-cat-title { flex: 1; margin: 0; color: #f1f2f5; font-size: 15px; font-weight: 700; line-height: 1.4; }
.cscom-categories .cside-cat-title > span { color: #ff5a00; }
.cscom-categories .cscom-category-body { padding: 14px 12px 13px; }
.cscom-categories .cscom-category-search { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 0 11px; background: #0c0f15; border: 1px solid #303541; border-radius: 6px; color: #7f8798; }
.cscom-category-search svg { flex: 0 0 15px; width: 15px; height: 15px; }
.cscom-categories .cscom-category-search input { min-width: 0; width: 100%; height: 36px; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #e6e9f0; font: inherit; font-size: 12px; }
.cscom-category-search input::placeholder { color: #858d9c; opacity: 1; }
.cscom-categories .cscom-category-search:focus-within { border-color: #ff5a00; box-shadow: 0 0 0 2px rgb(255 90 0 / 12%); }
.cscom-categories .cscom-category-all { display: block; margin: 0 0 8px; padding: 9px 10px; border-radius: 5px; color: #c8ccd6; background: #191d27; font-size: 12px; font-weight: 600; line-height: 1.4; }
.cscom-categories .cscom-category-tree, .cscom-categories .cscom-category-children { margin: 0; padding: 0; list-style: none; }
.cscom-categories .cscom-category-branch { min-width: 0; margin: 2px 0; padding: 0; list-style: none; }
.cscom-categories .cscom-category-node > summary { display: flex; align-items: center; gap: 5px; border-radius: 5px; }
.cscom-categories .cscom-category-link { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 35px; padding: 8px 9px; border-radius: 5px; color: #bfc5d0; font-size: 12px; font-weight: 500; line-height: 1.45; text-decoration: none; transition: color .15s, background-color .15s; }
.cscom-categories .cscom-category-tree > .cscom-category-branch > .cscom-category-link,
.cscom-categories .cscom-category-tree > .cscom-category-branch > details > summary > .cscom-category-link { font-weight: 600; }
.cscom-category-label { min-width: 0; overflow-wrap: anywhere; }
.cscom-categories .cscom-category-count { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 24px; padding: 2px 5px; border: 1px solid rgb(255 90 0 / 20%); border-radius: 4px; background: rgb(255 90 0 / 8%); color: #ff8848; font-size: 10px; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; }
.cscom-categories .cscom-category-toggle { display: inline-flex; flex: 0 0 24px; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 5px; border: 1px solid #323846; border-radius: 5px; color: #969fae; }
.cscom-category-toggle svg { width: 14px; height: 14px; transition: transform .15s; }
.cscom-category-node[open] > summary > .cscom-category-toggle svg,
.cscom-category-directory[open] > summary > .cscom-category-toggle svg { transform: rotate(180deg); }
.cscom-categories .cscom-category-children { margin: 2px 0 7px 10px; padding-left: 10px; }
.cscom-categories .cscom-category-children > .cscom-category-branch { position: relative; }
.cscom-categories .cscom-category-children > .cscom-category-branch::before { content: ""; position: absolute; top: 17px; left: -10px; width: 9px; height: 1px; background: #303542; pointer-events: none; }
.cscom-categories .cscom-category-children > .cscom-category-branch::after { content: ""; position: absolute; top: -2px; bottom: -2px; left: -10px; width: 1px; background: #303542; pointer-events: none; }
.cscom-categories .cscom-category-children > .cscom-category-branch:last-child::after { bottom: auto; height: 19px; }
.cscom-categories .cscom-category-unified > .cscom-category-node > summary { background: #171b24; }
.cscom-categories .cscom-category-unified > .cscom-category-node > summary > .cscom-category-link { color: #f0f2f6; }
.cscom-categories .cscom-category-unified.is-active > .cscom-category-node > summary > .cscom-category-link { color: #ff945b; }
.cscom-categories .cscom-category-children .cscom-category-link { min-height: 33px; padding-block: 7px; font-size: 11px; }
.cscom-categories .cscom-category-link:hover, .cscom-categories .cscom-category-all:hover { color: #fff; background: #202530; }
.cscom-categories .is-active > .cscom-category-link,
.cscom-categories .is-active > details > summary > .cscom-category-link,
.cscom-categories .cscom-category-all.is-active { color: #ff945b; background: rgb(255 90 0 / 10%); box-shadow: inset 2px 0 #ff5a00; }
.cscom-categories .cscom-category-link[aria-current="page"] { color: #ffa16d; }
.cscom-categories .cscom-category-link:focus-visible,
.cscom-categories .cscom-category-all:focus-visible,
.cscom-categories summary:focus-visible { outline: 2px solid #ff5a00; outline-offset: 2px; }
.cscom-categories summary:hover > .cscom-category-toggle { border-color: #ff5a00; color: #ff8b4d; }
.cscom-categories .cscom-category-empty { margin: 12px 8px 2px; color: #9fa7b8; font-size: 11px; line-height: 1.6; }
.cscom-mobile-categories { flex: 0 0 100%; width: 100%; max-width: 100%; padding: 0 15px; }
.cscom-mobile-categories:empty { display: none; }
@media (max-width: 1280px) {
    .cscom-mobile-categories .cscom-categories { margin-bottom: 24px; }
    .cscom-mobile-categories .cscom-category-tree { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 2px 12px; }
}
@media (max-width: 850px) {
    .cscom-mobile-categories .cscom-category-tree { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cscom-mobile-categories .cscom-category-body { max-height: 460px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #63361f #10131a; }
}
@media (max-width: 500px) {
    .cscom-mobile-categories .cscom-category-tree { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .cscom-categories *, .cscom-categories *::before, .cscom-categories *::after { transition: none !important; }
}
