* {
    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);
}

/* 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;
    padding: 15px 30px;
    background: rgb(34, 68, 126);
    color: white;
    border-bottom: 2px solid rgba(0,0,0);
    border-radius: 0px 0px 6px 6px;
}

.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;
}

/* FORM SECTION */
.form-section {
    width: 50%;
    min-width: 730px;
    /* max-height: calc(100% - 75px); */
    height: 90vh;
    min-height: 700px;
    padding: 20px;
    margin: 15px;
    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;
}

#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 {
    /* min-height: 0px; */
    /* max-height: 300px; */
    margin-bottom: 10px;
    padding-bottom: 10px; 
    overflow: hidden;
    /* border: 1px red solid; */
}

.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(400px);
    border-radius: 8px;
    border: 1px solid var(--outline);
    padding: 9px;
    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);
 }

 /* 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 {
  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{
    box-shadow: 2px 2px 7px 0 var(--hover);
}
.formField input:focus {
    border-color: var(--selected);
  box-shadow: 2px 2px 7px 0 var(--selected);
}

.formField span {
  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 + span{
    color: var(--selected);
  transform: translateY(-23px) scale(0.9);
  transition: 0.3s ease-in-out;
}
.formField input:valid + span {
  transform: translateY(-23px) scale(0.9);
  transition: 0.3s ease-in-out;
}

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

/* 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);
  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;
}


/* 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 {
  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;
}

/* 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;
}



/* RESPONSIVE */
@media (max-width: 768px) {
    .hero {
        display: none;
    }

    .container {
        flex-direction: column;
        width: 100%;
    }

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

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

    .form-section {
        width: 100%;
        overflow: auto;
        margin-bottom: 40px;
        min-width:min-content;
    }

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

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

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