/* Edvello theme. Brand values: brand/README.md. Neutral greys + blue accent, values from the Edvello
   app theme (edvello/packages/ui index.css, edvello-meet/branding/theme.css). */
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap;
  src: url("/assets/edvello_institute/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap;
  src: url("/assets/edvello_institute/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.edvello-role-navigation {
  padding: 0.25rem 0.5rem 0.5rem;
}

.edvello-college-home {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem;
}

.edvello-college-home img {
  display: block;
  max-width: min(10rem, 100%);
  max-height: 2rem;
  object-fit: contain;
}

.edvello-work-areas {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.25rem;
}

.edvello-work-area {
  border-radius: var(--ed-radius);
  color: var(--text-color, inherit);
  display: block;
  font-weight: 500;
  padding: 0.4rem 0.5rem;
}

.edvello-work-area:hover,
.edvello-work-area[aria-current="page"] {
  background: var(--control-bg);
  color: var(--text-color, inherit);
}

.edvello-role-navigation a:focus-visible {
  outline: 2px solid var(--ed-blue);
  outline-offset: 1px;
}

.edvello-role-navigation + .sidebar-header .header-logo:empty {
  display: none;
}

.body-sidebar-container:not(.expanded) .edvello-role-navigation {
  display: none;
}


/* ---- Brand: true-neutral greys, blue only as the accent ---- */
:root {
  --ed-blue: #1447e6; --ed-blue-hover: #1238c4; --ed-blue-soft: #eef3ff; --ed-ring: rgba(20, 71, 230, 0.25);
  --ed-border: #e5e5e5; --ed-border-input: #d4d4d4; --ed-radius: 8px;
  --font-stack: "Geist", "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---- Light: override Frappe's raw palette; every --surface-/--ink-/--outline-* alias follows.
   (0,2,0) specificity beats the :root / [data-theme] blocks that load after this file. ---- */
:root:not([data-theme="dark"]):not(.dark) {
  --gray-50: #fafafa; --gray-100: #f5f5f5; --gray-200: #e5e5e5; --gray-300: #d4d4d4;
  --gray-400: #a3a3a3; --gray-500: #8a8a8a; --gray-600: #6e6e6e; --gray-700: #525252;
  --gray-800: #262626; --gray-900: #171717; --gray-950: #0a0a0a;
  --gray-alpha-50: #00000008; --gray-alpha-100: #0000000b; --gray-alpha-200: #00000012;
  --gray-alpha-300: #0000001d; --gray-alpha-400: #00000038; --gray-alpha-500: #00000066;
  --gray-alpha-600: #00000083; --gray-alpha-700: #000000ad; --gray-alpha-800: #000000c7;
  --gray-alpha-900: #000000e8; --gray-alpha-950: #000000f0;
  --blue-50: #eef3ff; --blue-100: #dfe8ff; --blue-200: #c4d3ff; --blue-300: #9db3ff;
  --blue-400: #6b8cf3; --blue-500: #1447e6; --blue-600: #1238c4; --blue-700: #0f2f9f;
  --blue-800: #0c2578; --blue-900: #0a1d5c; --blue-950: #08143d;
  --red-500: #e7000b; --red-600: #c10007; --red-700: #a50008; --red-800: #820007;
  --red-900: #5e0005; --red-950: #430004;
  --surface-sidebar: var(--gray-50);
  --surface-alpha-sidebar: var(--gray-50);
}

/* ---- Dark: neutral greys from the Edvello dark theme (#0a0a0a page, #171717 raised, #262626 hover) ---- */
[data-theme="dark"]:root, .dark {
  --gray-50: #fafafa; --gray-100: #e5e5e5; --gray-200: #d4d4d4; --gray-300: #a3a3a3;
  --gray-400: #8a8a8a; --gray-450: #6a6a6a; --gray-500: #404040; --gray-600: #333333;
  --gray-700: #2a2a2a; --gray-800: #1f1f1f; --gray-900: #171717; --gray-950: #0a0a0a;
  --blue-50: #dbe4ff; --blue-100: #c3d1ff; --blue-200: #9db3ff; --blue-300: #7c9bff;
  --blue-400: #4f77f5; --blue-500: #1447e6; --blue-600: #1238c4; --blue-700: #0f2f9f;
  --blue-800: #0c2578; --blue-900: #0a1d5c; --blue-950: #08143d;
  --red-500: #e7000b; --red-600: #c10007; --red-700: #a50008; --red-800: #820007;
  --red-900: #5e0005; --red-950: #430004;
  --ed-border: #333333; --ed-border-input: #404040; --ed-blue-soft: #14204a;
  --ed-ring: rgba(77, 119, 245, 0.45);
}

/* ---- Tokens that decide the "look" ---- */
:root:root {
  --primary: var(--ed-blue); --primary-color: var(--ed-blue); --brand-color: var(--ed-blue);
  --btn-primary: var(--ed-blue);
  --checkbox-gradient: linear-gradient(180deg, var(--ed-blue) -124.51%, var(--ed-blue) 100%);
  --progress-bar-bg: var(--ed-blue);
  --date-active-bg: var(--ed-blue); --date-active-text: #fff;
  --focus-default: 0 0 0 3px var(--ed-ring); --focus-outline-default: 3px solid var(--ed-ring);
  --focus-blue: 0 0 0 3px var(--ed-ring); --focus-outline-blue: 3px solid var(--ed-ring);
  --radius: var(--ed-radius);
  /* inputs: page background + visible border (never a filled bar) */
  --control-bg: var(--surface-base);
  --control-bg-on-gray: var(--surface-base);
  --btn-default-bg: var(--surface-base);
  --btn-default-hover-bg: var(--surface-gray-2);
  --bt-fill-bg: var(--surface-base);
  --bt-fill-bg-hover: var(--surface-gray-2);
  --bt-fill-bg-active: var(--surface-gray-3);
  --bt-border: var(--ed-border-input);
  --bt-border-hover: var(--outline-gray-3);
  --sidebar-select-color: var(--ed-blue-soft);
  --highlight-shadow: 0 0 0 3px var(--ed-ring);
}
:root:root:not([data-theme="dark"]) {
  --text-color: var(--ink-gray-8);
  --heading-color: var(--gray-950);
  --code-block-bg: var(--gray-950);
  --shadow-inset: inset 0px -1px 0px var(--gray-200);
}

/* ---- Hard-coded spots (no token exists) ---- */
body { font-family: var(--font-stack); color: var(--text-color); }
a { color: var(--ed-blue); }
[data-theme="dark"] a { color: var(--blue-300); }
.for-login .app-logo, .page-card-head .app-logo { max-height: 48px; width: auto; }
/* solid (primary) buttons are blue, not the Espresso gray theme */
:root .es-button[data-variant="solid"]:not([data-theme]):not(.btn-danger) {
  --bt-solid-bg: var(--ed-blue); --bt-solid-bg-hover: var(--ed-blue-hover); --bt-solid-bg-active: var(--blue-700); --bt-solid-fg: #fff;
  background: var(--ed-blue); color: #fff;
}
:root .es-button[data-variant="solid"]:not([data-theme]):not(.btn-danger):hover { background: var(--ed-blue-hover); }
/* secondary buttons: neutral with a border */
:root .es-button:not([data-variant]), :root .es-button[data-variant="subtle"] { border-color: var(--ed-border-input); }
:root .es-tabs__indicator, :root .es-progress__fill, :root .es-progress__segment[data-filled] { background: var(--ed-blue); }
/* inputs: bordered, brand focus ring */
:root .form-control, :root .input-with-feedback, :root select.form-control, :root textarea.form-control,
:root .awesomplete input, :root .search-bar input, :root .awesomebar, :root .navbar .search-bar {
  background-color: var(--surface-base); border: 1px solid var(--ed-border-input); box-shadow: none;
}
:root .form-control:focus, :root .input-with-feedback:focus, :root select.form-control:focus, :root textarea.form-control:focus,
:root .awesomplete input:focus, :root .search-bar:focus-within, :root .search-bar input:focus {
  border-color: var(--ed-blue); box-shadow: 0 0 0 3px var(--ed-ring); outline: none;
}
:root .form-control[disabled], :root .form-control[readonly] { background-color: var(--surface-gray-1); }
/* air-datepicker hard-codes #9c9c9c / #dedede */
.datepicker .datepicker--nav-title i { color: var(--ink-gray-5) !important; }
.datepicker .datepicker--cell-day { color: var(--ink-gray-8); }
.datepicker .datepicker--cell.-other-month-, .datepicker .datepicker--cell.-other-decade- { color: var(--ink-gray-3) !important; }
/* dark theme: use the dark-background logo variant */
[data-theme="dark"] img[src$="/edvello-logo-horizontal.svg"] { content: url("/assets/edvello_institute/images/edvello-logo-horizontal-dark.svg"); }
/* sidebar: neutral surface, selected item marked in blue */
:root .standard-sidebar-item.active-sidebar { background: var(--ed-blue-soft); box-shadow: none; }
:root .standard-sidebar-item.active-sidebar .item-anchor,
:root .standard-sidebar-item.active-sidebar .sidebar-item-label,
:root .standard-sidebar-item.active-sidebar .sidebar-item-icon { color: var(--ed-blue); font-weight: 500; }
[data-theme="dark"] .standard-sidebar-item.active-sidebar .item-anchor,
[data-theme="dark"] .standard-sidebar-item.active-sidebar .sidebar-item-label,
[data-theme="dark"] .standard-sidebar-item.active-sidebar .sidebar-item-icon { color: var(--blue-300); }
:root .search-widget-button { border: 1px solid var(--ed-border-input); background: var(--surface-base); }
:root .search-widget-button:hover { background: var(--surface-gray-2); }
/* dark layers: page #0a0a0a < raised (modal, popover, sidebar) #171717; inputs sit back at page level with a lighter border */
[data-theme="dark"]:root:root { --modal-bg: #171717; --popover-bg: #171717; --surface-elevation-1: #171717; --surface-elevation-2: #171717; --surface-elevation-3: #171717; }
/* College logos (arbitrary aspect ratio): fit inside a box, never stretch */
:root .navbar-home img, :root .navbar-brand img, :root .app-logo { max-height: 32px; max-width: 180px; width: auto; height: auto; object-fit: contain; }
:root .for-login .app-logo, :root .page-card-head .app-logo { max-height: 56px; max-width: 240px; }
.splash img { max-height: 96px; object-fit: contain; }
/* dark theme: an uploaded logo may be dark-on-transparent, so give any non-Edvello logo a light plate */
[data-theme="dark"] .navbar-home img:not([src*="/assets/edvello_institute/"]),
[data-theme="dark"] .navbar-brand img:not([src*="/assets/edvello_institute/"]),
[data-theme="dark"] .app-logo:not([src*="/assets/edvello_institute/"]),
[data-theme="dark"] .splash img:not([src*="/assets/edvello_institute/"]) { background: #fff; padding: 4px 8px; border-radius: 8px; }
