﻿
/* RESET STYLES & HELPER CLASSES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root {
  --level-1: var(--color);
  --level-2: var(--color);
  --level-3: var(--color);
  --level-4: var(--color);
  --level-5: var(--color);
  --level-6: var(--color);
  --level-7: var(--color);
  --white: #ffffff;
}

.chart_container {
    position: relative;
    margin: 30px 0;
    font-size: 0.8em;
}

.chart_container ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.chart_container ol li {
    text-align: center;
}

.modal_overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(255,255,255, 0.7);
    display: none;
}

.modal_body {
    position: relative;
    top: 50%;
    transform: translate(0, -50%);
    max-width: 500px;
    padding: 30px;
    border: 2px solid var(--color);
    background: #fff;
    text-align: left;
    display: inline-block;
}

.modal_body h4 {
    margin-top: 0;
    font-weight: 700;
}

.close_btn {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 3.5em;
    line-height: 0.5em;
    color: var(--color);
    cursor: pointer;
    transition: linear color 0.3s;
    -webkit-transition: linear color 0.3s;
    -moz-transition: linear color 0.3s;
    -o-transition: linear color 0.3s;
}

.close_btn:hover {
    color: var(--color-dark);
}

.rectangle {
  position: relative;
  padding: 10px;
  text-align: center;
  display: block;
  cursor: pointer;
  color: #fff;
  transition: linear background 0.3s;
  -webkit-transition: linear background 0.3s;
  -moz-transition: linear background 0.3s;
  -o-transition: linear background 0.3s;
}

.rectangle:hover {
    background: var(--color-dark) !important;
}

.rectangle.inactive {
    cursor: default;
}

/* LEVEL-1 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-1-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-column-gap: 40px;
}


.level-1-wrapper li:first-child {
   grid-column-start: 2;
}

.level-1 {
  margin-bottom: 40px;
  background: var(--level-1);
}

.level-1-wrapper li:last-child .level-1:before {
    top: 50%;
    left: -40px;
    width: 40px;
    height: 2px;
    transform: none;
    background: repeating-linear-gradient(90deg, #fff, #fff 10px, #cccccc 10px, #cccccc 20px);
}

.level-1:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100px;
  background: var(--grey);
}


/* LEVEL-2 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-2-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-column-gap: 40px;
}

.level-2-wrapper li {
  position: relative;
}

.level-2 {
  margin: 0 auto 40px;
  background: var(--level-2);
}

.level-2-wrapper li:first-child .level-2:before {
    top: -40px;
    left: 80%;
    transform: none;
    width: 2px;
    height: 40px;
}

.level-2:before {
    content: "";
    position: absolute;
    top: 50%;
    left: -20px;
    transform: translate(0, -50%);
    width: 20px;
    height: 2px;
    background: var(--grey);
}

/* LEVEL-3 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-3-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-column-gap: 10px;
}

.level-3-wrapper:before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grey);
}

.level-3 {
  margin-bottom: 20px;
  background: var(--level-3);
}

.level-3:before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translate(-50%, 0);
  width: 2px;
  height: 20px;
  background: var(--grey);
}

/*wire caps*/
 .level-3-wrapper li:first-child .level-3:after {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: calc(50% - 1px);
  height: 2px;
  background: var(--white);
}

 .level-3-wrapper li:last-child .level-3:after {
  content: "";
  position: absolute;
  top: -20px;
  right: 0;
  width: calc(50% - 1px);
  height: 2px;
  background: var(--white);
}

/* LEVEL-4 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-4-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-column-gap: 10px;
  margin-left: 30px !important;
}

.level-4-wrapper:before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 2px;
  height: calc(100% + 20px);
  background: var(--grey);
}

.level-4-wrapper li + li {
  margin-top: 20px;
}

.level-4 {
  font-weight: normal;
  background: var(--level-4);
}

.level-4:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-100%, -50%);
  width: 20px;
  height: 2px;
  background: var(--grey);
}

/*wire caps*/
 .level-4-wrapper li:last-child .level-4:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -20px;
  width: 2px;
  height: calc(50% - 1px);
  background: var(--white);
}

