
html { scrollbar-color: var(--pico-primary) var(--pico-background-color); }

:host(:not([data-theme=dark])), :root:not([data-theme=dark]), [data-theme=light] {
--pico-icon-valid: none;
--pico-icon-invalid: none;
}

:root {
  --app-control-height: var(--pico-form-element-height, 2.625rem);
}

[aria-label][data-balloon-pos]:after {
  z-index: 100;
}

i {
  color: var(--pico-primary);
}

button.green i,
button.red i,
button.orange i,
[role=button].green i,
[role=button].red i,
[role=button].orange i {
  color: currentColor;
}

article + div[role=group] form.button_to,
article + div[role=group] > button,
article + div[role=group] > a[role=button],
article ~ div[role=group] form.button_to,
article ~ div[role=group] > button,
article ~ div[role=group] > a[role=button],
article + div.grid form.button_to,
article + div.grid > button,
article + div.grid > a[role=button],
article footer nav[role=group] form.button_to,
article footer nav[role=group] > button,
article footer nav[role=group] > a[role=button],
article footer nav[role=group] > details,
article > header > button,
article > header > a[role=button] {
  margin-bottom: 0;
}

article + div[role=group] form.button_to button,
article + div[role=group] > button,
article + div[role=group] > a[role=button],
article ~ div[role=group] form.button_to button,
article ~ div[role=group] > button,
article ~ div[role=group] > a[role=button],
article + div.grid form.button_to button,
article + div.grid > button,
article + div.grid > a[role=button],
article footer nav[role=group] form.button_to button,
article footer nav[role=group] > button,
article footer nav[role=group] > a[role=button],
article footer nav[role=group] > details > summary[role=button],
article footer nav[role=group] > details.app-control-dropdown > summary[role=button],
details.app-control-dropdown > summary[role=button],
article > header > button,
article > header > a[role=button] {
  min-height: var(--app-control-height);
  height: var(--app-control-height);
  padding-block: 0;
  padding-inline: var(--pico-spacing);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1;
  box-sizing: border-box;
}

article footer nav[role=group] > details.app-control-dropdown,
details.app-control-dropdown {
  display: flex;
  align-items: stretch;
  height: var(--app-control-height);
  margin: 0;
  vertical-align: middle;
}

article footer nav[role=group] > details.app-control-dropdown > summary[role=button]::after,
details.app-control-dropdown > summary[role=button]::after {
  margin-top: 0;
}

article + div.grid > form,
article + div.grid > button,
article + div.grid > a[role=button] {
  width: 100%;
}

article + div.grid form.button_to button {
  width: 100%;
}

article + div[role=group] form.button_to,
article ~ div[role=group] form.button_to,
article + div.grid form.button_to {
  margin-bottom: 0;
  flex: 1 1 8rem;
}

article + div[role=group] form.button_to button,
article ~ div[role=group] form.button_to button,
article + div.grid form.button_to button {
  width: 100%;
}

article footer nav[role=group] {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0;
  align-items: stretch;
}

article footer nav[role=group] > form,
article footer nav[role=group] > button,
article footer nav[role=group] > a[role=button],
article footer nav[role=group] > details,
article footer nav[role=group] > details.app-control-dropdown {
  flex: 1 1 8rem;
  min-width: 0;
}

article footer nav[role=group] > a[role=button],
article footer nav[role=group] > button,
article footer nav[role=group] form.button_to button {
  width: 100%;
}

article footer nav[role=group] > details.app-control-dropdown > summary[role=button],
details.app-control-dropdown > summary[role=button] {
  margin: 0;
  width: 100%;
  flex: 1;
  text-align: center;
}

details:not(.app-control-dropdown) > summary[role=button] {
  width: 100%;
  text-align: left;
  margin-bottom: 0;
}

article > header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: var(--app-control-height);
}

article > header > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

article > header > div:first-child span,
article > header > div:first-child strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: var(--app-control-height);
}

