:root {
  --screen-width: calc(32cm/100vw)%; /* screen width  */
  --screen-height: calc(18cm/100vh)%; /* screen height */
  /*  The result is an integer without a unit! */
}

p.as4-ex-p {
    margin: 0;
}

/*slide*/

.as4-ex-slide {
    border-radius: 25px;
    background-color: white;
    cursor: var(--cursor);
}

.as4-ex-slide.as4-ex-static:hover {
    outline: blue calc(4px/var(--slide-scale)) solid;
}

/*maximalisation*/
.as4-ex-maximal-greyout:has(.as4-ex-maximal.as4-ex-active) {
    background-color: rgb(128, 128, 128, 0.5);
}

.as4-ex-maximal-greyout {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
}

.as4-ex-maximal.as4-ex-active{
    pointer-events: all;
    background-color: whitesmoke;
    border-radius: 10px;
    box-shadow: 0px 0px 5px black;
}

.as4-ex-maximal {
    position: fixed;
    left: 2vw;
    top: 2vh;
    width: 96vw;
    height: 96vh;
    pointer-events: none;
    z-index: 1000;
}

.as4-ex-maximal.as4-ex-active .as4-ex-maximal-exit{
    opacity: 1;
    transition: unset;
}

.as4-ex-maximal-exit {
    position: absolute;
    width: max(3vw, 3vh);
    height: max(3vw, 3vh);
    top: 1vh;
    right: 1vw;
    opacity: 0;
    transition: unset;
    text-align: center;
    cursor: pointer;
}

/*Legend:*/
ul.as4-ex-legend-list {
    position: absolute;
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-flow: wrap;
    justify-content: space-around;
    flex-direction: column;
    align-content: center;
    list-style-position: inside;
}

ul.as4-ex-legend-list.as4-ex-inline {
    padding-inline-start: 0cm;
    align-content: center;
    flex-direction: row;
    width: 100%;
}

li.as4-ex-legend-item {
    cursor: pointer;
    z-index: 10;
}

li.as4-ex-legend-item:hover{
    margin-left: -0.1em;
    margin-top: -0.2em;
}

li.as4-ex-legend-item::marker {
    content: "\25A0";
    font-size: 1.2em;
}

li.as4-ex-legend-item:hover::marker {
    font-size: 1.4em;
}

li.as4-ex-legend-item.as4-ex-highlight {
    outline-width: 0.1cm;
}

li.as4-ex-legend-item.as4-ex-hover > span {
    outline-width: 0.1cm;
}

/*directions*/
.as4-ex-vertical-category {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    z-index: 10;
}

.as4-ex-horizontal-category {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    z-index: 10;
}

/*Dropdown Menu*/
.as4-ex-chart:hover > .as4-ex-dropdown {
    opacity: 1;
}

.as4-ex-dropdown {
    opacity: 0;
    right: 0.2cm;
    transform-origin: top right;
    box-sizing: content-box;
}

.as4-ex-dropdown > .as4-ex-textbox {
    opacity: 0.7;
    position: relative;
    animation: cycleZIndex 3s alternate infinite;
    color: rgb(155, 155, 155);
    outline: 1px solid lightgrey;
    background-color: #dddddd;
    border-radius: 10px;
    cursor: default;
}

.as4-ex-dropdown > .as4-ex-textbox > .as4-ex-p{
    padding-top: 0.0325cm;
    transform: rotate(90deg);
    transition: transform .5s;
    transform-origin: center;
}

@keyframes cycleZIndex {
    0% {z-index: 0;}
    100% {z-index: 20;}
    
}

.as4-ex-dropdown.as4-ex-hover {
    padding-left: 25px;
    padding-bottom: 25px;
}

.as4-ex-dropdown.as4-ex-hover > .as4-ex-textbox {
    color: rgb(99, 99, 99);
    outline: grey solid;
    background-color: lightgrey;
}

.as4-ex-dropdown.as4-ex-hover > .as4-ex-textbox > .as4-ex-p{
    transform: rotate(0deg);
    transition: transform .5s;
    transform-origin: center;
}

.as4-ex-dropdown > .as4-ex-textbox {
    font-size: 0.8cm;
    line-height: 0.8cm;
}

.as4-ex-dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 100px;
  right: 0;
  z-index: 25;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

.as4-ex-dropdown.as4-ex-hover .as4-ex-dropdown-content {
  display: block;
}

.as4-ex-chart:hover {
    outline: 1px solid lightgray;
    border-radius: 9px;
}

/*Dropdown buttons*/

.as4-ex-reset, .as4-ex-max-button, .as4-ex-remover-toggle {
    cursor: pointer;
    outline: grey 1px solid;
    background-color: #dddddd;
    font-family:  'Roboto', sans-serif;
    padding: 1px 2px;
}

.as4-ex-reset:hover, .as4-ex-max-button:hover, .as4-ex-remover-toggle:hover{
    color: grey;
    background-color: rgb(240, 240, 240);
}

.as4-ex-reset:active, .as4-ex-max-button:active, .as4-ex-remover-toggle:active {
    transform: scale(0.9);
}


/*Reset button*/

.as4-ex-reset > .as4-ex-p::before {
    content: "\27F3"
}

/*maximalize button*/

.as4-ex-max-button .as4-ex-p::before {
    content: "\1F50D";
}

/*remover toggle*/

.as4-ex-remover-toggle .as4-ex-p::before {
    content: var(--toggler_symbol);
}

/*Repr-Shape:*/
.as4-ex-repr-shape {
    z-index: 10;
}

.as4-ex-repr-shape:not(:has(.as4-ex-repr-data-point)){
    cursor: pointer;
}

