/**
 * Readability guardrails — loaded after theme CSS.
 * Ensures text/background contrast on every page type for both themes.
 */

/* ── Inputs (search, forms, newsletter) ── */
input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    color: var(--np-text-primary, #0f172a);
    -webkit-text-fill-color: var(--np-text-primary, #0f172a);
}

input::placeholder,
textarea::placeholder {
    color: var(--np-text-muted, #64748b);
    opacity: 1;
}

/* ── Softnexa Labs — light surfaces ── */
.theme-softnexa-labs .np-header-band,
.theme-softnexa-labs .np-header-main {
    background: var(--np-surface, #ffffff);
    color: var(--np-text-primary, #0f172a);
}

.theme-softnexa-labs .np-header-band .np-main-nav a,
.theme-softnexa-labs .np-header-band .np-nav-link,
.theme-softnexa-labs .np-header-band .np-nav-item > .np-nav-link {
    color: var(--np-text-primary, #0f172a) !important;
}

.theme-softnexa-labs .np-header-band .np-main-nav a:hover,
.theme-softnexa-labs .np-header-band .np-nav-link:hover,
.theme-softnexa-labs .np-header-band .np-nav-item:hover > .np-nav-link {
    color: var(--np-secondary, #2563eb) !important;
}

.theme-softnexa-labs .np-logo-name,
.theme-softnexa-labs .np-logo-text {
    color: var(--np-text-primary, #0f172a);
}

.theme-softnexa-labs .np-header-band .np-header-sign-in,
.theme-softnexa-labs .np-header-main .np-header-sign-in {
    color: var(--np-primary, #0b132b) !important;
}

.theme-softnexa-labs .np-header-band .np-header-sign-in:hover,
.theme-softnexa-labs .np-header-main .np-header-sign-in:hover {
    color: var(--np-secondary, #3a506b) !important;
}

.theme-softnexa-labs .np-header-band .np-header-register,
.theme-softnexa-labs .np-header-main .np-header-register {
    color: #ffffff !important;
    background: var(--np-primary, #0b132b) !important;
}

/* Header must not inherit white text from section styles */
.theme-softnexa-labs .se-styled-section.np-header-band,
.theme-softnexa-labs .se-styled-section.np-header-main {
    color: var(--np-text-primary, #0f172a);
}

.theme-softnexa-labs .se-styled-section.np-header-band .np-main-nav a,
.theme-softnexa-labs .se-styled-section.np-header-band .np-nav-link {
    color: var(--np-text-primary, #0f172a) !important;
}

/* ── Softnexa Labs — dark surfaces (always light text) ── */
.theme-softnexa-labs .np-topbar,
.theme-softnexa-labs .np-trending-bar,
.theme-softnexa-labs .np-sp-hero,
.theme-softnexa-labs .np-auth-hero,
.theme-softnexa-labs .np-sp-cta,
.theme-softnexa-labs .np-footer,
.theme-softnexa-labs .sl-footer,
.theme-softnexa-labs .np-nl-prefooter {
    color: #fff;
}

.theme-softnexa-labs .np-topbar .np-topbar-link,
.theme-softnexa-labs .np-topbar .np-topbar-auth,
.theme-softnexa-labs .np-topbar .np-date {
    color: rgba(255, 255, 255, 0.92) !important;
}

.theme-softnexa-labs .np-sp-hero h1,
.theme-softnexa-labs .np-sp-hero .np-sp-lead,
.theme-softnexa-labs .np-sp-hero .np-sp-hero-text,
.theme-softnexa-labs .np-sp-hero .np-sp-updated,
.theme-softnexa-labs .np-sp-hero p,
.theme-softnexa-labs .np-auth-hero h1,
.theme-softnexa-labs .np-auth-hero p,
.theme-softnexa-labs .np-auth-features li {
    color: rgba(255, 255, 255, 0.92) !important;
}

.theme-softnexa-labs .np-sp-stat strong,
.theme-softnexa-labs .np-sp-stat span {
    color: #fff;
}

.theme-softnexa-labs .np-sp-stat span {
    opacity: 0.82;
}

/* ── Cards, widgets, static content (dark text on white) ── */
.theme-softnexa-labs .np-widget,
.theme-softnexa-labs .np-widget-body,
.theme-softnexa-labs .np-sp-card,
.theme-softnexa-labs .np-sp-feature,
.theme-softnexa-labs .np-sp-contact-card,
.theme-softnexa-labs .np-sp-section,
.theme-softnexa-labs .np-sp-faq-item,
.theme-softnexa-labs .np-sp-toc,
.theme-softnexa-labs .np-post-card,
.theme-softnexa-labs .np-account-card,
.theme-softnexa-labs .np-cat-card {
    color: var(--np-text-primary, #0f172a);
}

.theme-softnexa-labs .np-sp-card h2,
.theme-softnexa-labs .np-sp-feature h2,
.theme-softnexa-labs .np-sp-contact-card h2,
.theme-softnexa-labs .np-sp-section h2,
.theme-softnexa-labs .np-sp-faq-item summary,
.theme-softnexa-labs .np-sp-section-title,
.theme-softnexa-labs .np-widget-posts a,
.theme-softnexa-labs .np-widget-card span {
    color: var(--np-text-primary, #0f172a) !important;
}

.theme-softnexa-labs .np-sp-card p,
.theme-softnexa-labs .np-sp-feature p,
.theme-softnexa-labs .np-sp-contact-card p,
.theme-softnexa-labs .np-sp-section p,
.theme-softnexa-labs .np-sp-faq-item p,
.theme-softnexa-labs .np-sp-checklist li,
.theme-softnexa-labs .np-widget-body p {
    color: var(--np-text-secondary, #334155) !important;
}

.theme-softnexa-labs .np-widget-cats a {
    color: var(--np-text-primary, #0f172a) !important;
    font-weight: 600;
}

.theme-softnexa-labs .np-widget-cats a:hover {
    color: var(--np-secondary, #2563eb) !important;
}

.theme-softnexa-labs .np-widget-cats li span {
    color: var(--np-text-muted, #64748b);
}

.theme-softnexa-labs .np-sp-toc-label {
    color: var(--np-text-muted, #64748b) !important;
}

.theme-softnexa-labs .np-sp-toc a {
    color: var(--np-text-secondary, #334155) !important;
}

.theme-softnexa-labs .np-sp-toc a:hover {
    color: var(--np-secondary, #2563eb) !important;
}

/* Section style overrides must not break nested light cards */
.theme-softnexa-labs .se-styled-section .np-sp-body .np-sp-card,
.theme-softnexa-labs .se-styled-section .np-sp-body .np-sp-feature,
.theme-softnexa-labs .se-styled-section .np-sp-body .np-sp-section,
.theme-softnexa-labs .se-styled-section .np-sp-body .np-sp-faq-item,
.theme-softnexa-labs .se-styled-section .np-sidebar .np-widget {
    --se-text: var(--np-text-secondary, #334155);
    --se-heading: var(--np-text-primary, #0f172a);
    --se-paragraph: var(--np-text-secondary, #334155);
}

.theme-softnexa-labs .se-styled-section .np-sp-body p,
.theme-softnexa-labs .se-styled-section .np-widget-body p {
    color: var(--np-text-secondary, #334155) !important;
}

/* Nav dropdown — always dark text on white panel */
.theme-softnexa-labs .np-nav-dropdown-menu,
.theme-softnexa-labs .np-nav-dropdown-menu a.np-nav-dropdown-child,
.theme-softnexa-labs .np-nav-dropdown-menu .np-nav-subgroup-list a {
    color: var(--np-text-secondary, #334155) !important;
}

.theme-softnexa-labs .np-nav-dropdown-menu a.np-nav-dropdown-child:hover,
.theme-softnexa-labs .np-nav-dropdown-menu .np-nav-subgroup-list a:hover {
    color: var(--np-secondary, #2563eb) !important;
}

.theme-softnexa-labs .np-nav-dropdown-all-text strong {
    color: var(--np-text-primary, #0f172a) !important;
}

/* Contact / account forms */
.theme-softnexa-labs .np-account-form input,
.theme-softnexa-labs .np-account-form textarea,
.theme-softnexa-labs .np-contact-form input,
.theme-softnexa-labs .np-contact-form textarea,
.theme-softnexa-labs .np-sp-contact-form input,
.theme-softnexa-labs .np-sp-contact-form textarea {
    background: #fff;
    color: var(--np-text-primary, #0f172a) !important;
    border-color: var(--np-border, #e2e8f0);
}

/* ── Nexa Chain Press ── */
.theme-nexa-chain-press .ncp-header,
.theme-nexa-chain-press .np-header-band {
    background: var(--np-surface, #fff);
    color: var(--np-text-primary, #111);
}

.theme-nexa-chain-press .ncp-header .np-main-nav a,
.theme-nexa-chain-press .ncp-header .np-nav-link {
    color: var(--np-text-primary, #111) !important;
}

.theme-nexa-chain-press .ncp-topbar,
.theme-nexa-chain-press .np-topbar,
.theme-nexa-chain-press .np-sp-hero,
.theme-nexa-chain-press .np-auth-hero,
.theme-nexa-chain-press .ncp-footer {
    color: #fff;
}

/* GTranslate dropdown must not inherit top bar white text */
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_selected a,
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_selected a span,
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_selected font,
.theme-nexa-chain-press .np-topbar .np-gtranslate-widget .gt_selected a,
.theme-nexa-chain-press .np-topbar .np-gtranslate-widget .gt_selected a span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_option,
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_option a,
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_option a span,
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_option font,
.theme-nexa-chain-press .np-topbar .np-gtranslate-widget .gt_option a {
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
}

.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_option a:hover,
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_option a:hover span,
.theme-nexa-chain-press .ncp-topbar .np-gtranslate-widget .gt_option a:hover font,
.theme-nexa-chain-press .np-topbar .np-gtranslate-widget .gt_option a:hover {
    color: var(--np-secondary, #467299) !important;
    -webkit-text-fill-color: var(--np-secondary, #467299) !important;
}

.theme-nexa-chain-press .np-sp-hero h1,
.theme-nexa-chain-press .np-sp-hero p,
.theme-nexa-chain-press .np-sp-hero .np-sp-lead,
.theme-nexa-chain-press .np-auth-hero p {
    color: rgba(255, 255, 255, 0.92) !important;
}

.theme-nexa-chain-press .np-widget,
.theme-nexa-chain-press .np-sp-card,
.theme-nexa-chain-press .np-sp-section,
.theme-nexa-chain-press .np-sp-faq-item,
.theme-nexa-chain-press .np-sp-toc {
    color: var(--np-text-primary, #111);
}

.theme-nexa-chain-press .np-sp-card p,
.theme-nexa-chain-press .np-sp-section p,
.theme-nexa-chain-press .np-sp-faq-item p,
.theme-nexa-chain-press .np-widget-cats a {
    color: var(--np-text-secondary, #333) !important;
}

.theme-nexa-chain-press .np-widget-cats a:hover {
    color: var(--np-secondary, #444) !important;
}

.theme-nexa-chain-press .se-styled-section .np-sp-body p,
.theme-nexa-chain-press .se-styled-section .np-widget-body p {
    color: var(--np-text-secondary, #333) !important;
}

/* ── Footer readability on dark backgrounds ── */
.theme-softnexa-labs .np-footer,
.theme-softnexa-labs .sl-footer,
.theme-nexa-chain-press .ncp-footer,
.theme-nexa-chain-press .np-footer {
    color: rgba(255, 255, 255, 0.92);
}

.theme-softnexa-labs .np-footer-col-title,
.theme-softnexa-labs .np-footer-about .np-footer-logo-name,
.theme-nexa-chain-press .ncp-footer-col-title,
.theme-nexa-chain-press .ncp-footer-logo {
    color: #fff !important;
}

.theme-softnexa-labs .np-footer-links a,
.theme-softnexa-labs .np-footer-about,
.theme-softnexa-labs .np-footer-legal a,
.theme-softnexa-labs .np-footer-copyright,
.theme-nexa-chain-press .ncp-footer-col a,
.theme-nexa-chain-press .ncp-footer-about,
.theme-nexa-chain-press .ncp-footer-legal a,
.theme-nexa-chain-press .ncp-footer-copy,
.theme-nexa-chain-press .np-footer-copyright {
    color: rgba(255, 255, 255, 0.82) !important;
}

.theme-softnexa-labs .np-footer-links a:hover,
.theme-softnexa-labs .np-footer-legal a:hover,
.theme-nexa-chain-press .ncp-footer-col a:hover,
.theme-nexa-chain-press .ncp-footer-legal a:hover {
    color: #fff !important;
}
