/* child-style */
/*
Theme Name:     Bukids B2 Child
Theme URI:      https://www.bukids.com/
Description:    Bukids custom child theme for B2 PRO 5.9.42
Author:         Bukids
Author URI:     https://www.bukids.com/
Template:       b2
Version:        2.0.339
Text Domain:    bukids-b2-child
*/

/* 2.0.242: shared right rail. Preserve each page's visibility/breakpoints;
   no nested scrollbar and no second CSS-sticky mechanism. The native B2
   wrapper handles both short/tall rails and the article/footer boundary. */
#secondary.widget-area > .sidebar.bk-sidebar-managed {
    position: relative;
    top: auto;
}
#secondary.widget-area > .sidebar.bk-sidebar-managed .sidebar-innter {
    box-sizing: border-box;
    max-height: none;
    overflow: visible;
}
#secondary.widget-area > .sidebar.bk-sidebar-managed .sidebar-innter > .widget:last-child {
    margin-bottom: 0;
}

/* 2.0.239: remove DPlayer's whole speed / loop settings control. Keeping its
   internal nodes lets the parent player initialise normally. This also applies
   to recreated players and fullscreen, without JS observers or extra requests.
   Subtitle, auto-next, volume and fullscreen controls are separate siblings. */
.dplayer .dplayer-setting {
    display: none !important;
}

/* 2.0.214: scale B2's existing watermark by the actual player, not the viewport.
   Keep its configured image, opacity and position; no JS or extra requests.
   B2's global/mobile pixel caps are important, so override only this player. */
#post-style-5-player.dplayer .dplayer-logo {
    width: 12%;
    min-width: 40px;
    max-width: 180px !important;
    height: auto;
    max-height: none !important;
    pointer-events: none;
}
#post-style-5-player.dplayer .dplayer-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
}

/* Global overrides belong here. Collection styles are conditionally loaded
   from assets/css/collection.css to keep unrelated pages lightweight. */

/* Mobile footer: remove the publishing shortcut and share space per link,
   not per left/right group (their configured item counts may differ).
   Keep B2's visibility, scroll behavior, click handlers and safe-area padding. */
@media screen and (max-width:1180px) {
    #mobile-footer-menu > .mobile-footer-center { display:none; }
    #mobile-footer-menu > .mobile-footer-left,
    #mobile-footer-menu > .mobile-footer-right { display:contents; }
    #mobile-footer-menu > .mobile-footer-left > a,
    #mobile-footer-menu > .mobile-footer-right > a {
        flex:1 1 0; width:auto; min-width:0; min-height:44px;
        box-sizing:border-box; display:flex; flex-direction:column;
        align-items:center; justify-content:center; text-align:center;
    }
}

