* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* CONTROL VARIABLES */
:root {
    --fadeStart: 40%;
    --fadeEnd: 90%;

    --fadeStartVertical:10%;
    --fadeEndVertical:20%;

    --heroWidth: 100%;
    --heroHeight: 100%;

    --heroPosX: right;
    --heroPosY: center;

    --heroScale: 0.65;   /* 1 = normal, >1 zoom in, <1 zoom out */


    /* Colors */
    --hightlight: rgb(34, 68, 126);
    --outline:#afafaf;

    --background: #f1f1f1;
    --inputBackground: rgba(255,255,255,0.4);
    --primary: #666;
    --hover: #127acf;
    --selected: #127acf;
    --shadow: rgb(0, 0, 0, 0.2);
    

    /* Text Color */
    --text: #6f6f6f;
    --headingText: rgb(0, 50, 120);
    --labelText:rgb(50, 50, 50);
    --text-highlighted: rgb(255,0,0);
    --descriptionFontColor: dimgray;
}

/* BODY */
body {
    /* max-height: 100vh; */
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    overflow-y: hidden;
}

/* HERO CONTAINER */
.hero {
    position: fixed;
    top: 0;
    right: 0;

    width: var(--heroWidth);
    height: var(--heroHeight);

    background:
        linear-gradient(to left,
            rgba(255,255,255,0) var(--fadeStart),
            var(--background) var(--fadeEnd)
        ),
        /* TOP FADE */
        linear-gradient(to bottom,
            var(--background) var(--fadeStartVertical),
            rgba(255,255,255,0) var(--fadeEndVertical)
        ),

        /* BOTTOM FADE */
        linear-gradient(to top,
            var(--background) var(--fadeStartVertical),
            rgba(255,255,255,0) var(--fadeEndVertical)
        ),
        url("Tracker_Background.png");

    background-size: calc(100% * var(--heroScale)) auto;
    background-position: var(--heroPosX) var(--heroPosY);
    background-repeat: no-repeat;

    object-fit: cover;
    z-index: -1;
}

/* HEADER */
header {
    position: sticky;
    display: flex;
    top: 0;
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    padding-left: 30px;
    padding-right: 30px;
    background: rgb(34, 68, 126);
    color: white;
    border-radius: 0px 0px 6px 6px;
    box-shadow:2px 2px 7px 0 rgb(0, 0, 0, 0.5);
    height:6.5lvh;
    max-height: 65px;
    min-height: 50px;
}

.nav-right button {
    margin-right: 10px;
    padding: 8px 15px;
    border: none;
    color: white;
    background: rgb(34, 68, 126);
    cursor: pointer;
    left: 50%;
    bottom: -80px;
    z-index: 1;
}

.nav-right button:hover{
    color : rgb(0,162,229);
}

/* LAYOUT */
.container {
    display: flex;
    z-index: 1;
    overflow-y: hidden;
    width: auto;
}

/* FORM SECTION */
.form-section {
    width: 50%;
    min-width: 700px;
    /* max-height: calc(100% - 75px); */
    height: 90vh;
    min-height: auto;
    margin: 15px;
    margin-right: 7px;
    border-radius: 8px;
    border: 1px solid var(--outline);
    background: var(--inputBackground);
    box-shadow: 2px 2px 7px 0 rgb(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    overflow: hidden;
}

.row-2item{
    display: grid;
    justify-content: space-evenly;
    grid-template-columns: 50% 50%;
    margin-bottom: -10px;
}

.row-3item{
    display: grid;
    justify-content: space-evenly;
    grid-template-columns: 30% 30% 40%;
    margin-bottom: -10px;
}

#form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* FIELDSETS */
fieldset {
    padding: 15px;
    border-radius: 8px;
    background-color: var(--inputBackground);
    backdrop-filter: blur(6px);
}

.form-body-wrapper fieldset {
    margin-bottom: 20px;
}

legend {
    font-weight: bold;
    color: var(--headingText);
}

/* FORM HEADER WRAPPER*/
.form-header-wrapper {
    margin :5px;
    overflow: hidden;
}

.form-header-wrapper .formField {
    position: relative;
    max-height: 100%;
}

/* FORM BODY WRAPPER*/
.form-body-wrapper {
    overflow-y: scroll;
    flex: 1;
    /* min-height: 0px; */
    /* max-height: calc(800px); */
    border-radius: 8px;
    border: 1px solid var(--outline);
    padding: 9px;
    margin: 15px;
    margin-top: 6px;
    scroll-padding-top: 6px;
    scroll-padding-bottom: 6px;

    /* width */
    &::-webkit-scrollbar {
    width: 10px;
    }

    /* Track */
    &::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 6px; 
    margin-top: 1px;
    margin-bottom: 1px;
    }
    
    /* Handle */
    &::-webkit-scrollbar-thumb {
    background: #888; 
    border-radius: 6px; 
    }

    /* Handle on hover */
    &::-webkit-scrollbar-thumb:hover {
        background-color: #127acf;
    }

}




