/* BuzzXNews v1.4 site-wide premium light/dark theme.
   Header intentionally stays dark in both modes. */
:root,
html[data-bxn-theme="light"]{
    --bxn-site-bg:#f6f4fb;
    --bxn-surface:#ffffff;
    --bxn-surface-2:#f8f9fc;
    --bxn-text:#152238;
    --bxn-muted:#66758d;
    --bxn-border:rgba(15,35,70,.10);
    --bxn-shadow:0 10px 30px rgba(27,39,67,.06);
    --bxn-link:#2016b5;
    --bxn-link-hover:#7c3aed;
    --bxn-accent:#6d4aff;
    --bxn-header:#061a38;
    --bxn-header-2:#08234a;
}

html[data-bxn-theme="dark"]{
    --bxn-site-bg:#06111f;
    --bxn-surface:#0c1d34;
    --bxn-surface-2:#102640;
    --bxn-text:#f5f7fb;
    --bxn-muted:#aebbd0;
    --bxn-border:rgba(160,188,224,.15);
    --bxn-shadow:0 14px 36px rgba(0,0,0,.24);
    --bxn-link:#8db6ff;
    --bxn-link-hover:#c6a4ff;
    --bxn-accent:#8a67ff;
    --bxn-header:#061a38;
    --bxn-header-2:#08234a;
}

html{transition:background-color .18s ease,color .18s ease}
body,
.ast-separate-container,
.ast-plain-container,
.ast-page-builder-template,
.site-content,
#page{
    background:var(--bxn-site-bg)!important;
    color:var(--bxn-text)!important;
}