/* Search uses the existing topic grid, without article metadata. */
/* Header search: slightly wider, with the icon participating in layout. */
.site-header .top-search .mobile-search-input[role="search"] {
    display:flex; align-items:center; width:clamp(180px,15vw,220px); max-width:100%; height:36px;
    box-sizing:border-box; padding:0; margin:0; border-radius:4px;
    border:1px solid transparent; background:#f5f6f7;
}
.site-header .top-search .mobile-search-input[role="search"] input {
    flex:1 1 auto; width:0; min-width:0; height:100%; box-sizing:border-box;
    padding:0 0 0 12px; margin:0; font:inherit; font-size:14px; line-height:normal; text-align:left;
    background:transparent; border:0; box-shadow:none; color:#30343b;
}
.site-header .top-search .mobile-search-input[role="search"] .search-button-action {
    position:static; display:flex; align-items:center; justify-content:center;
    flex:0 0 36px; width:36px; height:100%; min-height:0; padding:0; margin:0;
    line-height:1; border:0; background:transparent;
}
.site-header .top-search .mobile-search-input[role="search"] .search-button-action i { line-height:1; }
.site-header .top-search .mobile-search-input[role="search"]:focus-within { outline:0; border-color:#98a3af; background:#f5f6f7; box-shadow:none; }
.site-header .top-search .mobile-search-input[role="search"]:has(:focus-visible) { outline:2px solid #687385; outline-offset:2px; }
.site-header .top-search .mobile-search-input[role="search"] input:focus { background:transparent; box-shadow:none; outline:0; color:#30343b; }
.site-header .top-search .mobile-search-input[role="search"] input:-webkit-autofill,
.site-header .top-search .mobile-search-input[role="search"] input:-webkit-autofill:hover,
.site-header .top-search .mobile-search-input[role="search"] input:-webkit-autofill:focus {
    -webkit-box-shadow:0 0 0 1000px #f5f6f7 inset !important; box-shadow:0 0 0 1000px #f5f6f7 inset !important;
    -webkit-text-fill-color:#30343b; caret-color:#30343b; animation:none;
}
.site-header .top-search .mobile-search-input[role="search"] input:autofill { box-shadow:0 0 0 1000px #f5f6f7 inset !important; background:#f5f6f7; color:#30343b; }
.site-header .top-search .mobile-search-input[role="search"] .search-button-action svg { display:block; width:18px; height:18px; }
@media (max-width:1180px) {
    .site-header .top-search .mobile-search-input[role="search"] { width:180px; }
    .search-box-content .search-input { font-size:16px; }
}
.search .bk2-search-card-meta { margin-top:auto; padding-top:12px; font-size:12px; line-height:1.65; color:#687385; white-space:normal; overflow-wrap:anywhere; }
.search .bk2-search-card-meta span { white-space:normal; }
.search .bk2-search-container { padding-top:24px; }
.search .bk2-topic-search {
    background:transparent; color:inherit;
    --bk-primary:var(--b2color,#fd4c4c);
    --bk-primary-dark:var(--b2color,#fd4c4c);
    --bk-ink:#222; --bk-muted:#666; --bk-light:#888;
    --bk-line:#e6e9ef;
}
.search .bk2-topic-search .bukids-library-form { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; margin-bottom:12px; }
.search .bk2-topic-search .bukids-search-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:stretch; }
.search .bk2-topic-search .bukids-search-field { position:relative; grid-column:auto; min-width:0; height:44px; min-height:44px; box-sizing:border-box; padding:0; margin:0; background:#fff; border:1px solid #d9dee5; border-radius:4px; }
.search .bk2-topic-search .bukids-search-field input { width:100%; min-width:0; height:100%; min-height:0; box-sizing:border-box; padding:0 14px; margin:0; border:0; border-radius:3px; background:transparent; font-size:14px; line-height:22px; appearance:none; -webkit-appearance:none; }
.search .bk2-topic-search .bukids-primary-button { min-height:44px; padding:0 22px; border-radius:4px; box-shadow:none; background:var(--b2color,#fd4c4c); border-color:var(--b2color,#fd4c4c); }
.search .bk2-topic-search .bukids-search-row > .bukids-primary-button { height:44px; min-height:44px; box-sizing:border-box; margin:0; border-width:1px; border-style:solid; font-size:14px; line-height:22px; appearance:none; -webkit-appearance:none; }
.search .bk2-topic-search .bukids-results-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:16px; padding:0 0 12px; margin-bottom:20px; border-bottom:1px solid #e6e9ef; }
.search .bk2-topic-search .bukids-results-toolbar > div { min-width:0; }
.search .bk2-topic-search .bk2-search-query { display:flex; flex-wrap:wrap; align-items:center; gap:2px 12px; overflow-wrap:anywhere; margin:0; padding:8px 0; min-height:44px; font-size:13px; line-height:22px; color:var(--bk-muted); }
.search .bk2-topic-search .bk2-search-query-term { min-width:0; max-width:100%; color:var(--bk-ink); }
.search .bk2-topic-search .bk2-search-summary-item { white-space:nowrap; }
.search .bk2-search-reset { display:inline-flex; align-items:center; min-height:44px; flex-shrink:0; font-size:13px; color:#687385; text-decoration:underline; text-underline-offset:3px; }
.search .bk2-topic-search .bukids-card { border-radius:var(--bk-radius,6px); box-shadow:none; transform:none; }
.search .bk2-topic-search .bukids-card:hover { border-color:var(--bk-line); background:#fcfcfd; }
.search .bk2-topic-search .bk2-search-card-meta,
.search .bk2-topic-search .bk2-search-reset { color:var(--bk-muted); }
.search .bk2-topic-search .bukids-card-media { background:#f5f6f7; }
.search .bk2-topic-search .bukids-search-field:focus-within {
    border-color:var(--b2color,#fd4c4c); outline:none; box-shadow:none;
}
/* The mobile library clips overflow-x, including the field's left outline.
   Paint over its existing border, above autofill, without extending outwards.
   Absolute insets start at the padding box: -1px includes the 1px border. */
.search .bk2-topic-search .bukids-search-field:focus-within::after {
    content:""; position:absolute; inset:-1px; z-index:1; pointer-events:none;
    border:2px solid var(--b2color,#fd4c4c); border-radius:inherit;
}
.search .bk2-topic-search .bukids-search-field input:focus,
.search .bk2-topic-search .bukids-search-field input:focus-visible { outline:none; box-shadow:none; background:transparent; }
.search .bk2-topic-search .bukids-search-field input::-webkit-search-decoration { -webkit-appearance:none; }
.search .bk2-topic-search .bukids-card:hover img { transform:none; }
.search .bk2-search-cover-fallback { position:absolute; inset:0; }
.search .bk2-topic-search .bukids-card-media [hidden] { display:none; }
.search .bk2-topic-search .bukids-card-link:focus-visible,
.search .bk2-topic-search input:focus-visible,
.search .bk2-search-reset:focus-visible { outline:2px solid var(--b2color,#fd4c4c); outline-offset:-2px; }
.search .bk2-topic-search .bukids-empty-state { padding:40px 16px; border:1px solid #e6e9ef; border-radius:4px; box-shadow:none; background:#fff; }
@media (max-width:1180px) {
    .search .bk2-search-container { max-width:calc(100% - 32px); }
}
@media (max-width:480px) {
    .search .bk2-search-container { max-width:calc(100% - 24px); padding-top:16px; }
    .search .bk2-topic-search .bukids-search-field input { font-size:16px; padding:0 10px; }
    .search .bk2-topic-search .bukids-search-row > .bukids-primary-button { font-size:16px; }
    .search .bk2-topic-search .bukids-primary-button { padding:0 16px; }
    .search .bk2-topic-search .bukids-results-toolbar { gap:8px; margin-bottom:16px; }
    .search .bk2-topic-search .bukids-card-grid { gap:12px; }
}
@media (max-width:768px) {
    /* The query remains in the editable field; do not repeat it above cards. */
    .search .bk2-topic-search .bk2-search-query-term { display:none; }
    .search .bk2-topic-search .bk2-search-query { gap:2px 10px; font-size:12px; }
    .search .bk2-topic-search .bukids-results-toolbar { padding-bottom:8px; }
}
.search .bukids-library .bukids-card { border:1px solid #e6e9ef; }
.search .bukids-library .bukids-primary-button {
    background:var(--b2color,#fd4c4c); border-color:var(--b2color,#fd4c4c); color:#fff;
}
.search .bukids-library .bukids-primary-button:hover { filter:brightness(.94); }

/* Keep search usable through B2's tablet bottom-navigation breakpoint. */
@media (max-width:1180px) {
    /* 2.0.316: the footer already leaves room for B2's bottom bar. */
    .search .bk2-topic-search { padding-bottom:16px; }
    .search .bk2-topic-search .bukids-search-field input,
    .search .bk2-topic-search .bukids-search-row > .bukids-primary-button { font-size:16px; }
}
@media (max-width:359px) {
    .search .bk2-topic-search .bukids-card-grid { grid-template-columns:minmax(0,1fr); }
}
@media (pointer:coarse) {
    .search .bk2-topic-search .bukids-search-field input { font-size:16px; }
}

/* B2 header membership entry: theme colour, no floating overlay or extra JS. */
.site-header .bk2-member-actions { align-items:center; gap:10px; }
.site-header.social-top .bk2-member-header { width:auto; flex-shrink:0; align-items:center; }
.site-header .bk2-member-cta {
    display:block; flex:0 0 auto;
    box-sizing:border-box; min-height:0; padding:8px 15px; margin:0;
    border:0; border-radius:8px;
    background:var(--b2color,#227c73); color:#fff; font:inherit;
    font-size:12px; font-weight:400; line-height:normal; white-space:nowrap;
    text-decoration:none; transition:filter .15s ease; cursor:pointer; touch-action:manipulation;
}
/* One typography/geometry contract for the two four-character actions.
   Links otherwise inherit ligatures/optimizelegibility unlike B2 buttons. */
.site-header .bk2-member-actions .header-login-button > button:not(.empty),
.site-header .bk2-member-cta {
    box-sizing:border-box; width:78px; height:32px; min-width:78px; min-height:32px;
    padding:8px 15px; border:0; border-radius:8px;
    font-family:inherit; font-size:12px; font-weight:400; font-style:normal;
    line-height:16px; letter-spacing:normal; text-align:center;
    font-feature-settings:normal; font-variant:normal; text-rendering:auto;
}
.site-header .bk2-member-cta:hover { color:#fff; }
@media (hover:hover) and (pointer:fine) {
    .site-header .bk2-member-cta:hover { filter:brightness(.93); }
}
.site-header .bk2-member-cta:active { filter:brightness(.84); }
@media (prefers-reduced-motion:reduce) {
    .site-header .bk2-member-cta { transition:none; }
}
.site-header .bk2-member-cta:focus-visible { outline:2px solid currentColor; outline-offset:3px; box-shadow:0 0 0 4px var(--b2color,#227c73); }
/* Keep the loading cloak stronger than polish.css's desktop button display. */
.site-header .bk2-member-cta[v-cloak] { display:none!important; }
/* Match Bukids' deployed B2 mobile.css breakpoint (1180px). */
@media (max-width:1180px) {
    /* B2's absolute 100%-wide logo box intercepted taps over the right tools. */
    .site-header.bk2-membership-enabled.social-top .header-banner-left > .header-logo,
    .site-header.bk2-membership-enabled.social-top .header-banner-left > .header-logo .logo { width:auto; }
    /* Closed off-canvas menus must not retain a transparent hit layer after resize. */
    .site-header.bk2-membership-enabled .mobile-box:not(.show-menu-box) { visibility:hidden; pointer-events:none; }
    .site-header.bk2-membership-enabled .mobile-box:not(.show-menu-box) * { pointer-events:none; }
    .site-header.bk2-membership-enabled.social-top .top-style .header-banner-right { height:43px; flex-shrink:0; margin-bottom:0; }
    .site-header .bk2-member-actions { gap:6px; position:relative; z-index:3; }
    .site-header .bk2-member-actions .top-user-box { position:static; }
    .site-header .bk2-member-actions .top-user-box-drop {
        right:0; top:calc(100% + 8px); width:308px; max-width:calc(100vw - 24px);
        max-height:calc(100vh - 64px); max-height:calc(100dvh - 64px); overflow-y:auto;
        transform-origin:right top;
    }
    .site-header .bk2-member-actions .top-user-box-drop.jt::before,
    .site-header .bk2-member-actions .top-user-box-drop.jt::after { display:none; }
}
@media (max-width:360px) {
    .site-header.bk2-membership-enabled.social-top .header-logo img { max-width:112px; object-fit:contain; object-position:left center; }
}

/* bukids-article-tools */
/* 2.0.218: one summary entry and tables constrained to the article column. */
.single-article > .entry-content:has(> .bk-video-intro) > .eb-card:has(.eb-excerpt),
.single-article > .entry-content:has(> .bk-video-intro) > .content-excerpt,
.single-article .eb-card[hidden] { display:none !important; }
.single-article .bk-article-summary { margin:0 0 24px; padding:0; border:0; background:transparent; box-shadow:none; color:inherit; }
.single-article .bk-article-summary :is(.eb-card-bgbox,.eb-titicon,.eb-icon) { display:none; }
.single-article .bk-article-summary .eb-card-body { padding:0; background:transparent; }
.single-article .bk-article-summary .eb-titlebox { margin:0 0 12px; padding:0; }
.single-article .bk-article-summary .eb-title { font:inherit; font-size:16px; font-weight:400; color:inherit; }
.single-article .bk-article-summary .eb-excerpt { padding:0; font:inherit; font-size:15px; line-height:1.8; color:inherit; }
.single-article .entry-content .wp-block-table { box-sizing:border-box; width:100% !important; max-width:100% !important; margin-inline:0 !important; }
.single-article .entry-content table { display:table !important; box-sizing:border-box; width:100% !important; max-width:100% !important; min-width:0; table-layout:fixed; border-collapse:collapse; margin-inline:0; }
.single-article .entry-content :is(th,td) { box-sizing:border-box; width:auto !important; min-width:0; max-width:none; white-space:normal !important; overflow-wrap:anywhere; word-break:normal; }
.single-article .entry-content :is(th,td) :is(p,a) { overflow-wrap:anywhere; }
.single-article .entry-content .bk-article-table-scroll { box-sizing:border-box; width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
.single-article .entry-content .bk-article-table-scroll > table { min-width:var(--bk-table-min-width); margin-block:0; }
.single-article .bk-article-table-scroll:focus-visible { outline:2px solid var(--bk-ui-text, #475467); outline-offset:2px; }
@media(max-width:600px) { .single-article .entry-content :is(th,td) { padding:8px; } }

/* 2.0.206: B2's article-end disclaimer, flat and quiet. */
.single-article .entry-content .post-note {
    margin: 20px 0 0;
    padding: 14px 16px;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    background: #fff;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.8;
}
.single-article .entry-content .post-note * { color: inherit; font-size: inherit; }