/* INPUT GROUP */
.input-group {
    display: flex;
    align-items: center;
    margin-top: 6px;
    margin-bottom: 6px;
    gap: 10px;
}

/* LABEL */
.input-group label {
    padding-left: 12px;
    color: var(--labelText);
    font-size: 16px;
    font-weight: 600;
    font-style: bold;
    min-width: fit-content;
    cursor: pointer;
}

/* INFO ICON */
/* .info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #555;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 12px;
    cursor: pointer;
} */

 /* DESCRIPTION */
 .description{
    padding-left: 25px;
    padding-bottom: 10px;
    font-size: 12px;
    color: var(--descriptionFontColor);
 }

  .disclaimer{
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 12px;
    color: var(--descriptionFontColor);
    text-align: justify; }

 /* TOOLTIP */
/*.tooltip {
    display: none;
    position: absolute;
    left: 110px;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 5px;
    font-size: 12px;
    border-radius: 5px;
    white-space: normal;
    max-width: 200px;
    justify-content: space-evenly;
}

.info:hover + .tooltip {
    display: inline-block;
} */




/* INPUT */
/* .input-group input {
    flex: 1;
    min-width: 0;
    border-radius: 6px;
    padding: 7px;
    border: 1px solid var(--outline);
    box-shadow: 2px 2px 7px 0 rgb(0, 0, 0, 0.2);
    color: dimgray;
}

.input-group label{
    color: var(--text);
}

.input-group input:hover {
    border-color: var(--hover);
    box-shadow: 2px 2px 7px 0 var(--hover);
}

.input-group input:focus {
    border-color: var(--selected);
    box-shadow: 2px 2px 7px 0 var(--selected);
}

.input-group select {
    flex: 1;
    min-width: 0;
} */

/* INPUT NEW*/
.formField {
  margin: 10px;
  position: relative;
}

.formField input {
    width: 100%;
    padding: 10px 10px;
    margin-top: 6px;
    margin-bottom: 6px;
    outline: none;
    border: 1px solid var(--outline);
    border-radius: 5px;
    background-color: var(--inputBackground);
    color: var(--text);
    font-size: 16px;
    font-weight: 550;
    transition: 0.3s ease-in-out;
    box-shadow: transparent;
    line-height: 20px;
}

.formField input[type="number"][step="any"]::-webkit-outer-spin-button,
.formField input[type="number"][step="any"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.formField input:not(:placeholder-shown):invalid:not(:focus) {  
  animation: justshake 0.3s forwards;
  color: red;
}

@keyframes justshake {
  25% {
    transform: translateX(5px);
  }

  50% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }

  100% {
    transform: translateX-(5px);
  }
}

.formField input:hover:not(:disabled){
    box-shadow: 2px 2px 7px 0 var(--hover);
}
.formField input:focus {
    border-color: var(--selected);
  box-shadow: 2px 2px 7px 0 var(--selected);
  color: var(--text) !important;
}

.formField .inputTitle {
  position: absolute;
  left: 15px;
  top: 19px;
  background-color: white;
  color: var(--labelText);
  font-size: 16px;
  font-weight: 600;
  transition: 0.3s ease-in-out;
  pointer-events: none;
  max-width:fit-content;
}

.formField input:focus + .inputTitle{
    color: var(--selected);
  transform: translateY(-23px) scale(0.9);
  transition: 0.3s ease-in-out;
  color: var(--text);
}