.as4-ex-repr-shape:hover:not(:has(.as4-ex-repr-data-point)){
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

.as4-ex-repr-shape.as4-ex-highlight {
    outline-style: dashed;
    outline-color: rgb(var(--outline_color));
    outline-width: 0.05cm;
    z-index: 10;
}

.as4-ex-repr-shape.as4-ex-hover {
    outline-width: 0.1cm;
}

/*Tooltip*/
.as4-ex-tooltip {
    transform: translateX(-50%) translateY(calc(-100% - 5px));
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    pointer-events: none;
    padding: 2px 6px;
    opacity: 0;
}

.as4-ex-reset:hover .as4-ex-tooltip {
    transition-delay: .5s;
    opacity: 1;
}

.as4-ex-repr-shape:not(:has(.as4-ex-repr-data-point)):hover > .as4-ex-tooltip {
    opacity: 1;
}

.as4-ex-repr-data-point:hover > .as4-ex-tooltip, .as4-ex-repr-shape:has(.as4-ex-data-label:hover) > .as4-ex-repr-data-point > .as4-ex-tooltip{
    opacity: 1;
}

.as4-ex-tooltip, .as4-ex-tooltip .as4-ex-p{
    width: max-content;
    overflow-wrap: break-word;
    text-wrap: wrap;
    max-width: 200px;
    font-family: Nunito Sans, sans-serif;
    font-size: 8pt;
}

/*clocks*/

.as4-ex-clock-label {
    transform: translateX(-50%) translateY(50%);
}

/*repr-line*/

line.as4-ex-repr-line{
    stroke-width: 3px;
}

div.as4-ex-repr-line.as4-ex-highlight > svg > line.as4-ex-repr-line{
    z-index: 5;
    stroke-width: 4px;
}

div.as4-ex-repr-line.as4-ex-hover > svg > line.as4-ex-repr-line{
    z-index: 5;
    stroke-width: 4px;
}

/*Data-label:*/
div.as4-ex-data-label{
    display: flex;
    place-content: center;
    flex-wrap: wrap;
    z-index: 101;
    cursor: pointer;
}    

/*Data-point*/
.as4-ex-repr-data-point {
    position: absolute;
    border-radius: 50%; 
    cursor: pointer;
    opacity: 0;
    z-index: 7;
}

div.as4-ex-repr-data-point.as4-ex-highlight{
    outline: rgb(var(--outline_color)) 0.1cm double;
    opacity: 1;
}

.as4-ex-repr-data-point.as4-ex-hover{
    opacity: 1;
}

/*Axis Label:*/
td.as4-ex-axis-label-item{
    cursor: pointer;
}

.as4-ex-axis-labels {
    z-index: 10;
}

table:has(.as4-ex-axis-label-item) {
    z-index: 10;
}

td.as4-ex-axis-label-item.as4-ex-highlight{
    outline-width: 0.1cm;
    z-index: 10;
}

td.as4-ex-axis-label-item.as4-ex-hover{
    outline-width: 0.1cm;
    z-index: 10;
}

/*DataTable*/

.as4-ex-table {
    z-index: 0;
}

/*Hidden*/
:not(.as4-ex-vertical-category) > .as4-ex-repr-shape.as4-ex-hidden {
    animation: reduce_width 1.5s forwards;
}
:not(.as4-ex-vertical-category) > .as4-ex-repr-shape.as4-ex-hidden > * {
    animation: reduce_children_width 1.5s forwards;
}
:not(.as4-ex-vertical-category) > .as4-ex-repr-shape.as4-ex-revealed {
    animation: increase_width 1.5s;
}
:not(.as4-ex-vertical-category) > .as4-ex-repr-shape.as4-ex-revealed > * {
    animation: increase_children_width 1.5s;
}

.as4-ex-vertical-category > .as4-ex-repr-shape.as4-ex-hidden {
    animation: reduce_height 1.5s forwards;
}
.as4-ex-vertical-category > .as4-ex-repr-shape.as4-ex-hidden > * {
    animation: reduce_children_height 1.5s forwards;
}
.as4-ex-vertical-category > .as4-ex-repr-shape.as4-ex-revealed {
    animation: increase_height 1.5s;
}
.as4-ex-vertical-category > .as4-ex-repr-shape.as4-ex-revealed > * {
    animation: increase_children_height 1.5s;
}

@keyframes reduce_width {
    0% {}
    100% {
        width: 0; 
        visibility: hidden;
    }
}

@keyframes reduce_children_width {
    0% {}
    100% {
        transform: scaleX(0);
    }
}

@keyframes increase_width {
    0% {
        width: 0; 
        visibility: hidden;
    }
    100% {}
}

@keyframes increase_children_width {
    0% {
        transform: scaleX(0);
    }
    100% {}
}

@keyframes reduce_height {
    0% {}
    100% {
        height: 0; 
        visibility: hidden;
    }
}

@keyframes reduce_children_height {
    0% {}
    100% {
        transform: scaleY(0);
    }
}

@keyframes increase_height {
    0% {
        height: 0; 
        visibility: hidden;
    }
    100% {}
}

@keyframes increase_children_height {
    0% {
        transform: scaleY(0);
    }
    100% {}
}
/*Veil:*/

.as4-ex-slide *:not(.as4-ex-veiled) {
    transition: opacity 0.2s ease-in;
}

.as4-ex-veiled {
    opacity: 0.35;
    transition: opacity 0.2s ease-out;
}

/*Whitespace Clickthrough*/

.as4-ex-table {
    pointer-events: none;
}
.as4-ex-table > * {
    pointer-events: var(--plotarea_pointer_events);
}

.as4-ex-plotarea {
    pointer-events: none;
}
.as4-ex-plotarea > * {
    pointer-events: var(--plotarea_pointer_events);
}