/**
* GLOBAL THEME
*/

:root {

  --row-width: 95em;
  --sidebar-width: 20em;

  --screen-md: 40em;
  --screen-lg: 60em;
  --screen-xl: 80em;

  --color-neutral: #4299e1;
  --color-error: #e53e3e;
  --color-warning: #ed8936;
  --color-success: #48bb78;
  --color-focus: #4299e1;

  --accent-primary: #0053a0;
  --accent-secondary: #e2383f;
  --accent-dark: #3d4b60;

  --global-radius: 0.5em;
  --shadow-light: 0 0.25em 0.5em rgba(0,0,0,.1);
}

body {
  background: #eee;
  color: var(--accent-dark);
  font-size: 16px;
  line-height: 1.4;
  font-family: "Open Sans", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-focus);
}


/* Typography */

h1,
h2,
h3,
h4,
h5 {
  color: var(--accent-dark);
  margin: 0 0 0.5em;
}

p {
  color: var(--accent-dark);
  margin-bottom: 1em;
  line-height: 1.5;
}

hr {
  border: none;
  border-top: 0.1em solid #ddd;
  margin: 1.5em 0;
}

.section-title h1 {
  font-size: 2em;
}


/* Content Navigation */

.content-nav {
  position: -webkit-sticky;
  position: sticky;
  width: 100;
  top: 0;
  left: 0;
  z-index: 200;
  background-color: var(--accent-dark);
  color: #fff;
}

.content-nav .logo {
  display: inline-flex;
  align-items: center;
  padding: .75em;
}
.content-nav .logo svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 160px;
}

.content-nav button {
  display: block;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: 100em;
  font-weight: 600;
  transition:
    background-color .3s ease,
    filter .3s ease;
}

.content-nav nav {
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  width: 15em;
  height: 100vh;
  overflow-y: auto;
  background: #515d70;
  transform: translate3d(100%, 0, 0);
  transition: transform .3s ease;
  padding-top: 1em;
}
.sidebar-open .content-nav nav {
  transform: none;
  box-shadow: 0 0 10px 0 rgba(0,0,0,.5);
}

.content-nav a {
  position: relative;
  padding: 1em 1.5em;
  color: #fff;
  text-decoration: none;
  font-size: 1.25em;
  transition:
    background-color .3s ease,
    color .3s ease;
}
.content-nav a:hover {
  background-color: rgba(255,255,255,.1);
}

.content-nav li a {
  display: flex;
  align-items: center;
  padding-right: 2em;
}
.content-nav li a:hover::after {
  opacity: 1;
}
.content-nav li a::after {
  content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="white" d="M402.78 275.9L175.44 503.76a28.03 28.03 0 01-39.7 0l-26.52-26.58a28.19 28.19 0 01-.04-39.75l180.17-181.42L109.19 74.57a28.18 28.18 0 01.04-39.75l26.52-26.58a28.03 28.03 0 0139.7 0L402.78 236.1a28.2 28.2 0 010 39.8z"/></svg>');
  display: block;
  position: absolute;
  top: 50%;
  margin-top: -0.5em;
  right: 2em;
  width: 1em;
  height: 1em;
  font-size: .75em;
  opacity: .2;
  transition: opacity .3s ease;
}
.content-nav li a svg {
  display: block;
  width: 1em;
  height: 1em;
  margin-right: 1em;
  opacity: .15;
}

.content-nav li a.is-current {
  border-left: 4px solid var(--color-neutral);
}


/* Form Running Actions (Actions/Transforms/Operations) */

.content-nav nav.action-list li {
  margin: 1em 1.5em;
}
.content-nav nav.action-list button {
  display: block;
  width: 100%;
}
.content-nav nav.action-list .logout-list {
  margin: 0;
}


/* Logout Buttons (Menu List / Sidebar) */

.content-nav .logout-button {
  width: 100%;
  padding: 1em 1.5em;
  background-color: rgba(255,255,255,.1);
  color: #fff;
}
.content-nav .logout-button:hover {
  background-color: rgba(255,255,255,.15);
}

.user-actions {
  display: none;
  padding: 1.5em;
  margin-top: auto;
  background-color: rgba(255,255,255,.025);
}

.content-nav .logout-list {
  padding: 1.5em;
}