.formField input:valid + .inputTitle {
  transform: translateY(-23px) scale(0.9);
  transition: 0.3s ease-in-out;
  color: var(--text);
}

.formField input:not(:placeholder-shown) + .inputTitle {
  transform: translateY(-23px) scale(0.9);
}

.formField-selection{
  position: absolute;
  left: 0;
  top: 3px;
  color: #555;
  padding-left: 5px;
  font: inherit;
}

.formField .inputSuffix {
    position: absolute;
    text-align: center;
    top: 6px;
    right: -20px;
    width: fit-content;
    padding: 10px 0px 10px;
    outline: none;
    border-radius: 5px;
    background-color: transparent;
    color: transparent;
    font-size: 16px;
    font-weight: 550;
    transition: 0.3s ease-in-out;
    box-shadow: transparent;
    line-height: 20px;
}

.formField input:focus ~ .inputSuffix{
    color: var(--selected);
    transform: translateX(-30px);
    transition: 0.3s ease-in-out;
    color: var(--text);
}

.formField input:valid ~ .inputSuffix {
    color: var(--text);
    transform: translateX(-30px);
    transition: 0.3s ease-in-out;
    color: var(--text);
}

.formField input:not(:placeholder-shown) ~ .inputSuffix {
    color: var(--text);
    transform: translateX(-30px);
    transition: 0.3s ease-in-out;
}
/* CHECKBOX */

.ui-checkbox {
  --primary-color: var(--selected);
  --secondary-color: white;
  --primary-hover-color: var(--hover);
  /* checkbox */
  --checkbox-diameter: 20px;
  --checkbox-border-radius: 5px;
  --checkbox-border-color: var(--outline);
  --checkbox-border-width: 1px;
  --checkbox-border-style: solid;
  /* checkmark */
  --checkmark-size: 1.2;
  margin-left: 12px;
}

.ui-checkbox, 
.ui-checkbox *, 
.ui-checkbox *::before, 
.ui-checkbox *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.ui-checkbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: var(--checkbox-diameter);
  min-width: var(--checkbox-diameter);
  height: var(--checkbox-diameter);
  border-radius: var(--checkbox-border-radius);
  background: var(--secondary-color);
  border: var(--checkbox-border-width) var(--checkbox-border-style) var(--checkbox-border-color);
  -webkit-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}

.ui-checkbox::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-box-shadow: 0 0 0 calc(var(--checkbox-diameter) / 2.5) var(--primary-color);
  box-shadow: 0 0 0 calc(var(--checkbox-diameter) / 2.5) var(--primary-color);
  border-radius: inherit;
  opacity: 0;
  -webkit-transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
  -o-transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
  transition: all 0.5s cubic-bezier(0.12, 0.4, 0.29, 1.46);
}

.ui-checkbox::before {
  top: 40%;
  left: 50%;
  content: "";
  position: absolute;
  width: 4px;
  height: 7px;
  border-right: 2px solid var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
  -webkit-transform: translate(-50%, -50%) rotate(45deg) scale(0);
  -ms-transform: translate(-50%, -50%) rotate(45deg) scale(0);
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  opacity: 0;
  -webkit-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),opacity 0.1s;
  -o-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),opacity 0.1s;
  transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),opacity 0.1s;
}

/* actions */

.ui-checkbox:hover {
  border-color: var(--primary-color);
  box-shadow: 2px 2px 7px 0 var(--hover);

}

.ui-checkbox:checked {
  background: var(--primary-color);
  border-color: transparent;
}

.ui-checkbox:checked::before {
  opacity: 1;
  -webkit-transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
  -ms-transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
  transform: translate(-50%, -50%) rotate(45deg) scale(var(--checkmark-size));
  -webkit-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
  -o-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
  transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
}

.ui-checkbox:active:not(:checked)::after {
  -webkit-transition: none;
  -o-transition: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  transition: none;
  opacity: 1;
}

/* RADIO BUTTON*/
.radio-button {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

    justify-content:space-evenly;
    flex-direction: row;
    width: 100%;
    margin: 10px;
}

