/* Shared NovIqraLab palette for the template library and its standalone pages. */
html.noviqra-template-theme {
    --bg-body: #0f172a !important;
    --bg-surface: #1e293b !important;
    --bg-card: #1e293b !important;
    --bg-card-hover: #334155 !important;
    --bg-primary: #0f172a !important;
    --bg-secondary: #1e293b !important;
    --bg-tertiary: #111827 !important;
    --border-color: #334155 !important;
    --border-hover: #10b981 !important;
    --text-primary: #e2e8f0 !important;
    --text-secondary: #94a3b8 !important;
    --text-main: #e2e8f0 !important;
    --text-muted: #94a3b8 !important;
    --accent-emerald: #10b981 !important;
    --accent-emerald-hover: #059669 !important;
    --accent-color: #10b981 !important;
    --accent-hover: #059669 !important;
    --accent-glow: rgba(16, 185, 129, 0.15) !important;
    --accent-light: rgba(16, 185, 129, 0.15) !important;
    --code-bg: #090d16 !important;
    --hover-bg: #334155 !important;
    --badge-bg: #1e293b !important;
    --badge-text: #cbd5e1 !important;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    color-scheme: dark;
}

html.noviqra-template-theme body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

html.noviqra-template-theme .bd-navbar,
html.noviqra-template-theme .fixed-header-wrapper {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* The SMS page has a semantic hero <header> inside <main>; keep it separate
   from the sticky site-navigation header styles used by that page. */
html.noviqra-template-theme main > header {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    max-width: 760px;
    margin: 0 auto 1.5rem;
    padding: 0.5rem 1rem 0;
    background: transparent !important;
    border: 0 !important;
    backdrop-filter: none !important;
    text-align: center;
}

html.noviqra-template-theme .content-card,
html.noviqra-template-theme .control-panel,
html.noviqra-template-theme .controls-card,
html.noviqra-template-theme .microcopy-card,
html.noviqra-template-theme .template-card,
html.noviqra-template-theme .message-card,
html.noviqra-template-theme .modal-container,
html.noviqra-template-theme .stat-box {
    color: #e2e8f0;
    border-color: #334155 !important;
}

html.noviqra-template-theme .template-card,
html.noviqra-template-theme .control-panel,
html.noviqra-template-theme .controls-card,
html.noviqra-template-theme .microcopy-card,
html.noviqra-template-theme .content-card,
html.noviqra-template-theme .message-card,
html.noviqra-template-theme .modal-container,
html.noviqra-template-theme .stat-box {
    background-color: #1e293b !important;
}

html.noviqra-template-theme .text-muted,
html.noviqra-template-theme .text-secondary {
    color: #94a3b8 !important;
}

html.noviqra-template-theme .text-success,
html.noviqra-template-theme .text-primary,
html.noviqra-template-theme .navbar-brand {
    color: #10b981 !important;
}

html.noviqra-template-theme .btn-success,
html.noviqra-template-theme .btn-brand {
    background-color: #047857 !important;
    border-color: #047857 !important;
    color: #fff !important;
}

html.noviqra-template-theme .btn-success:hover,
html.noviqra-template-theme .btn-brand:hover {
    background-color: #065f46 !important;
    border-color: #065f46 !important;
}

html.noviqra-template-theme #formatToggleGroup .format-toggle-button {
    border-width: 1px !important;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

html.noviqra-template-theme #formatToggleGroup .format-toggle-button.is-active {
    background-color: #047857 !important;
    border-color: #10b981 !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

html.noviqra-template-theme #formatToggleGroup .format-toggle-button.is-inactive {
    background-color: #0f172a !important;
    border-color: #64748b !important;
    color: #cbd5e1 !important;
    box-shadow: none !important;
}

html.noviqra-template-theme #formatToggleGroup .format-toggle-button.is-inactive:hover {
    background-color: #334155 !important;
    border-color: #94a3b8 !important;
    color: #fff !important;
}

html.noviqra-template-theme [data-theme="dark"] {
    --bg-primary: #0f172a !important;
    --bg-secondary: #1e293b !important;
    --bg-tertiary: #111827 !important;
    --border-color: #334155 !important;
    --text-main: #e2e8f0 !important;
    --text-muted: #94a3b8 !important;
    --accent-color: #10b981 !important;
    --accent-hover: #059669 !important;
    --accent-light: rgba(16, 185, 129, 0.15) !important;
    --badge-bg: #1e293b !important;
    --badge-text: #cbd5e1 !important;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

@media (max-width: 575.98px) {
    html.noviqra-template-theme .content-card,
    html.noviqra-template-theme .control-panel,
    html.noviqra-template-theme .controls-card,
    html.noviqra-template-theme .microcopy-card {
        padding: 1rem !important;
    }
}
