.paper {
  background-color: white;
  margin: 2rem;
  padding: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.shadow {
  box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 3px 1px -2px rgba(0, 0, 0, 0.12);
}

/* DIALOG */
.dof-dialog {
  display: flex;
  align-items: center;
  position: fixed;
  background-color: hsla(0, 0%, 0%, 0.4);
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;    
  opacity: 0;
  z-index: 7;
  pointer-events: none;
  transition: var(--animation, all 300ms ease-in-out);
}

.dof-dialog > .paper {
  display: grid;  
  grid-template-columns: auto;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: 
    "dialog-title"
    "dialog-content"
    "dialog-actions";
  width: 100%;
  transition: var(--animation, all 300ms ease-in-out);
  transform: scale(0.5);
}

.dof-dialog[data-open="true"] {
  opacity: 1;
  pointer-events: all;
}

.dof-dialog[data-open="true"] > .paper { transform: scale(1); }

.dof-dialog [data-dialog="title"] {
  grid-area: dialog-title;
  margin: 0 0 1rem 0; 
}
.dof-dialog [data-dialog="content"] {
  grid-area: dialog-content;
  overflow-y: auto;
}
.dof-dialog [data-dialog="actions"] {
  display: flex;
  grid-area: dialog-actions;
  justify-content: flex-end;
  margin-top: 1rem;
}
.dof-dialog [data-dialog="actions"] > * { margin-left: 1rem; }

/* DROPDOWN */
.dof-dropdown { 
  display: inline-block;
  position: relative; 
}

.dof-dropdown:hover .dof-dropdown-content { display: flex; }
.dof-dropdown .dof-dropdown-content {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.125rem);
  left: 0;
  margin: 0;
  padding: 0;  
  cursor: pointer;
  z-index: 2;
}

.dof-dropdown .dof-dropdown-content > * { padding: 0.25rem 1rem; }
.dof-dropdown .dof-dropdown-content > *:hover {
  background-color: var(--color-main);
}

/* DRAWER */
.dof-drawer {
  position: fixed;
  top: 0;
  width: 0;  
  height: 100vh;
  background-color: white;
  overflow: hidden;
  box-shadow: 0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12);
  transition: all var(--transition-duration, 400ms) ease-out;
  z-index: 4;
}

.dof-drawer[data-open="true"] { width: var(--width, 50%); }
.dof-drawer[data-position="left"] { left: 0; }
.dof-drawer[data-position="right"] { right: 0; }

/* MENU */
.dof-menu { 
  color: white;
  background-color: var(--color-main, hsla(81, 70%, 42%, 1));
  overflow-y: auto;
  z-index: 7;
}

.dof-menu .close {
  display: flex;
  font-size: 2rem;
  padding: 0 1rem;
}

.dof-menu[data-position="left"] .close { flex-direction: row-reverse; }

.dof-menu ul { 
  list-style: none;
  margin: 0;
  padding: 0;
  --divider-thickness: 1px;
}

.dof-menu ul ul { padding: 0 0 0 1rem; }
.dof-menu .divider { 
  background-color: #333;
  height: var(--divider-thickness);
}

.dof-menu li[data-open="false"] > ul { display: none; }

.dof-menu .item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.25rem;
  transition: all 250ms ease-in-out;
}
.dof-menu .item span, .dof-menu .item img { pointer-events: none; }
.dof-menu .item img { margin-right: 1rem; }

.dof-menu li[data-open="true"] > div.item {
  color: var(--color-main, hsla(81, 70%, 42%, 1));
  background-color: white;
}

nav.menu-button {
  position: fixed;
  top: 0.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  color: white;
  background-color: var(--color-main, hsla(81, 70%, 42%, 1));
  font-size: 30px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 var(--color-main, hsla(81, 70%, 42%, 1));
  z-index: 6;
}

nav.menu-button[data-position="left"] { left: 1.5rem; }
nav.menu-button[data-position="right"] { right: 1.5rem; }

nav.menu-button:hover { animation: menu-glow 1.5s ease infinite; }
@keyframes menu-glow {
  100% { box-shadow: 0 0 10px 8px transparent; }
}

/* MODAL */
.dof-modal {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(51, 51, 51, 0.9);  
  top: 0;
  z-index: 7;
}

.dof-modal > div {
  position: fixed;
  max-height: 90%;
  background-color: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px;
  border-radius: 3px;
  box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);      
  overflow-y: auto;
}

/* NOTIFICATION */
.dof-notification {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: fixed;
  color: white;  
  top: 0px;
  right: 20px;
  padding-left: 20px;
  z-index: 10;
}

.dof-notification-message {
  display: flex;
  align-items: center;
  position: relative;
  background-color: #333;
  margin-top: 1em;
  padding: 6px 15px;
  border: 1px solid #272727;
  border-radius: 3px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  opacity: 0;
  transition: opacity 0.4s;
}

.dof-notification [data-error] { background-color: #f44336; border: 1px solid #d52c20; }
.dof-notification [data-info] { background-color: #2196f3; border: 1px solid #1a85db; }
.dof-notification [data-success] { background-color: #4caf50; border: 1px solid #329f36; }
.dof-notification [data-warning] { background-color: #ff9800; border: 1px solid #d08311; }

.dof-notification-close {
  color: #e9e9e9;
  font-size: 24px;
  font-weight: bold;
  margin-left: 1em;
  cursor: pointer;
}

.dof-notification-close:hover { color: white; }

/* PANEL */ 
[data-panel] { cursor: pointer; }

[data-panel-content]:after {
  margin-left: 0.5em;
  content: attr(data-panel-content);
}

.dof-panel { overflow: hidden; }

/* TOOLTIP */
.tooltip {
  display: inline-block;
  position: relative;
} 

.tooltip-base {  
  position: absolute;
  color: #fff;
  background-color: rgba(51, 51, 51, 0.9);
  padding: 7px;
  border-radius: 3px;
  line-height: 1.2;  
  visibility: hidden;  
  white-space: nowrap;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition:         
    opacity 0.2s ease-in-out,
    visibility 0.2s ease-in-out,
    transform 0.2s cubic-bezier(0.71, 1.7, 0.77, 1.24);
}

.tooltip-top {
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 0);
}

.tooltip-left {
  right: 110%;
  bottom: 50%;
  transform: translate(0, 50%);
}

.tooltip-right {
  left: 110%;
  bottom: 50%;
  transform: translate(0, 50%);
}

.tooltip-bottom {
  left: 50%;
  top: 100%;
  transform: translate(-50%, 0);
}

.tooltip-topleft {
  right: 80%;
  bottom: 80%;
  transform: translate(10px, 10px);
}

.tooltip-topright {
  left: 80%;
  bottom: 80%;
  transform: translate(-10px, 10px);
}

.tooltip-bottomleft {
  right: 80%;
  top: 80%;
  transform: translate(10px, -10px);
}

.tooltip-bottomright {
  left: 80%;
  top: 80%;
  transform: translate(-10px, -10px);
}

.tooltip:hover .tooltip-base {
  visibility: visible;
  opacity: 1;
}

.tooltip:hover .tooltip-top { transform: translate(-50%, -10px); }
.tooltip:hover .tooltip-left { transform: translate(-10px, 50%); }
.tooltip:hover .tooltip-right { transform: translate(10px, 50%); }
.tooltip:hover .tooltip-bottom { transform: translate(-50%, 10px); }
.tooltip:hover .tooltip-topleft, .tooltip:hover .tooltip-topright,
.tooltip:hover .tooltip-bottomleft, .tooltip:hover .tooltip-bottomright { transform: translate(0px, 0px); }