:root {
    --bg-color: #ddd;
    --color: #000;
    --color-hover: #000;
    --selected-color: #fff;
    --selected-color-hover: #f0f0f0;
    --dimed-color: #0003;
    --dimed-bg-color: #fff3;
	--accent-color: #04AA6D;
    --accent-color-hover: #06774e;
    --accent-info: rgb(0, 151, 252);
	--accent-warning: #d74426;
	--accent-warning-hover: #8f230e;
    --accent-error :  #ff2a00;
    --border-disabled: 1px solid #999999;
    --background-disabled: #cccccc;
    --color-disabled: #666666;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #555;
        --color: #aaa;
        --color-hover: #aaa;
        --selected-color: #fff;
        --selected-color-hover: #ebe4e4;
        --dimed-color: #FFF3;
        --dimed-bg-color: #0003;
        --accent-color: #152;
        --accent-color-hover: rgb(8, 88, 26);
        --accent-info: rgb(0, 102, 170);
        --accent-warning: #721;
        --accent-warning-hover: rgb(94, 19, 4);
        --accent-error :  #c42100;
        --border-disabled: 1px solid #999999;
        --background-disabled: #cccccc;
        --color-disabled: #666666;
    }
}

@media (prefers-color-scheme: light) {

}

body {
    background-color: var(--bg-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: lighter;
    height: 100vh;
    margin: 0;
    color: var(--color);
}

.main {
    display: flex;
    height: calc(100% - 4rem);
}

/* ============================================================== */
/* ================ HEADER & USER MANAGEMENT  =================== */
/* ============================================================== */

header {
    flex-grow: 1;
    border-bottom: var(--dimed-color) solid 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 2rem;
}

header h1,
header hgroup,
.title {
    font-size: 1rem;
}

header * {
    margin: 0 1rem;
}

hgroup {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

span.highlight {
    font-weight: bold;
}


.title,
.logout {
    margin: 0 1rem;
    text-decoration: none;
    color: var(--color);
    font-weight: bold;
}

.logout {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    background-color: var(--accent-warning);
    text-align: center;
    padding: 0 1rem;
    font-weight: bold;
    margin-right: 0;
}

.logout > p {
    display: inline-block;
    padding: 0;
    margin: 0;
    width: 0;
    overflow: hidden;
    text-wrap: nowrap;
    font-weight: normal;
    background-color: var(--accent-warning);
    color: var(--selected-color);
    opacity: 0;
    transition: 0.5s ease-in;
}

.logout:hover {
    color: var(--selected-color);
}

.logout:hover > p {
    width: 6rem;
    opacity: 100;
    transition: width 0.5s ease-out;
}

a.disabled {
    pointer-events: none;
    
    border: none;
    background-color: none;
    color: var(--color-disabled);
}

/* ============================================================== */
/* ====================  SECTION/MAIN AREA  ===================== */
/* ============================================================== */

section {
    flex: 2 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; */
    height: auto;
    overflow: scroll;
    min-width: 25rem;
    position: relative;
    justify-content: space-between;
}

/* ============================================================== */
/* ============= ASIDE JOB NAVIGATION & ACTIONS  ================ */
/* ============================================================== */

aside {
    border-right: var(--dimed-color) solid 1px;
    flex: 2 1 auto;
    position: relative;
    width: auto;
    max-width: 20rem;
    display: block;
}

aside .submit {
    position: relative;
    padding: 1rem;
    width: auto;
    align-items: center;
}

aside .submit > a {
    position: relative;
    display: block;
    width: 10rem;
    text-align: center;
    padding: 0.7rem;
    background-color: var(--accent-color);
    color: var(--selected-color);
    text-decoration: none;
    border-radius: 0.5rem;
    box-shadow: 0 0 0.5rem 0px var(--dimed-color);
}

aside .submit.disabled > a {
    pointer-events: none;

    border: var(--border-disabled);
    background-color: var(--background-disabled);
    color: var(--color-disabled);
}

aside .submit a::before {
    content: '+';
    position: absolute;
    right: 0.5rem;
    top: 0.75rem;
    font-size: 2rem;
    font-weight: bold;
    line-height: 0;
    color: var(--dimed-color);
}

aside .submit a:hover::before {
    color: var(--selected-color);
}

aside > * {
    display: flex;
    flex-direction: column;
}

aside > .job_list {
    display: block;
    max-height: calc(100% - 4rem - 4rem);
    overflow-y: scroll;
    border-top: var(--dimed-color) solid 1px;
}

aside ul {
    margin: 0;
}

aside p {
    margin: 0;
    padding: 0.25rem 0 0.25rem 1rem;
}

aside input {
    visibility: hidden;
    position: absolute;
    top: -3rem;
}

aside ul {
    padding-left: 0rem;
    width: 100%;
}

aside ul > li {
    list-style-type: none;
}

aside input + label {
    display: flex;
    padding: 0.25rem 0 0.25rem 1rem;
}

aside input[type="radio"] + label {
    width: calc(100% - 1rem);
}

aside input[type="radio"]:checked + label {
    background-color: var(--accent-color);
    color: var(--selected-color);
}

aside input[type="radio"]:checked + label.failed {
    background-color: var(--accent-error);
    color: var(--selected-color);
}

aside input[type="checkbox"] + label {
    padding-left: 0.5rem;
    background-color: var(--dimed-bg-color);
}

aside input[type="checkbox"] + label {
    border-top: var(--dimed-color) solid 1px;
}

aside input:hover + label {
    background-color: var(--dimed-color);
    cursor: pointer;
}

aside input[type="checkbox"] + label {
    display: flex;
}

aside input[type="checkbox"] + label::before {
    padding-right: 1.5rem;
    width: 1rem;
    content: "+ ";
}

aside input[type="checkbox"]:checked + label::before {
    width: 1rem;
    content: "- ";
}

aside input + label > .counter {
    content: "5";
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    aspect-ratio: 1/1;
    right: 1rem;
    line-height: 1.25rem;
    text-align: center;
    margin-right: 1rem;
    margin-left: auto;
}

aside input[type="checkbox"].urgent + label > .counter {
    background-color: var(--accent-warning);
    color: var(--selected-color);
}

aside input[type="checkbox"] + label + ul,
aside input[type="checkbox"] + label + p {
    overflow: hidden;
    opacity: 100%;
    transition: opacity 0.5s linear;
}

aside input[type="checkbox"]:not(:checked) + label + ul,
aside input[type="checkbox"]:not(:checked) + label + p {
    display: block;
    user-select: none;
    max-height: 0;
    opacity: 0%;
    transition: opacity 0.5s linear;
}

aside input[type="checkbox"]:not(:checked) + label + p {
    padding: 0;
}

aside input[type="checkbox"]:checked + label + ul li {
    height: 2rem;
    visibility: visible;
}

aside input[type="checkbox"]:checked + label + ul li > label {
    height: 1.5rem;
}

aside input[type="checkbox"] + label + ul li {
    visibility: hidden;
}

aside input[type="checkbox"]:disabled,
aside input[type="checkbox"]:disabled + label,
aside input[type="checkbox"]:disabled + label + p,
aside input[type="checkbox"]:disabled + label +ul li,
aside input[type="checkbox"]:disabled + label +ul li > label {
  background-color: none;
  color: var(--color-disabled);
}

/* ============================================================== */
/* =======================  ARTICLE AREA  ======================= */
/* ============================================================== */

article {
    width: 60rem;
    max-width: 70rem;
    min-width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

article.job-card {
    padding: 0;
    top: 1rem;
    left: 2rem;
    background-color: var(--bg-color);
    width: 100%;
    max-width: none;
    /* box-shadow: 0px 0.5rem 1.5rem 0px var(--dimed-color); */
    /* border-radius: 0.5rem; */
    overflow: hidden;
    z-index: 10;
}

article.job-card > div {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
}

article.job-card > h1 {
    padding: 0.5rem 2rem;
    margin: 0;
    width: calc(100% - 4rem);
    font-size: 1rem;
    font-weight: normal;
    text-align: center;
    color: var(--selected-color);
    background-color: var(--accent-color);
}

article.job-card > h1.failed {
    color: var(--selected-color);
    background-color: var(--accent-error);
}

article.job-card > div > ul {     
    padding: 0;
    display: inline-block;
    /* width: 20rem; */
}

article.job-card > div > ul > li {
    display: flex;
}

article.job-card h2,
article.job-card p {
    font-size: 1rem;
    margin: 0;
    padding: 0;
}

article.job-card h2,
article.job-card h1 > div {
    width: 7rem;
    font-size: 0.85rem;
    text-align: right;
    padding-right: 1rem;
    font-weight: lighter;
    color: var(--color);
}

article.selection {
    margin: auto;
}

/* ============================================================== */
/* =======================  FOOTER AREA  ======================== */
/* ============================================================== */

footer {
    width: 100%;
    height: 1.5rem;
    border-top: var(--dimed-color) solid 1px;
    color: var(--color);
    text-align: center;
}

/* ============================================================== */
/* ====================  CONNECTION FORM  ======================= */
/* ============================================================== */

.login {
    width: auto;
    min-width: auto;
    background-color: var(--bg-color);
    box-shadow: 0px 0.5rem 1.5rem 0px var(--dimed-color);
    overflow: hidden;
    border-radius: 0.5rem;
}

.login h1 {
    width: 100%;
    font-size: 1rem;
    font-weight: normal;
    text-align: center;
    padding: 0.5rem;
    margin: 0;
    background-color: var(--dimed-bg-color);
}

.login form {
    padding: 1rem;
}

.login label {
    display: inline-block;
    width: 7rem;
}

.login input{
    display: inline-block;
    width: 15rem;
}

.login input[type=submit] {
    width: 100%;
    display: block;
    margin: auto;
}

/* ============================================================== */
/* =================== NOTIFICATION CENTER  ===================== */
/* ============================================================== */

@keyframes slideRight {
    0% { right: -20rem; }
    100% { right: 3rem; }
}

.notif-center {
    position: absolute;
    bottom: 3rem;
    right: 3rem;
    color: var(--color);
    animation: slideRight 0.5s ease-out;
}

.notif-center li {
    list-style: none;
}

.notif-center input {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
}

.notification {
    position: relative;
    margin-top: 1rem;
    width: 25rem;
    height: 12rem;
    background-color: var(--bg-color);
    box-shadow: 0px 0.5rem 1.5rem 0px var(--dimed-color);
    overflow: hidden;
    border-radius: 0.5rem;
}

.notif-center input:checked + .notification {
    visibility: none;
    opacity: 0;
    height: 0;
    margin: 0;
    transition: height 0.3s ease-in-out, margin 0.3s ease-in-out;
}

.notif-center input:checked + .notification > * {
    opacity: 0;
}

.notification label {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    width: 3rem;
    height: 1rem;
    line-height: 1rem;
    border: var(--dimed-color) solid 1px;
    background-color: var(--bg-color);
}

.notification label:hover {
    background-color: var(--accent-color);
    color: var(--selected-color);
    cursor: pointer;
}

.notification * {
    font-size: 1rem;
    width: calc(100% - 1rem);
    padding: 0.5rem;
    margin: 0;
    text-align: center;
}

.notification h1 {
    background-color: var(--dimed-bg-color);
}

.notification.info h1 {
    background-color: var(--accent-info);
    color: var(--selected-color);
}

.notification.success h1{
    background-color: var(--accent-color);
    color: var(--selected-color);
}

.notification.warning h1 {
    background-color: var(--accent-warning);
    color: var(--selected-color);
}

.notification.error h1 {
    background-color: var(--accent-error);
    color: var(--selected-color);
}

/* ============================================================== */
/* ====================== FILE SELECTOR  ======================== */
/* ============================================================== */

.choices {
    margin-top: 1rem;
    display: flex;
    flex: 2 1 auto;
    gap: 1em;
    justify-content: center;
    position: relative;
    width: 100%;
}

.choices > a,
button,
input[type=button],
input[type=submit],
input[type=reset] {
    background-color: var(--accent-color);
    border: none;
    color: var(--selected-color);
    font-size: 1rem;
    padding: 1rem 2rem;
    max-width: 20rem;
    text-decoration: none;
    font-style: normal;
    text-align: center;
    cursor: pointer;
    border-radius: 0.5rem;
    flex: 1 1 auto;
    box-shadow: 0 0 0.5rem 0px var(--dimed-color);
    transition: 0.1s;
}

div.file_selector_title {
    height: 6rem;
}

div.file_selector_title > p{
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent-color);
}

button:disabled,
button[disabled] {
  border: var(--border-disabled);
  background-color: var(--background-disabled);
  color: var(--color-disabled);
}

.choices > a:active,
button:active:not(:disabled),
button:active:not([disabled]){
    /* Scaling button to 0.98 to its original size */
    transform: scale(0.98);
    /* Lowering the shadow */
    box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24);
 }

.choices > a:hover,
button:hover:not(:disabled),
button:hover:not([disabled]){
    color: var(--selected-color-hover);
    background-color: var(--accent-color-hover);
    transition: 0.1s;
}

.choices > a.warning,
button.warning:not(:disabled),
button.warning:not([disabled]) {
    background-color: var(--accent-warning);
    color: var(--selected-color);
    transition: 0.1s;
}

button.warning:hover:not(:disabled),
button.warning:hover:not([disabled]) {
    background-color: var(--accent-warning-hover);
    color: var(--selected-color-hover);
    transition: 0.1s;
}

button.light:not(:disabled),
button.light:not([disabled]) {
    background-color: var(--selected-color);
    color: var(--color);
    transition: 0.1s;
}

button.light:hover:not(:disabled),
button.light:hover:not([disabled]) {
    background-color: var(--selected-color-hover);
    color: var(--color-hover);
    transition: 0.1s;
}

section.submit {
    width: 30%;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

video {
    width: 100%;
}

img {
    width: 100%;
}

div.openseadragon {
  aspect-ratio: 37/20;
  height: calc(100vh - 25rem);
  border: dashed 1px grey;
} 

select, input[type=file] {
    height: 2rem;
}

.drop-area {
    padding: auto 0;
    margin: 0;
    text-align: center;
    width: calc(100% - 1rem * 2);
    aspect-ratio: 16/9;
    border: 0.4rem dashed var(--dimed-color);
    position: relative;
    overflow: hidden;
}

.drop-area > div {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: calc(100% - 4rem);
    height: calc(100% - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-area > div > p {
    font-size: 3rem;
    color: var(--dimed-color);
    margin: 0 auto;
}

.draghover {
    background-color: #00ff0022;
}

.file_description {
    display: block;
    position: relative;
    width: 100%;
}

.file_description > div {
    width: 100%;
    background-color: var(--bg-color);
    display: flex;
    gap: 1rem;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.file_description > div.error {
    color: var(--selected-color);
    background-color: var(--accent-error);
}

.file_description button {
    flex: 1 1 auto;
    width: 50%;
    max-width: 20rem;
}

.file_description > div > div {
    margin: 0 auto;
}

.hidden {
    visibility: hidden;
    width: 0;
    height: 0;
    position: absolute;
}

.tab {
    display: flex;
    width: 100%;
    gap: 1rem;
}

.tab p {
    width: 50%;
    margin: 0 0.5rem;
}

.tab + p + p {
    text-align: right;
}

.tab + p {
    text-align: right;
}

.tabtitle {
    text-align: right;
}

/* Animated Loading SVG */
.profile-main-loader{
    position: relative;
    margin: 0 auto;
}

.profile-main-loader .loader {
  position: relative;
  margin: 0px auto;
  width: 200px;
  height:200px;
}
.profile-main-loader .loader:before {
  content: '';
  display: block;
  padding-top: 100%;
}

.circular-loader {
  -webkit-animation: rotate 2s linear infinite;
          animation: rotate 2s linear infinite;
  height: 100%;
  -webkit-transform-origin: center center;
      -ms-transform-origin: center center;
          transform-origin: center center;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  margin: auto;
}

.circular-loader circle {
    stroke: var(--accent-color);
}

.loader-path {
  stroke-dasharray: 150,200;
  stroke-dashoffset: -10;
  -webkit-animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
          animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
  stroke-linecap: round;
  stroke-width: 0.35em;
}

/* ============================================================== */
/* ================         Messages          =================== */
/* ============================================================== */

div.info_msg {
    background-color: var(--accent-info);
    color: var(--selected-color);
    padding: 0.5rem 3.5rem;
    font-weight:bold;
}

div.success_msg {
    background-color: var(--accent-color);
    color: var(--selected-color);
    padding: 0.5rem 3.5rem;
    font-weight:bold;
}

div.warning_msg {
    background-color: var(--accent-warning);
    color: var(--selected-color);
    padding: 0.5rem 3.5rem;
    font-weight:bold;
}

div.error_msg {
    background-color: var(--accent-error);
    color: var(--selected-color);
    padding: 0.5rem 3.5rem;
    font-weight:bold;
}


@-webkit-keyframes rotate {
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}

@keyframes rotate {
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}

@-webkit-keyframes dash {
  0% {
    stroke-dasharray: 1,200;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 89,200;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 89,200;
    stroke-dashoffset: -124;
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1,200;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 89,200;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 89,200;
    stroke-dashoffset: -124;
  }
}

/* ============================================================== */
/* =====================  VISUAL EFFECTS  ======================= */
/* ============================================================== */

.fade-in {
    opacity: 0.25;
    animation: fadeIn 0.2s ease-in forwards;
  }
  
  @keyframes fadeIn {
    to {
      opacity: 1;
    }
  }