/* LEVEL-5 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-5-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-column-gap: 40px;
}

.level-5-wrapper li:first-child {
   grid-column-start: 2;
}

.level-5 {
  margin: 0 auto 40px;
  background: var(--level-5);
}

.level-5:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 0);
  width: 2px;
  height: 20px;
  background: var(--grey);
}

/* LEVEL-6 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-6-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-column-gap: 10px;
}

.level-6-wrapper:before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grey);
}

.level-6 {
  margin-bottom: 20px;
  background: var(--level-6);
}

.level-6:before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translate(-50%, 0);
  width: 2px;
  height: 20px;
  background: var(--grey);
}

/*wire caps*/
 .level-6-wrapper li:first-child .level-6:after {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: calc(50% - 1px);
  height: 2px;
  background: var(--white);
}

 .level-6-wrapper li:last-child .level-6:after {
  content: "";
  position: absolute;
  top: -20px;
  right: 0;
  width: calc(50% - 1px);
  height: 2px;
  background: var(--white);
}

/* LEVEL-7 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-7-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-column-gap: 10px;
  margin-left: 30px !important;
}

.level-7-wrapper:before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 2px;
  height: calc(100% + 20px);
  background: var(--grey);
}

.level-7-wrapper li + li {
  margin-top: 20px;
}

.level-7 {
  font-weight: normal;
  background: var(--level-7);
}

.level-7:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-100%, -50%);
  width: 20px;
  height: 2px;
  background: var(--grey);
}

/*wire caps*/
 .level-7-wrapper li:last-child .level-7:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -20px;
  width: 2px;
  height: calc(50% - 1px);
  background: var(--white);
}

/* MQ STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media screen and (max-width : 1199px) {
    .chart_container {
        font-size: 0.6em;
    }
}

@media screen and (max-width: 767px) {
    .chart_container {
        margin: 30px 0 60px;
        font-size: 1em;
    }

    .chart_container:before {
        content: "";
        position: absolute;
        top: 0;
        left: 10px;
        width: 2px;
        height: 100%;
        background: var(--grey);
    }

    .rectangle {
        padding: 10px;
    }

    /*.level-1::before,
    .level-2-wrapper > li:before {
        display: none;
    }*/
  
    .level-1-wrapper,
    .level-2-wrapper,
    .level-3-wrapper,
    .level-4-wrapper,
    .level-5-wrapper,
    .level-6-wrapper,
    .level-7-wrapper {
        display: block;
    }

    .level-1-wrapper li:first-child .level-1:before {
        display: none;
    }

    .level-1-wrapper li:last-child .level-1 {
        margin-left: 40px;
        margin-right: 40px;
    }
    
    .level-2-wrapper li:first-child .level-2 {
        margin-left: 40px;
    }

    .level-2-wrapper li:first-child .level-2:before {
        left: auto;
        right: 10px;
        height: 120px;
        top: -120px;
    }

    .level-2-wrapper li:last-child .level-2 {
        margin-left: 40px;
    }

    .level-2-wrapper li:last-child .level-2:before {
        left: -30px;
        width: 30px;
    }

    .level-3-wrapper:before {
        display: none;
    }

    .level-3-wrapper li .level-3 {
        margin-left: 40px;
    }

    .level-3-wrapper li .level-3:before {
        top: 50%;
        left: -30px;
        width: 30px;
        height: 2px;
        transform: translate(0, -50%);
    }

    .level-4-wrapper {
        margin-left: 70px !important;
    }

    .level-4-wrapper .level-4 {
        margin-bottom: 20px;
    }

    .level-5:before {
        display: none;
    }

    .level-6-wrapper:before {
        display: none;
    }

    .level-6-wrapper li .level-6 {
        margin-left: 40px;
    }

    .level-6-wrapper li .level-6:before {
        top: 50%;
        left: -30px;
        width: 30px;
        height: 2px;
        transform: translate(0, -50%);
    }

    .level-7-wrapper {
        margin-left: 70px !important;
    }

    .level-7-wrapper .level-7 {
        margin-bottom: 20px;
    }

    /*.level-2-wrapper {
        width: 90%;
        margin-left: 10%;
    }*/

    /*.level-2-wrapper:before {
        left: -20px;
        width: 2px;
        height: calc(100% + 40px);
    }*/

    /*.level-2-wrapper > li:not(:first-child) {
        margin-top: 50px;
    }*/
}