article > header > button,
article > header > a[role=button] {
  flex: 0 0 auto;
  width: var(--app-control-height);
  min-width: var(--app-control-height);
  padding: 0;
  margin-left: 0.25rem;
}

[role=header_action_screen] {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

[role=header_action_screen] nav small {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.15rem 0.35rem;
  line-height: 1.4;
}

[role=header_action_screen] nav small a {
  text-decoration: none;
  white-space: nowrap;
}

[role=header_action_screen] nav small a i {
  margin-right: 0.2rem;
}

.school-page-content {
  margin-top: calc(var(--pico-spacing) * 1.25);
}

.school-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--pico-spacing) * 0.5);
  margin-bottom: calc(var(--pico-spacing) * 1.25);
}

.school-page-tree {
  margin-top: calc(var(--pico-spacing) * 0.25);
  margin-bottom: calc(var(--pico-spacing) * 1);
}

article:has(> footer) > .school-page-tree,
article:has(> footer) > .tree {
  margin-bottom: calc(var(--pico-spacing) * 1);
}

article:has(> .school-page-tree) > footer,
article:has(> .tree.school-page-tree) > footer {
  margin-top: calc(var(--pico-spacing) * 0.5);
  padding-top: calc(var(--pico-spacing) * 0.5);
}

small[role=breadcrumb] {
  display: inline-block;
  line-height: 1.2;
}

small[role=breadcrumb] a.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

small[role=breadcrumb] a.breadcrumb-home svg {
  width: 20px;
  height: 20px;
  display: block;
}

article[role=classroom-summary] dl > dt,
article[role=course-cycle-summary] dl > dt,
article[role=course-summary] dl > dt,
article[role=school-summary] dl > dt,
article > dl > dt,
article[role=highlight] dl > dt {
  font-weight: 700;
}

article[role=classroom-summary] dl > dd,
article[role=course-cycle-summary] dl > dd,
article[role=course-summary] dl > dd,
article[role=school-summary] dl > dd,
article > dl > dd,
article[role=highlight] dl > dd {
  margin-bottom: calc(var(--pico-spacing) * 1.25);
  padding-bottom: calc(var(--pico-spacing) * 0.25);
  min-width: 0;
}

article[role=highlight] {
  margin-bottom: calc(var(--pico-spacing) * 0.75);
}

article[role=highlight] > footer {
  margin-top: calc(var(--pico-spacing) * 0.5);
  padding-top: 0;
}

article[role=classroom-list-item] {
  padding: calc(var(--pico-spacing) * 0.6) calc(var(--pico-spacing) * 0.75);
  margin-bottom: calc(var(--pico-spacing) * 0.5);
}

article[role=classroom-list-item] > footer {
  margin-top: calc(var(--pico-spacing) * 0.35);
  padding-top: calc(var(--pico-spacing) * 0.35);
  padding-bottom: 0;
}

article[role=classroom-list-item] > footer nav[role=group] {
  gap: 0.35rem;
  margin-bottom: 0;
}

article[role=classroom-list-item] dl {
  margin-bottom: 0;
}

article[role=classroom-list-item] dl > dt {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
}

article[role=classroom-list-item] dl > dd {
  font-size: 0.9rem;
  margin-bottom: calc(var(--pico-spacing) * 0.5);
  padding-bottom: 0;
}

article[role=classroom-list-item] dl > dd:last-of-type {
  margin-bottom: 0;
}

details > summary {
  padding-block: calc(var(--pico-spacing) * 0.5);
}

nav.address-actions,
nav.address-actions[role=group] {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  margin-top: calc(var(--pico-spacing) * 0.5);
  box-sizing: border-box;
}

nav.address-actions > a[role=button],
nav.address-actions[role=group] > a[role=button] {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  margin: 0;
  margin-inline-start: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--pico-border-radius);
  box-sizing: border-box;
}

nav.address-actions > a[role=button] + a[role=button] {
  margin-inline-start: 0;
}

nav.address-actions > a[role=button] i {
  margin: 0;
  font-size: 1rem;
  line-height: 1;
}