.radioHeading{
    padding-left: 12px;
    color: var(--labelText);
    font-size: 16px;
    font-weight: 600;
    font-style: bold;
    min-width: fit-content;
}

.radio-button .description{
    display: flex;
    flex-direction: column;
}

.radio-option {
    --_clr-current: var(--primary);

    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-button label {
    cursor: pointer;
    color: var(--text);
    transition: color 150ms ease-in-out;
    max-width:fit-content;
}

/* styled radio */
.radio-button input[type="radio"] {
    appearance: none;
    outline: 1px solid var(--outline);
    width: 1.25rem;
    height: 1.25rem;
    aspect-ratio: 1;
    padding: 0.25rem;
    background: transparent;
    border: 1px solid var(--current);
    border-radius: 50%;
    display: grid;
    place-content: center;
    cursor: pointer;
    position: relative;
}

.radio-button input[type="radio"]::after {
    content: "";
    position: absolute;
    inset: 0.25rem;
    opacity: 0;
    scale: 0;
    transition:
        opacity 150ms ease-in-out,
        scale 150ms ease-in-out;
    background-color: var(--selected);
    border-radius: inherit;
}

.radio-button input[type="radio"]:focus-visible,
.radio-button input[type="radio"]:hover{
    --_clr-current: var(--hover);
    box-shadow: 2px 2px 7px 0 var(--hover);
}

.radio-button label:hover,
.radio-button input[type="radio"]:focus-visible + label,
.radio-button input[type="radio"]:hover + label {
    --_clr-current: var(--hover);
}

.radio-button input[type="radio"]:focus-visible::after,
.radio-button input[type="radio"]:hover::after {
    opacity: 0.5;
    scale: 1;
    background-color: var(--hover);
}

.radio-button input[type="radio"]:checked + label:not(:hover),
.radio-button input[type="radio"]:checked:not(:hover) {
    --_clr-current: var(--selected);
}

.radio-button input[type="radio"]:checked::after {
    opacity: 1;
    scale: 1;
}
/* DROPDOWN */

#railOptions{
    height:46px;
    padding: 10px 10px;
    margin: 10px 10px 10px 10px;
    font-size:16px;
    font-weight:550;
    color:var(--text);
    background:var(--inputBackground);
    border: 1px solid var(--outline);
    border-radius:5px;
    cursor:pointer;
    outline:none;
    transition:all .3s ease-in-out;
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    box-shadow: transparent;
    line-height: 20px;

    /* Custom Arrow */
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 14px center;
}
    
.railHeading{
    align-self: center;
    padding-left: 25px;
    color: var(--labelText);
    font-size: 16px;
    font-weight: 600;
    font-style: bold;
    min-width: fit-content;
    cursor: pointer;
}
#railOptions:hover{
    box-shadow: 2px 2px 7px 0 var(--hover);
}

#railOptions:focus{
    border-color: var(--selected);
  box-shadow: 2px 2px 7px 0 var(--selected);
}

#railOptions option{
    padding: 12px;
    font-size: 15px;
    color: var(--text);
    background-color: var(--inputBackground);
}

#railOptions option:checked {
    background: var(--selected);
    color: white;
    font-weight: 500;
}


/* SUBMIT */
.submit-btn {
  position: relative;
  margin-left: 25px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 10px 20px;
  border-radius: 7px;
  border: 1px solid rgb(61, 106, 255);
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 2px;
  background: rgb(61, 106, 255);
  color: #fff;
  overflow: hidden;
  box-shadow: transparent;
  -webkit-transition: all 0.2s ease-in;
  -moz-transition: all 0.2s ease-in;
  transition: all 0.2s ease-in;
  cursor: pointer;
}

button:hover:not(:disabled)  {
  background: rgb(61, 106, 255);
  box-shadow: 0 0 30px 5px rgba(0, 142, 236, 0.815);
  -webkit-transition: all 0.2s ease-out;
  -moz-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out;
}

/* button:hover::before {
  -webkit-animation: sh02 0.5s 0s linear;
  -moz-animation: sh02 0.5s 0s linear;
  animation: sh02 0.5s 0s linear;
} */

