#popup_area {
  display: grid;
  position: absolute;
  grid-template-areas:
    ". . ."
    ". popup ."
    ". . .";
  grid-template-rows: 20% 1fr 20%;
  grid-template-columns: 20% 1fr 20%;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

#popup_area * {
  pointer-events: all;
}

#popup_area[hidden] {
  display: none;
}

#popup {
  background-color: var(--ui-color);
  display: grid;
  grid-template-areas:
    "top"
    "content";
  grid-template-columns: 1fr;
  grid-template-rows: 20px 1fr;
  width: 100%;
  height: 100%;
  grid-area: popup;
  border-radius: 20px;
  box-shadow: rgba(0, 0, 0, 50) 0 0 10px;
  color: var(--ui-text-color);
}

#popup_body {
  max-height: 600px;
  padding:1em;
}

.popuptop {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  grid-area: top;
  background-color: var(--ui-highlight);
  text-align: center;
  color: var(--ui-text-color);
  border-radius: 20px 20px 0 0;
}

.popuptop h3 {
  font-size: small;
  display: inline;
}

.popuptop button {
  align-self: flex-start;
  float: right;
  position: absolute;
  width: 50px;
  left: calc(100% - 50px);
  background-color: rgba(0, 0, 0, 0);
  color: var(--ui-text-color);
  overflow: hidden;
  border: none;
  z-index: 10;
}

.popuptop button:hover {
  color: black;
  cursor: pointer;
}

.popup-center {
  display: flex;
  text-align: center;
  align-items: center;
  height: 100%;
  width: 100%;
  align-content: center;
  justify-content: center;
  flex-wrap: nowrap;
  flex-direction: column;
}

#popup_body button {
  cursor: pointer;
  width: 80%;
  border-radius: 5px;
  background-color: var(--ui-highlight);
  border: none;
  outline: none;
  box-shadow: none;
  text-align: center;
  align-self: center;
  padding: 0.3em;
  color: var(--ui-text-color);
}

.blocking {
  pointer-events: all !important;
}

.blocking > div {
  box-shadow: 0px 0px 100em 100em rgba(0, 0, 0, 0.4) !important;
}

#export_preview {
  padding: 1em;
  font-size: xx-large;
  display: flex;
  text-align: center;
  align-content: center;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: column;
  overflow: hidden;
}

#export_preview svg {
  width: 100%;
  height: 100%;
}

#export_svg {
  color: var(--ui-text-color);
  background-color: var(--ui-highlight);
  padding: 1em;
  width: 60%;
  border-radius: 10px;
  text-decoration: none;

}

.opacity_sway {
  animation-name: opacity-sway;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

@keyframes opacity-sway {
  0% {
    opacity: 100%;
  }
  50% {
    opacity: 30%;
  }
  100% {
    opacity: 100%;
  }
}

#popup_import {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
}

#popup_import h2 {
  margin-bottom: 0;
}

#popup_import > div {
  width: 100%;
}

.import_list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  width: 100%;
  gap: 1em;
}

.import_list > * {
  width: 100%;
  height: 100%;
  min-height: 8em;
  background-color: var(--ui-highlight-subtle);
  border-radius: 10px;
}

.selected_import {
  background-color: var(--ui-highlight);
}

#import_done {
  display: grid;
  grid-template-areas: ". import . done";
  grid-template-columns: 6fr 1fr 0.1fr 1fr;
}

#import_done > button:nth-child(1) {
  grid-area: import;
}

#import_done > button:nth-child(2) {
  grid-area: done;
}


.bauble_box .bauble_label {
  background: var(--ui-ok);  background-position: 62px 5px;
  background-repeat: no-repeat;
  background-size: auto 5px;
  border: 0;
  border-radius: 50px;
  box-shadow: inset 0 10px 20px rgba(0,0,0,.4), 0 -1px 0px rgba(0,0,0,.2), inset 0 -1px 0px #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 0;
  height: 40px;
  position: relative;
  -webkit-transition: all 500ms ease;
  transition: all 500ms ease;
  width: 90px;
}

.bauble_box .bauble_label:before {
  background-color: rgba(255,255,255,.2);
  background-position: 0 0;
  background-repeat: repeat;
  background-size: 30% auto;
  border-radius: 50%;
  box-shadow: inset 0 -5px 25px var(--ui-ok-detail), 0 10px 20px rgba(0,0,0,.4);
  content: '';
  display: block;
  height: 30px;
  left: 5px;
  position: absolute;
  top: 6px;
  -webkit-transition: all 500ms ease;
  transition: all 500ms ease;
  width: 30px;
  z-index: 2;
}

.bauble_box input.bauble_input {
  opacity: 0;
  z-index: 0;
}

/* Checked */
.bauble_box input.bauble_input:checked + .bauble_label {
  background-color: var(--ui-detail);
}

.bauble_box input.bauble_input:checked + .bauble_label:before {
  background-position: 150% 0;
  box-shadow: inset 0 -5px 25px var(--ui-detail-detail), 0 10px 20px rgba(0,0,0,.4);
  left: calc( 100% - 35px );
}

.bauble_explain{
  display:flex;
  gap: 2em;
}

.full-popup{
  font-size: 5em;
}

.split_choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  justify-content: center;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.split_choice button{
  height: 100%;
  font-size:xx-large;
}

.split_choice button:hover{
  opacity: 0.9;
  box-shadow: var(--ui-text-color) 0px 0px 0px 10px !important;
}

.split_choice button:nth-child(1) {
  background-color: var(--ui-ok) !important;
  color:black !important;
}

.split_choice button:nth-child(2) {
  background-color: var(--ui-danger) !important;
  color:black !important;
}

#export_menu h4{
  margin-bottom:0px;
}

#file{
  grid-area:import;
  border-radius: 5px;
  font-size:0px;
}

#file::file-selector-button{
  background: var(--ui-highlight);
  color:var(--ui-text-color);
  border:none;
  height: 100%;
  border-radius: 5px;
  font-size:medium;
  cursor:pointer
}