/* Vedha Learning brand colour for Desk, /login, and the /lms shell.
   Frappe 15 paints Login with `.btn.btn-primary` from `--btn-primary`
   (`--gray-900`). login.bundle.css is linked after web_include_css, so
   these declarations are !important. Red / danger buttons are not matched.
   /lms solid buttons are frappe-ui `bg-surface-gray-10`. Active sidebar
   rows are `button.bg-surface-elevation-3.shadow-sm` (LMS version-15
   SidebarLink), not a data-slot sidebar item. */
/* ``html:root`` beats the ``:root`` block in login.bundle.css, which is
   linked later and sets ``--btn-primary: var(--gray-900)`` (#171717). */
:root,
html:root,
[data-theme="light"],
html[data-theme="light"] {
	--primary: #433075 !important;
	--primary-color: #433075 !important;
	--btn-primary: #433075 !important;
	--bt-solid-bg: #433075 !important;
	--bt-solid-bg-hover: #34235f !important;
	--bt-solid-bg-active: #5b3e96 !important;
	--bt-solid-fg: #fafafa !important;
	accent-color: #433075;
}

[data-theme="dark"],
html[data-theme="dark"] {
	--primary: #a58cf4 !important;
	--primary-color: #a58cf4 !important;
	--btn-primary: #a58cf4 !important;
	--bt-solid-bg: #a58cf4 !important;
	--bt-solid-bg-hover: #b8a4f7 !important;
	--bt-solid-bg-active: #8062d0 !important;
	--bt-solid-fg: #0d0d0d !important;
	accent-color: #a58cf4;
}

button.btn.btn-primary,
a.btn.btn-primary,
.btn.btn-primary {
	background-color: #433075 !important;
	background-image: none !important;
	border-color: #433075 !important;
	color: #fafafa !important;
}

/* frappe/www/login.html: ``button.btn.btn-sm.btn-primary.btn-block.btn-login``.
   website.bundle.css paints ``.btn-primary`` with a literal #171717, which
   ignores ``--btn-primary``. This selector is also linked after login.bundle. */
html body button.btn.btn-primary.btn-login,
html body button.btn.btn-sm.btn-primary.btn-block {
	background: #433075 !important;
	background-color: #433075 !important;
	background-image: none !important;
	border-color: #433075 !important;
	color: #fafafa !important;
}

button.btn.btn-primary:hover,
button.btn.btn-primary:focus,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
html body button.btn.btn-primary.btn-login:hover,
html body button.btn.btn-primary.btn-login:focus,
html body button.btn.btn-sm.btn-primary.btn-block:hover,
html body button.btn.btn-sm.btn-primary.btn-block:focus {
	background: #34235f !important;
	background-color: #34235f !important;
	border-color: #34235f !important;
	color: #fafafa !important;
}

button.btn.btn-primary:active,
a.btn.btn-primary:active,
.btn.btn-primary:active,
html body button.btn.btn-primary.btn-login:active,
html body button.btn.btn-sm.btn-primary.btn-block:active {
	background: #5b3e96 !important;
	background-color: #5b3e96 !important;
	border-color: #5b3e96 !important;
	color: #fafafa !important;
}

[data-theme="dark"] button.btn.btn-primary,
[data-theme="dark"] a.btn.btn-primary,
[data-theme="dark"] .btn.btn-primary,
.dark button.btn.btn-primary,
.dark a.btn.btn-primary,
.dark .btn.btn-primary,
html[data-theme="dark"] body button.btn.btn-primary.btn-login,
html[data-theme="dark"] body button.btn.btn-sm.btn-primary.btn-block {
	background: #a58cf4 !important;
	background-color: #a58cf4 !important;
	border-color: #a58cf4 !important;
	color: #0d0d0d !important;
}

[data-theme="dark"] button.btn.btn-primary:hover,
[data-theme="dark"] button.btn.btn-primary:focus,
[data-theme="dark"] .btn.btn-primary:hover,
[data-theme="dark"] .btn.btn-primary:focus,
.dark button.btn.btn-primary:hover,
.dark .btn.btn-primary:hover,
.dark .btn.btn-primary:focus {
	background-color: #b8a4f7 !important;
	border-color: #b8a4f7 !important;
	color: #0d0d0d !important;
}