.user-actions .active-username {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25em;
  margin-bottom: 1em;
}
.user-actions .active-username.is-shown {
  display: flex;
}
.user-actions .active-username svg {
  display: block;
  font-size: 1.5em;
  width: 1em;
  height: 1em;
  margin-right: .5em;
}


/* Mobile Menu Toggle */

.nav-toggle {
  color: #fff;
  align-self: center;
  padding: 1em;
  margin: .75em;
  background-color: rgba(255,255,255,.1);
}
.nav-toggle:hover {
  background-color: rgba(255,255,255,.2);
}
.nav-toggle svg {
  display: block;
  width: 1em;
  height: 1em;
}

button.nav-overlay {
  display: none;
  position: absolute;
  z-index: 150;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background-color: rgba(0,0,0,.4);
  border-radius: 0;
  transition: background-color .3s ease;
  font-size: 0;
}
button.nav-overlay:hover {
  background-color: rgba(0,0,0,.25);
}
button.nav-overlay:focus {
  box-shadow: none;
}

.sidebar-open button.nav-overlay {
  display: block;
}


/* Screen: Laptop-up */

@media screen and (min-width: 60em) {

  .content-wrap .content-nav {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .content-wrap .content-nav .logo {
    padding: 3em 1.5em 2em;
  }
  .content-wrap .content-nav .logo svg {
    max-width: 200px;
  }

  .content-wrap .content-nav nav {
    position: static;
    width: auto;
    background: transparent;
    transition: none;
    transform: none;
    box-shadow: none;
    padding-top: 0;
  }
  .sidebar-open button.nav-overlay {
    display: none;
  }

  .content-nav .logout-list {
    display: none;
  }
  .content-wrap .user-actions {
    display: block;
  }

  body.has-navigation {
    padding-left: var(--sidebar-width);
  }
  
}


/* Status Tags */

.status-tag {
  background-color: #ddd;
  color: var(--accent-dark);
}
.status-tag.status-save,
.status-tag.status-saved {
  background-color: var(--color-warning);
  color: #fff;
}
.status-tag.status-processing {
  background-color: var(--color-neutral);
  color: #fff;
}
.status-tag.status-processed,
.status-tag.status-complete,
.status-tag.status-completed {
  background-color: var(--color-success);
  color: #fff;
}
.status-tag.status-debug {
  background-color: rebeccapurple;
  color: #fff;
}


/* Page Notification */
.notification-container {
  display: none;
  position: fixed;
  z-index: 999;
  top: 100%;
  left: 0;
  width: 100%;
  padding: 0 .5em;
}
.notification-container.is-shown {
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-notification {
  display: inline-flex;
  align-items: center;
  padding: .75em 1em;
  background: var(--color-error);
  color: #fff;
  font-size: 1em;
  border-radius: .5em .5em 0 0;
  transform: translateY(-100%);
}
.page-notification span {
  display: inline-block;
  padding: 0 .5em;
  line-height: 1.2;
}
.page-notification button {
  display: none;
  padding: .5em 1em;
  margin-left: .75em;
  background-color: rgba(255,255,255,.1);
  color: #fff;
  transition: background-color .25s ease;
}
.page-notification button:hover {
  background-color: rgba(255,255,255,.2);
}
.page-notification button.is-shown {
  display: block;
}


@media screen and (min-width: 60em) {

  .notification-container {
    top: auto;
    bottom: 100%;
  }

  .page-notification {
    border-radius: 0 0 .5em .5em;
    transform: translateY(100%);
  }

}

/* Layout Skeletons */

.skeleton-block {
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,.05);
  border-radius: var(--global-radius);
  height: 10em; /* Default height */
}
.skeleton-block::after {
  content: '';
  position: absolute;
  display: block;
  top: 0;
  right: -100%;
  width: 50%;
  height: 100%;
  background: white;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,1) 75%, rgba(255,255,255,0) 100%);
  animation: loading-skeleton 2s infinite linear;
}


/* Animations */

.spin {
  animation: spin 2s linear infinite;
}
.spin-stepped {
  animation: spin 1s steps(8) infinite;
}

@keyframes spin {

  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(359deg);
  }

}

@keyframes fade-in {

  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }

}

@keyframes fade-up {

  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes loading-skeleton {
  
  0% {
    opacity: 0;
    left: -50%;
  }
  50% {
    opacity: .5;
    left: 50%;
  }
  100% {
    opacity: 0;
    left: 150%;
  }

}
