/* FastBlogTheme — UI-customisation overrides & scroll-to-top.
 * Loaded only on the front-end (and admin preview where appropriate) so
 * inline <style> does *not* leak into HTML source. Theme variables are
 * still overridable inline via #fbt-theme-boot-inline in <head> if needed
 * for render-critical color pre-paint. */

:root {
    --fbt-primary-color: #245bff;
    --fbt-accent-color: #245bff;
    --fbt-heading-color: #0f172a;
    --fbt-text-color: #334155;
    --fbt-link-hover-color: #1d47d4;
    --fbt-button-text-color: #ffffff;
    --fbt-sidebar-related-color: #245bff;
    --fbt-sidebar-heading-color: #0f172a;
}

/* Links inside headings should keep heading color, not accent color */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.nb-post__title a, .nb-loop__title a,
.nb-pt4-title a, .nb-pt3-title a, .nb-pt6-title a,
.nb-hero__title a, .fbt-home-hero__title a, .nb-loop2__title a,
.nb-loop3__title a, .nb-loop4__title a, .nb-loop5__title a,
.nb-loop6__title a, .nb-loop7__title a, .nb-loop8__title a,
.nb-loop9__title a, .nb-loop10__title a, .nb-loop11__title a,
.nb-loop12__title a, .nb-tpl-two__title a {
    color: var(--fbt-heading-color);
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
.nb-post__title a:hover, .nb-loop__title a:hover,
.nb-pt4-title a:hover, .nb-pt3-title a:hover, .nb-pt6-title a:hover,
.nb-hero__title a:hover, .fbt-home-hero__title a:hover, .nb-loop2__title a:hover,
.nb-loop3__title a:hover, .nb-loop4__title a:hover, .nb-loop5__title a:hover,
.nb-loop6__title a:hover, .nb-loop7__title a:hover, .nb-loop8__title a:hover,
.nb-loop9__title a:hover, .nb-loop10__title a:hover, .nb-loop11__title a:hover,
.nb-loop12__title a:hover, .nb-tpl-two__title a:hover {
    color: var(--fbt-heading-color);
}

/* Sidebar related posts links */
.nb-sidebar a,
.nb-latest__link,
.fbt-news-latest a,
.nb-pt7-popular__title,
.nb-pt7-popular__item a {
    color: var(--fbt-sidebar-related-color) !important;
}

.nb-sidebar a:hover,
.nb-latest__link:hover,
.fbt-news-latest a:hover,
.nb-pt7-popular__title:hover,
.nb-pt7-popular__item a:hover {
    color: var(--fbt-link-hover-color) !important;
}

/* Sidebar related block — modern trendy styling */
.nb-sideblock--related {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--nb-border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nb-sideblock__cap {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 1px solid var(--nb-border);
    background: #f9fafb;
}

.nb-latest__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--nb-border);
    transition: background 0.2s ease;
}

.nb-latest__item:last-child { border-bottom: none; }
.nb-latest__item:hover { background: #f0f4ff; }

.nb-latest__thumb {
    flex: 0 0 60px;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nb-latest__thumb img {
    width: 100%;
    height: 45px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.nb-latest__item:hover .nb-latest__thumb img { transform: scale(1.05); }

.nb-latest__num,
.nb-sideblock--related .nb-latest__num {
    min-width: 26px;
    font-size: 26px;
    line-height: 1;
    color: var(--fbt-primary-color, #1aa34a) !important;
    font-weight: 800;
}

.nb-latest__link {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* Heading color application */
h1, h2, h3, h4, h5, h6,
.nb-post__title, .nb-loop__title,
.nb-pt4-title, .nb-pt3-title, .nb-pt6-title,
.nb-hero__title, .fbt-home-hero__title, .nb-loop2__title,
.nb-loop3__title, .nb-loop4__title, .nb-loop5__title,
.nb-loop6__title, .nb-loop7__title, .nb-loop8__title,
.nb-loop9__title, .nb-loop10__title, .nb-loop11__title,
.nb-loop12__title, .nb-tpl-two__title {
    color: var(--fbt-heading-color);
}

/* Text color application */
body, .nb-post__excerpt, .nb-loop__excerpt,
p, li, td, th, .nb-loop__meta, .nb-pt4-meta, .nb-pt3-meta,
.nb-loop1__excerpt, .nb-loop2__excerpt, .nb-loop3__excerpt,
.nb-loop4__excerpt, .nb-loop5__excerpt, .nb-loop6__excerpt,
.nb-loop7__excerpt, .nb-loop8__excerpt, .nb-loop9__excerpt,
.nb-loop10__excerpt, .nb-loop11__excerpt, .nb-loop12__excerpt,
.nb-pt3-excerpt,
.nb-loop1__meta, .nb-loop2__meta, .nb-loop3__meta, .nb-loop4__meta,
.nb-loop5__meta, .nb-loop6__meta, .nb-loop7__meta, .nb-loop8__meta,
.nb-loop9__meta, .nb-loop10__meta, .nb-loop11__meta, .nb-loop12__meta,
.nb-footer__copyline, .nb-footer-simple__copy,
.fbt-footer-bold__copy, .nb-footer-radar__copy {
    color: var(--fbt-text-color);
}

/* Accent application */
.fbt-accent, .nb-category-spotlight__title,
.nb-loop__cat, .nb-loop1__cat, .nb-loop2__cat, .nb-loop3__cat,
.nb-loop4__cat, .nb-loop5__cat, .nb-loop6__cat, .nb-loop7__cat,
.nb-loop8__cat, .nb-loop9__cat, .nb-loop10__cat, .nb-loop11__cat,
.nb-loop12__cat,
.nb-loop1__badge, .nb-loop7__badge, .nb-loop12__chip {
    color: var(--fbt-accent-color);
}

/* Buttons */
button, input[type="submit"], input[type="button"], .button,
.fbt-button, .nb-editorial-tabs__link, .nb-newsletter-form button,
.nb-pt3-related__btn, .nb-pt4-related__btn, .nb-pt6-related__btn,
.nb-loop1__btn, .nb-loop5__btn, .nb-loop6__btn,
.nb-footer__social a, .nb-newsletter-form button,
.fbt-footer-bold__social a, .nb-footer__cta-form button {
    background-color: var(--fbt-primary-color);
    color: var(--fbt-button-text-color);
    border-color: var(--fbt-primary-color);
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.button:hover, .fbt-button:hover, .nb-editorial-tabs__link:hover,
.nb-loop1__btn:hover, .nb-loop5__btn:hover, .nb-loop6__btn:hover,
.nb-footer__social a:hover {
    background-color: var(--fbt-link-hover-color);
    border-color: var(--fbt-link-hover-color);
}

.nb-main a, .link { color: var(--fbt-primary-color); }
.nb-main a:hover, .link:hover { color: var(--fbt-link-hover-color) !important; }

/* Scroll-to-top button */
.fastblogtheme-scroll-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    border: none !important;
    background-color: var(--fbt-primary-color, #245bff);
    color: var(--fbt-button-text-color, #ffffff);
    cursor: pointer !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    opacity: 0 !important;
    pointer-events: auto !important;
    isolation: isolate !important;
}

.fastblogtheme-scroll-to-top.show {
    display: flex !important;
    opacity: 1 !important;
}

.fastblogtheme-scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.fastblogtheme-scroll-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .fastblogtheme-scroll-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
    }
}


/* Critical pre-paint rules — formerly inline <style id="fastblogtheme-critical-css">. */
html, body { background: var(--nb-bg); color: var(--nb-text); }
#ajax-content { min-height: 60vh; }
header, .nb-header { display: block; }