.lesson-plan-form-actions {
  display: flex;
  flex-direction: column;
  gap: calc(var(--pico-spacing) * 0.75);
  margin-top: calc(var(--pico-spacing) * 0.5);
}

.lesson-plan-form-actions__add {
  display: flex;
  justify-content: flex-end;
}

.lesson-plan-form-actions__add > button {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.lesson-plan-form-actions__save {
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0;
}

.lesson-plan-form-actions__save > button,
.lesson-plan-form-actions__save > input[type="submit"] {
  width: 100%;
  margin: 0;
  min-height: var(--app-control-height);
  height: var(--app-control-height);
  box-sizing: border-box;
}

[role=classroom-status],
[role=course-cycle-status] {
  margin-bottom: calc(var(--pico-spacing) * 0.75);
}

[role=classroom-status] [role=status],
[role=course-cycle-status] [role=status] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--app-control-height);
  height: var(--app-control-height);
  margin: 0;
  padding: 0 var(--pico-spacing);
  box-sizing: border-box;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--pico-border-radius);
  border: 1px solid transparent;
}

[role=classroom-status] [role=status].yellow,
[role=course-cycle-status] [role=status].yellow {
  background: rgb(255 255 0 / 0.22);
  color: darkgoldenrod;
  border-color: rgb(184 134 11 / 0.45);
}

[role=classroom-status] [role=status].green,
[role=course-cycle-status] [role=status].green {
  background: rgb(0 128 0 / 0.18);
  color: green;
  border-color: rgb(0 100 0 / 0.45);
}

[role=classroom-status] [role=status].red,
[role=course-cycle-status] [role=status].red {
  background: rgb(255 0 0 / 0.14);
  color: darkred;
  border-color: rgb(139 0 0 / 0.4);
}

article > header > button,
article > header > a[role=button],
article > header > button.outline {
  margin-bottom: 0px;
}

form.button_to button {
  width: stretch;
  margin-bottom: 0;
}

button.green, [role=button].green {
  background-color: green;
  color: white;
  border-color: darkgreen;
}
button.red, [role=button].red {
  background-color: red;
  color: white;
  border-color: darkred;
}

button.orange, [role=button].orange {
  background-color: orange;
  color: white;
  border-color: darkorange;
}

@media (max-width: 576px) {
  h1 {
    --pico-font-size: 1.25rem;
  }
  h2 {
    --pico-font-size: 1.125rem;
  }
  h3 {
    --pico-font-size: 1rem;
  }
  h4 {
    --pico-font-size: 0.875rem;
  }
  h5 {
    --pico-font-size: 0.75rem;
  }
  h6 {
    --pico-font-size: 0.625rem;
  }

  .grid {
    grid-row-gap: 0px;
    grid-column-gap: 0px;
  }

  article + div.grid {
    grid-template-columns: 1fr;
  }

  article footer nav[role=group] {
    flex-direction: row;
    justify-content: center;
  }

  article + div[role=group]:not(article footer nav),
  article ~ div[role=group]:not(article footer nav),
  article + div.grid > form,
  article + div.grid > button,
  article + div.grid > a[role=button] {
    width: 100%;
  }

  div[role=group]:not(article footer nav) {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  article + div[role=group] form.button_to,
  article ~ div[role=group] form.button_to,
  div[role=group]:not(article footer nav) > form,
  div[role=group]:not(article footer nav) > button,
  div[role=group]:not(article footer nav) > a[role=button],
  div[role=group]:not(article footer nav) > details {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
  }

  div[role=group]:not(article footer nav) form.button_to button {
    width: 100%;
    border-radius: var(--pico-border-radius);
  }

  div[role=group]:not(article footer nav) > button,
  div[role=group]:not(article footer nav) > a[role=button] {
    border-radius: var(--pico-border-radius);
  }

  .fluid-mobile {
    display: ruby;
  }

  .lesson-plan-form-actions__add > button {
    width: auto;
  }

  .lesson-plan-form-actions__save {
    grid-template-columns: 1fr 1fr;
  }
}