/* Header remains the same in light + dark */
.site-header,
.ast-primary-header-bar,
.main-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar{
    background:linear-gradient(90deg,var(--bxn-header),var(--bxn-header-2),var(--bxn-header))!important;
    color:#fff!important;
    border-color:rgba(255,255,255,.06)!important;
    box-shadow:0 8px 26px rgba(0,0,0,.14);
}
.site-header a,
.site-header .menu-link,
.site-header .ast-header-html-1,
.site-header .ast-builder-html-element{color:#fff!important}
.site-header .menu-link:hover,
.site-header .current-menu-item>.menu-link{color:#d9e6ff!important}

/* Logo shortcode */
.bxn-brand-logo{display:inline-flex;align-items:center;text-decoration:none!important}
.bxn-brand-logo img{display:block;width:auto;max-width:100%;height:70px;object-fit:contain}
@media(max-width:921px){.bxn-brand-logo img{height:54px}}
@media(max-width:544px){.bxn-brand-logo img{height:45px}}

/* Premium surfaces across Astra + Gutenberg */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container .comments-area,
.ast-separate-container .ast-archive-description,
.ast-separate-container .widget,
.entry-content>.wp-block-group:not(.has-background),
.wp-block-query .wp-block-post,
.wp-block-latest-posts li,
.bxn-theme-card{
    background:var(--bxn-surface)!important;
    color:var(--bxn-text)!important;
    border-color:var(--bxn-border)!important;
    box-shadow:var(--bxn-shadow);
}

/* Query-loop cards and common homepage cards */
.wp-block-post-template.is-layout-grid>li,
ul.wp-block-post-template>li,
.wp-block-query .wp-block-post,
.ast-article-post .ast-article-inner{
    background:var(--bxn-surface)!important;
    border:1px solid var(--bxn-border)!important;
    border-radius:16px!important;
    box-shadow:var(--bxn-shadow)!important;
    overflow:hidden;
}
.wp-block-post-template.is-layout-grid>li,
ul.wp-block-post-template>li{padding:28px!important}

/* Typography */
body,
p,
li,
.entry-content,
.entry-content p,
.entry-content li{color:var(--bxn-muted)!important}
h1,h2,h3,h4,h5,h6,
.entry-title,
.entry-title a,
.wp-block-post-title,
.wp-block-post-title a,
.widget-title{color:var(--bxn-text)!important}
a{color:var(--bxn-link)}
a:hover,a:focus{color:var(--bxn-link-hover)}
.entry-meta,.entry-meta *,.wp-block-post-date,.wp-block-post-author{color:var(--bxn-muted)!important}

/* Avoid flattening intentionally colored blocks/buttons */
.wp-block-button__link,
button,
.ast-button,
input[type="submit"]{transition:transform .15s ease,filter .15s ease,background .15s ease}
.wp-block-button__link:hover,.ast-button:hover{transform:translateY(-1px)}

/* Forms */
input[type="text"],input[type="email"],input[type="tel"],input[type="search"],input[type="url"],input[type="password"],textarea,select{
    background:var(--bxn-surface-2)!important;
    color:var(--bxn-text)!important;
    border-color:var(--bxn-border)!important;
}

/* Footer follows selected theme, header stays fixed */
.site-footer,
.site-below-footer-wrap,
.site-primary-footer-wrap,
.site-above-footer-wrap{
    background:var(--bxn-surface)!important;
    color:var(--bxn-muted)!important;
    border-color:var(--bxn-border)!important;
}
.site-footer a,.site-footer h1,.site-footer h2,.site-footer h3,.site-footer h4{color:var(--bxn-text)!important}
.site-footer a:hover{color:var(--bxn-link-hover)!important}

/* Article gate integrated with selected theme */
.bxn-card{
    background:linear-gradient(135deg,#3823ad,#6b35dc 58%,#a933c7)!important;
    box-shadow:0 18px 45px rgba(42,20,110,.28)!important;
    border:1px solid rgba(255,255,255,.12)!important;
}
.bxn-dialog{
    background:var(--bxn-surface)!important;
    color:var(--bxn-text)!important;
    border:1px solid var(--bxn-border)!important;
}
.bxn-login-title{color:var(--bxn-text)!important}
.bxn-login-subtitle,.bxn-phone-note,.bxn-copy,.bxn-demo,.bxn-terms,.bxn-powered span,.bxn-powered em{color:var(--bxn-muted)!important}
.bxn-input{background:var(--bxn-surface-2)!important;color:var(--bxn-text)!important;border-color:var(--bxn-border)!important}
.bxn-powered{border-color:var(--bxn-border)!important}
.bxn-powered strong{color:var(--bxn-text)!important}
.bxn-avatar{background:rgba(108,78,255,.14)!important;color:#866cff!important}
.bxn-x{color:var(--bxn-muted)!important}

/* Theme toggle */
.bxn-theme-toggle{
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-width:42px;
    min-height:42px;
    padding:8px 12px!important;
    border:1px solid rgba(135,177,255,.42)!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.06)!important;
    color:#fff!important;
    cursor:pointer;
    font:inherit;
    font-size:13px;
    line-height:1;
    box-shadow:none!important;
}
.bxn-theme-toggle:hover,.bxn-theme-toggle:focus{background:rgba(255,255,255,.12)!important;color:#fff!important}
.bxn-theme-icon{font-size:17px;line-height:1}
.bxn-theme-label{font-weight:600}
@media(max-width:544px){.bxn-theme-label{display:none}.bxn-theme-toggle{padding:8px!important;min-width:38px;min-height:38px}}

/* Account style refinements for premium header */
.bxn-user-account{background:rgba(255,255,255,.10)!important;border:1px solid rgba(255,255,255,.08)!important;padding:.48rem .72rem!important}
.bxn-user-account a{border:1px solid rgba(103,155,255,.55)!important;border-radius:12px!important;padding:.45rem .72rem!important;text-decoration:none!important}
.bxn-user-account a:hover{background:rgba(255,255,255,.08)!important;text-decoration:none!important}
.bxn-header-login{border-radius:12px!important;padding:.65rem 1rem!important;background:rgba(255,255,255,.04)!important;border-color:rgba(103,155,255,.55)!important}

/* Soft global transitions only on surfaces, not layout */
.ast-article-inner,.wp-block-post-template>li,.site-footer,.bxn-dialog{transition:background-color .18s ease,color .18s ease,border-color .18s ease}
