/*
 * Tenant Branding Overrides
 *
 * CSS overrides applied when a tenant has custom branding configured.
 * All rules are scoped under html.tenant-branded so they have no effect
 * when the tenant does not have custom branding (primary_color is None).
 *
 * The tenant-branded class is added to <html> via a synchronous inline
 * script in _head.html when tenant_has_custom_branding is true.
 *
 * CSS custom properties used:
 *   --tenant-primary-color   (set in _head.html)
 *   --tenant-secondary-color (set in _head.html)
 */

/* --- US-002: Sidebar background override --- */
html.tenant-branded #sidebar {
    background: var(--tenant-secondary-color) !important;
    background-image: none !important;
}

/* --- US-004: Task workspace accent elements override --- */
html.tenant-branded .tenant-accent {
    background: var(--tenant-primary-color) !important;
    background-image: none !important;
}

html.tenant-branded #save-and-run-btn {
    background: var(--tenant-primary-color) !important;
    background-image: none !important;
}

html.tenant-branded #progress-bar {
    background: var(--tenant-primary-color) !important;
    background-image: none !important;
}

/* --- US-003: Gradient titles override --- */
html.tenant-branded .text-transparent.bg-clip-text {
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: var(--tenant-primary-color) !important;
    color: var(--tenant-primary-color) !important;
}

/* --- KV-US-005: Slider accent colors override --- */

/* Netflix slider buttons (Slider-2) */
html.tenant-branded .netflix-slider-btn {
    background: var(--tenant-primary-color) !important;
    opacity: 0.8;
}

html.tenant-branded .netflix-slider-btn:hover {
    background: var(--tenant-primary-color) !important;
    opacity: 1;
}

/* Active navigation dots - all slider variants */
html.tenant-branded .collections-dot.active {
    background-color: var(--tenant-primary-color) !important;
}

html.tenant-branded .documents-dot.active {
    background-color: var(--tenant-primary-color) !important;
}

html.tenant-branded .sprouts-dot.active {
    background-color: var(--tenant-primary-color) !important;
}

html.tenant-branded .slider-dot.active {
    background-color: var(--tenant-primary-color) !important;
}

/* Sprout macro progress bars (Slider-1) */
html.tenant-branded [id$="-progress-bar"].bg-\[\#97d3cd\] {
    background-color: var(--tenant-primary-color) !important;
}

/* --- KV modal primary buttons override --- */
html.tenant-branded #hatchiarena-confirm-create-collection-btn,
html.tenant-branded #hatchiarena-confirm-rename-collection-btn,
html.tenant-branded #hatchiarena-confirm-move-document-btn,
html.tenant-branded #hatchiarena-confirm-final-delete-btn,
html.tenant-branded #hatchiarena-save-markdown-btn,
html.tenant-branded #hatchiarena-confirm-rename-document-btn,
html.tenant-branded #simple-btn-upload {
    background: var(--tenant-primary-color) !important;
    background-image: none !important;
}