button::before {
  content: '';
  display: block;
  width: 0px;
  height: 86%;
  position: absolute;
  top: 7%;
  left: 0%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 50px 30px #fff;
  -webkit-transform: skewX(-20deg);
  -moz-transform: skewX(-20deg);
  -ms-transform: skewX(-20deg);
  -o-transform: skewX(-20deg);
  transform: skewX(-20deg);
}

/* @keyframes sh02 {
  from {
    opacity: 0;
    left: 0%;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
    left: 100%;
  }
} */

button:active {
  box-shadow: 0 0 0 0 transparent;
  -webkit-transition: box-shadow 0.2s ease-in;
  -moz-transition: box-shadow 0.2s ease-in;
  transition: box-shadow 0.2s ease-in;
}

button:disabled {
background-color: dimgray;
cursor:not-allowed;
}


/* FOOTER */
footer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    margin-top: auto;
    backdrop-filter: blur(6px);

    border-radius: 6px 6px 0px 0px;
    z-index: 1000;
}

footer[hidden] {
  display: none !important;
}

.download-btn {
    background: #e67e22;
    border: none;
    padding: 8px 15px;
    color: white;
    border-radius: 5px;
}

.guide {
    display: flex;
    width: 100%;
    height: 40%;
    background: var(--inputBackground);
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 10px;
    margin: auto;
}

.img-wrap{
    height:100%;
    width: 100%;
    flex:1;
    overflow: hidden;
}
.img-wrap label{
    height: 100%;
    width: 100%;
}
.img-wrap img{
    height: 100%;
    width:100%;
    object-fit:contain;
    overflow: hidden;
}

/* .guide img{
    display: block;
    width: 75%;
    margin: 0 auto;
    z-index: 2;
    cursor: zoom-in;

    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
} */

.guide input[type=checkbox] {display: none;}
.guide label { display: block; line-height: 0; }
.guide label img {
    
    justify-self: center;
    display: block;
    width: 75%;
    transition: transform 0.25s ease;
    cursor: zoom-in;

    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.guide input[type=checkbox]:checked ~ img {
    transform: scale(2);
    cursor: zoom-out;
}

.canvasDiv {
    width :100%;
    height: 59%;
    background: var(--inputBackground);
    /* border: 1px solid var(--outline); */
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 10px;
}

canvas {
    /* max-height: calc(100% - 75px); */
    width :100%;
    height: 100%;
    background: var(--inputBackground);
    /* border: 1px solid var(--outline); */
    overflow: hidden;
    cursor: grab;
}

canvas:active{
    cursor: grabbing;
}

.canvas-wrapper{
    width: 50%;
    min-width: 700px;
    /* max-height: calc(100% - 75px); */
    height: 90vh;
    margin: 15px;
    margin-left: 8px;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--outline);
    background: var(--inputBackground);
    box-shadow: 2px 2px 7px 0 rgb(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    overflow: hidden;
    justify-content: center;
    align-content: center;
}

.canvas-wrapper fieldset{
    height: 100%;
    justify-content: center;
    align-content: center;
}


/* RESPONSIVE */
@media (max-width: 768px) {
    body{
        max-height: auto;
        overflow-y: scroll;
    }
    

    .hero {
        display: none;
    }

    header{
        margin:0;
        padding: 0;
        width: 100%;
    }

    .logo{
        height: 30px;
        width: 229.136px;
    }

    .container {
        flex-direction: column;
    }

    .form-header-wrapper{
        width: auto;
        height:auto;
        overflow: visible;
    }

    .form-body-wrapper{
        width: auto;
        height: auto;
        overflow: visible;
        border:none;
    }

    .form-section {
        width: auto;
        height: auto;
        overflow:visible;
        margin: 10px;
        margin-bottom: 6px;
        min-width:min-content;
    }

    .radio-button {
        flex-direction: column;
        gap: 10px;
    }

    .row-2item{
    display: flex;
    flex-direction: column;
    width: auto;
}
    .row-3item{
    display: flex;
    flex-direction: column;
    width: 100%;
}

    .col-2item{
        width: auto;
    display: grid;
}


.canvas-wrapper{
    width: auto;
    min-width: min-content;
    margin: 10px;
    margin-top: 6px;
}

}