/* colors */
/*
:root {
  --fg-color: #132333;
  --bg-color: #eeedec;
  --body-background: #fefdfc;
  --offset-bg-color: #e7e6e5;
  --err-color: #c00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg-color: #fefdfc;
    --bg-color: #2e2e2e;;
    --body-background: linear-gradient(135deg, #1e1e1e, #2c2c2c);
    --offset-bg-color: #393939;
  }
}
/**/

html {
	color-scheme: light dark;
	background-color: light-dark(white, black);
	color: light-dark(black, white);
}

body {
  font: 1rem/1.5 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
  margin: 0;
  height: 100dvh;
}
body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

header, main, footer {
  width: 100%;
  max-width: 90rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}
header {
  padding-top: 1rem;
}

* + * {
  margin-top: 0.5rem;
}
.no-owl {
  margin-top: 0;
}

label,input,select,textarea,button {
  display: block;
  box-sizing: border-box;
}
input, button, select, textarea {
  padding: 0.3rem;
  width: 100%;
  font-size: 1rem;
}
input[type="checkbox"], input[type="radio"] {
  display: inline-block;
  width: auto;
}
input[readonly] {
  background-color: lightgray;
}
input[type="submit"], button {
  width: auto;
}

summary {
  cursor: pointer; /* weird that this is not default */
}

.inline {
  display: inline-block;
  width: auto;
}
.right {
  float: right;
}
.flex {
  display: flex;
  flex-direction: row;
  .flex-1 {
    flex: 1;
  }
}
.width-auto {
  width: auto;
}

.card {
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.card h3 {
  margin: 0;
}


/* design */
nav a {
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  &:hover {
    text-decoration: underline;
  }
  &:active {
    text-decoration: underline;
  }
  &:visited {
    color: inherit;
  }
}

nav details {
  float:right;
  display: inline-block;
  margin-left: 1rem;
  margin-top: 0;
  background: #ffffff;
  div {
    position: fixed;
    padding: 0.5rem;
    background: #fff;
    /*
    &:hover {
      background: var(--offset-bg-color);
    }*/
  }
  a {
    display: block;
  }
}

nav.breadcrumbs  {
  h3 {
    font-size: 0.8rem;
    font-weight: normal;
  }
  a {
    font-weight: bold;
    text-transform: none;
  }
}

/* triptych loaded animation */
.loaded {
  animation: show 400ms forwards;
  opacity: 0.3;
}

@keyframes show {
  100% {
    opacity: 1;
  }
}

/* enable larger drop zone */
input[type="file"] {
  height: 6rem;
  background-color: lightgreen;
  background:url("/static/drop-here.svg") center center no-repeat;
}

/* files layout */
.files-layout {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}
.files-layout .file-form {
  flex-shrink: 0;
  width: 16rem;
}
.file-list li {
  margin-top: 0.2rem;
}
@media (max-width: 700px) {
  .files-layout {
    flex-direction: column;
  }
  .files-layout .file-form {
    width: 100%;
  }
  .file-list {
    columns: 1;
  }
}

/* card row */
.card-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
}
.card-row .card {
  flex: 1;
  min-width: 0;
}
@media (max-width: 700px) {
  .card-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* sidebar layout */
.sidebar-layout {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.sidebar {
  flex-shrink: 0;
  width: 13rem;
  position: sticky;
  top: 1rem;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar nav a {
  text-transform: none;
  padding: 0.35rem 0.6rem;
  border-radius: 0.3rem;
  margin-top: 0;
  &:hover {
    background: light-dark(#f0f0f0, #333);
  }
}

.sidebar nav hr {
  margin: 0.4rem 0;
  border: none;
  border-top: 1px solid light-dark(#ddd, #444);
}

.sidebar nav .sidebar-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: light-dark(#888, #666);
  padding: 0.5rem 0.6rem 0.2rem;
  margin-top: 0;
}

.main-content {
  flex: 1;
  min-width: 0;
}
.main-content > * + * {
  margin-top: 2rem;
}

.main-content > h2 {
  margin-top: 0;
}

@media (max-width: 700px) {
  .sidebar-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
  }
  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .sidebar nav .sidebar-label {
    display: none;
  }
  .sidebar nav hr {
    display: none;
  }
}

.admin-cms {
  .card {
    display: none;
    &.selected {
      display: block;
    }
  }
}