[data-theme="dark"] button.btn.btn-primary:active,
[data-theme="dark"] .btn.btn-primary:active,
.dark button.btn.btn-primary:active,
.dark .btn.btn-primary:active {
	background-color: #8062d0 !important;
	border-color: #8062d0 !important;
	color: #0d0d0d !important;
}

/* Newer Espresso login, if the site moves past version-15. */
.es-button[data-variant="solid"]:not([data-theme="red"]) {
	--bt-solid-bg: #433075 !important;
	--bt-solid-bg-hover: #34235f !important;
	--bt-solid-bg-active: #5b3e96 !important;
	--bt-solid-fg: #fafafa !important;
	background-color: #433075 !important;
	color: #fafafa !important;
}

[data-theme="dark"] .es-button[data-variant="solid"]:not([data-theme="red"]),
.dark .es-button[data-variant="solid"]:not([data-theme="red"]) {
	--bt-solid-bg: #a58cf4 !important;
	--bt-solid-fg: #0d0d0d !important;
	background-color: #a58cf4 !important;
	color: #0d0d0d !important;
}

/* frappe-ui solid (Create). The utility is
   color-mix(var(--surface-gray-10)); the variable and the property
   are both set so a later Tailwind sheet cannot put gray back. */
button.bg-surface-gray-10,
a.bg-surface-gray-10,
[role="button"].bg-surface-gray-10 {
	--surface-gray-10: #433075 !important;
	background-color: #433075 !important;
	color: #fafafa !important;
}

button.bg-surface-gray-10:hover,
a.bg-surface-gray-10:hover,
[role="button"].bg-surface-gray-10:hover,
button.bg-surface-gray-10:active,
a.bg-surface-gray-10:active,
[role="button"].bg-surface-gray-10:active {
	background-color: #34235f !important;
	color: #fafafa !important;
}

[data-theme="dark"] button.bg-surface-gray-10,
[data-theme="dark"] a.bg-surface-gray-10,
[data-theme="dark"] [role="button"].bg-surface-gray-10,
.dark button.bg-surface-gray-10,
.dark a.bg-surface-gray-10,
.dark [role="button"].bg-surface-gray-10 {
	--surface-gray-10: #a58cf4 !important;
	background-color: #a58cf4 !important;
	color: #0d0d0d !important;
}

[data-theme="dark"] button.bg-surface-gray-10:hover,
[data-theme="dark"] button.bg-surface-gray-10:active,
.dark button.bg-surface-gray-10:hover,
.dark button.bg-surface-gray-10:active {
	background-color: #b8a4f7 !important;
	color: #0d0d0d !important;
}

/* LMS version-15 SidebarLink active row only.
   The More disclosure is a plain button (no elevation/shadow classes).
   Its panel is the next sibling, shown with v-show. This rule does not
   set display, height, or overflow, so the panel can open. */
button.bg-surface-elevation-3.shadow-sm {
	--surface-elevation-3: #ece8f5 !important;
	background-color: #ece8f5 !important;
	color: #34235f !important;
}

button.bg-surface-elevation-3.shadow-sm .text-ink-gray-8,
button.bg-surface-elevation-3.shadow-sm .text-ink-gray-6 {
	color: #34235f !important;
}

[data-theme="dark"] button.bg-surface-elevation-3.shadow-sm,
.dark button.bg-surface-elevation-3.shadow-sm {
	--surface-elevation-3: rgba(165, 140, 244, 0.17) !important;
	background-color: rgba(165, 140, 244, 0.17) !important;
	color: #c0aff8 !important;
}

[data-theme="dark"] button.bg-surface-elevation-3.shadow-sm .text-ink-gray-8,
[data-theme="dark"] button.bg-surface-elevation-3.shadow-sm .text-ink-gray-6,
.dark button.bg-surface-elevation-3.shadow-sm .text-ink-gray-8,
.dark button.bg-surface-elevation-3.shadow-sm .text-ink-gray-6 {
	color: #c0aff8 !important;
}

button.sumedha-subjects-seed__btn {
	background-color: #433075 !important;
	color: #fafafa !important;
}

[data-theme="dark"] button.sumedha-subjects-seed__btn,
.dark button.sumedha-subjects-seed__btn {
	background-color: #a58cf4 !important;
	color: #0d0d0d !important;
}
