* {
    box-sizing: border-box;
    touch-action: manipulation;
}

:root {
    --primary: #1f87e9;
    --primaryHover: #14b1ff;
    --primaryBtn: #007bf8;
    --primaryBtnHover: #526a8f;
    --primaryBtnActive: #5e769a;
    --secondary: #486186;
    --progress: #c9d0e0;
    --progressToday: #253144;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(0, rgba(25, 65, 104, 1) 0%, rgba(36, 97, 159, 1) 100%);
}

body {
    line-height: 1.5;
    margin: 0;
    padding: 0;
    font-family: "segoe ui", sans-serif;
    color: #282e34;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
#page {
    display: flex;
    flex-grow: 1;
}

h1,
h2,
h3 {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
input {
    outline: none;
    font-family: inherit;
    font-size: 0.9em;
}
input {
    background: #fff;
    border: 1px solid #c8d1e2;
    border-radius: 7px;
    padding: 11px 12px;
    text-align: left;
    min-width: 220px;
}
input::placeholder {
    color: #96a6b9;
}

.btn,
.btn2 {
    background: var(--primaryBtn);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 30px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    outline: none;
    border: none;
    user-select: none;
    position: relative;
    transition: color 0.2s, background 0.2s;
    font-weight: 500;
    margin-top: 15px;
}
.btn.red {
    background: #e04f4f;
}
.btn.ghost {
    color: var(--primaryBtn);
    background: none;
}
.btn.red.ghost {
    color: #e04f4f;
}
.btn.confirm {
    background: #3fbc27;
}
.btn.disabled {
    background: #ccc;
    color: #fff;
}
.btn2 {
    background: #ecf0f3;
    border: 1px solid #cfd8de;
    color: #000;
    font-weight: 400;
}
.btn2.gray {
    color: #abc;
}

textarea {
    padding: 7px 11px;
    width: 100%;
    outline: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;
}

#loading {
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s, visibility 0.2s;
    position: absolute;
    background: #071628b0;
    height: 100%;
    width: 100%;
    z-index: 999999;
    top: 0;
    left: 0;
}
#loading::after {
    content: " ";
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    border-color: #ffffff transparent #ffffff transparent;
    animation: rotation 1.2s linear infinite;
}
#loading.active {
    opacity: 1;
    visibility: visible;
}

.lds-dual-ring {
    opacity: 0;
    transition: opacity 0.3s;
    transition-delay: 0.3s;
    position: absolute;
    top: calc(50% - 12px);
    left: calc(50% - 12px);
}
.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    border-color: #ffffff transparent #ffffff transparent;
    animation: rotation 1.2s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/**********************************************/

.sidebar {
    width: 290px;
    flex-shrink: 0;
    background: #183556;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.patientData {
    background: #16293f;
    padding: 22px 36px;
    color: #7b9bbe;
    font-size: 0.95em;
}
.patientData > div:first-child {
    position: relative;
    display: block;
    margin-bottom: 15px;
}
#patientName {
    color: #ffffff;
    font-weight: 500;
}
#patientName::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 1px;
    background: #365e8b;
    bottom: -8px;
    left: 0;
}
.patientData > div > span {
    color: #cadcef;
    font-weight: 500;
}

.progress {
    padding: 23px 36px;
}
.progress h2 {
    color: #fff;
    margin-bottom: 25px;
}
.progressSteps {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #7394ba;
}
.progressSteps > div {
    display: flex;
    align-items: center;
    position: relative;
}
.progressSteps > div:not(:first-child) {
    margin-top: 35px;
}
/*.progressSteps > div:not(:first-child)::before {
    content: "";
    position: absolute;
    width: 1px;
    height: 35px;
    background: #365e8b;
    bottom: 100%;
    left: 15px;
}*/
.progressSteps > div > .line {
    position: absolute;
    width: 1px;
    height: 35px;
    background: #365e8b;
    bottom: 100%;
    left: 15px;
}
.progressSteps > div.sub {
    margin-left: 30px;
    margin-top: 20px;
    font-size: 0.92em;
}
.progressSteps > div.sub > .line {
    left: -15px;
    height: 33px;
    bottom: calc(100% - 13px);
}
.progressSteps > div.sub::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 1px;
    background: #365e8b;
    left: -15px;
}
.progressSteps > div.subsub {
    margin-left: 54px;
    margin-top: 18px;
    font-size: 0.88em;
}
.progressSteps > div.subsub > .line {
    left: -12px;
    height: 30px;
    bottom: calc(100% - 12px);
}
.progressSteps > div.subsub::after {
    content: "";
    position: absolute;
    width: 11px;
    height: 1px;
    background: #365e8b;
    left: -11px;
}
.progressSteps > div.subsubsub {
    margin-left: 57px;
    margin-top: 11px;
    font-size: 0.78em;
    font-weight: 200;
}
.progressSteps > div.subsubsub > .line {
    left: 8px;
    height: 15px;
    bottom: calc(100% - 3px);
}
.progressSteps > div.green {
    color: #0f0;
}
.progress .dot {
    display: flex;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    border: 1px solid #5083b2;
    position: relative;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.progress .sub .dot {
    height: 26px;
    width: 26px;
}
.progress .subsub .dot {
    height: 22px;
    width: 22px;
}
.progress .subsubsub .dot {
    height: 17px;
    width: 17px;
}
.progress .label {
    margin-left: 18px;
    font-size: 1.1em;
}
.progress .sub .label,
.progress .subsub .label {
    margin-left: 12px;
}
.progress .subsubsub .label {
    margin-left: 14px;
}
.progressSteps > div.active > .dot {
    background: #00b2ff;
    border-color: #00b2ff;
}
.progressSteps > div.done > .dot {
    background: #004b81;
    border-color: #004b81;
}
.progressSteps > div.done > .dot::after {
    content: "";
    position: absolute;
    width: 13px;
    height: 7px;
    border: 2px solid #367aab;
    border-top: none;
    border-right: none;
    /*transform: rotateZ(-45deg) translate(1px, -1px);*/
    transform: rotateZ(-45deg) translate(5%, -8%);
}
.progress .subsub.done > .dot::after {
    width: 10px;
    height: 5px;
}
.progress .subsubsub.done > .dot::after {
    width: 7px;
    height: 3px;
    border-width: 1px;
}
.progressSteps > div.active > .label {
    color: #fff;
}

.logout {
    color: #d93333;
    padding-left: 36px;
    font-size: 0.9em;
    margin-top: auto;
    margin-bottom: 20px;
}

/*********************************************/

#wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#title {
    text-align: center;
    color: #fff;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.headerBox {
    margin: 0 40px;
    position: relative;
}
.headerBox > .remaining {
    position: absolute;
    right: 3px;
    bottom: 5px;
    color: #9bbee1;
}
.container {
    display: flex;
    flex-direction: column;
    margin: 0 40px;
    flex-grow: 1;
    max-height: calc(100% - 60px);
    padding-bottom: 40px;
}
@media (max-width: 1080px) {
    .container {
        margin-left: 20px;
        margin-right: 20px;
    }
    .sidebar {
        width: 275px;
    }
}
@media (max-width: 900px) {
    #page {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .progress {
        display: none;
    }
    .patientData {
        display: flex;
        gap: 30px;
        font-size: 0.9em;
        overflow-x: auto;
        padding: 15px 20px;
    }
    .patientData > * {
        flex-shrink: 0;
    }
    .patientData > div:first-child {
        margin-bottom: 0;
    }
    #patientName::after {
        content: none;
    }
}
@media (max-width: 768px) {
}

#stepContainer {
    background: #fff;
    padding: 17px 20px;
    border-radius: 10px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: height 0.2s;
}
#stepContainer.shrink {
    /* Images container + its margin */
    height: calc(100% - 158px);
}

.step {
    transition: opacity 0.2s;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#prevBtn {
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 7px;
    transition: opacity 0.3s;
    flex-shrink: 0;
    position: absolute;
    transform: translateY(-5px);
    left: 5px;
    top: 18px;
}
#prevBtn::before {
    content: "";
    width: 17px;
    height: 17px;
    transform: rotate(45deg) translate(32px, -3px);
    border-left: 1px solid #323232;
    border-bottom: 1px solid #323232;
    z-index: 1;
    transition: transform 0.25s;
    position: absolute;
}
@media (hover: hover) and (pointer: fine) {
    #prevBtn:hover {
        box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.03);
        background-color: rgba(0, 10, 40, 0.05);
    }
}

#stepTitle {
    margin: 0 50px 26px;
    text-align: center;
    font-size: 1.3em;
    transition: opacity 0.2s;
}

.nextBtn {
    width: 200px;
    margin-left: auto;
    margin-top: auto;
}

.imagesContainer {
    display: flex;
    justify-content: space-between;
    height: 130px;
    margin: 28px 0 0;
    transition: opacity 0.2s;
}
.imagesContainer > .bImg {
    width: 18%;
    background: #1a3c5a;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 8px 13px 0px #0000001f;
    border: 1px solid #34577a;
    cursor: pointer;
}
.imagesContainer .bImg img {
    max-height: 100%;
}
.imgPopupWrapper {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: calc(100% - 290px);
    padding: 76px 120px;
    background: #0009;
    transition: opacity 0.2s;
}
.imgPopupWrapper .popupWindow {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060e14;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #6a737a;
    position: relative;
}
.imgPopupWrapper .popupWindow .close::after {
    position: absolute;
    content: "\002b";
    cursor: pointer;
    font-size: 48px;
    padding: 0 5px;
    font-weight: 200;
    transform: rotateZ(45deg);
    top: -5px;
    right: 0px;
    line-height: 1;
    color: #b9c6df;
}
.imgPopupWrapper .popupImage {
    max-height: 100%;
}

/* Zoomed Image */
.popupWindow img {
    display: block;
    transition: transform 0.3s ease;
}

/* Zoomed Image */
.popupWindow img {
    display: block;
    transition: transform 0.3s ease;
}

/* Zoom Lens */
.zoom-lens {
    position: absolute;
    border: 1px solid #000;
    display: none;
    width: 100px;
    height: 100px;
    cursor: move;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 10;
    pointer-events: none;
}

/* Styles for the zoomed image container */
.zoom-result {
    position: absolute;
    border: 1px solid #d4d4d4;
    width: 300px;
    height: 300px;
    display: none;
    overflow: hidden;
    z-index: 999;
    background-repeat: no-repeat;
    pointer-events: none;
}

.selections {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.selections .btn2 {
    width: calc(50% - 10px);
}
.selections .btn2.selected {
    border-color: #1c8cfd;
    background: #257ad0;
    color: #fff;
}

/************** Login ***************/

#login {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 0 80px;
    text-align: center;
    color: #fff;
    width: 365px;
    position: relative;
    flex-grow: 1;
}
#login form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    background: #fff;
    padding: 25px 38px 38px;
    border-radius: 12px;
}
#login form h1 {
    color: #3e4954;
    font-size: 1.8em;
    margin-bottom: 12px;
}
#login form input {
    padding: 15px 20px;
}
.loginBtn::after {
    content: "";
    width: 7px;
    height: 7px;
    transform: translate(8px, 2px) rotate(225deg);
    border-left: 1px solid #fff;
    border-bottom: 1px solid #fff;
    z-index: 1;
    transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.loginBtn.loading {
    color: transparent;
    background-color: #336ca6;
}
.loginBtn.loading .lds-dual-ring {
    opacity: 1;
}
.loginBtn.loading::after {
    transform: translate(26px, 1px) rotate(225deg);
    opacity: 0;
}
.forgotPass {
    color: #72b8ff;
    font-size: 0.88em;
    text-align: left;
    margin-top: 10px;
    align-self: flex-start;
}
#login .responseLabel {
    position: absolute;
    top: 30px;
    margin: 0 auto;
    width: 100%;
    background: #ce4242;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 13px 0 #0005;
    transition: opacity 0.3s;
}

/************** Photo Check Step ***************/

.notFoundContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    justify-content: center;
    padding-bottom: 60px;
}
.notFoundLabel {
    font-size: 1.6em;
    font-weight: 200;
    margin-bottom: 20px;
}
.reloadBtn {
    font-size: 1.12em;
    border: 1px solid var(--primaryBtn);
    width: 140px;
    padding: 12px 5px 10px;
    border-bottom: 0;
}
.reloadBtn > span {
    margin-left: 7px;
    font-size: 1.15em;
}
.reloadBar {
    width: 140px;
    height: 16px;
    border-bottom: 1px solid var(--primaryBtn);
    text-align: left;
    border-radius: 5px;
    margin-top: -16px;
    border-radius: 8px;
    padding-top: 11px;
    overflow: hidden;
}
.reloadBarFill {
    width: 0%;
    background: var(--primaryBtn);
    height: 100%;
    transition: width 1s linear;
}
.reloadSpan {
    color: #b1c2c8;
    font-weight: 300;
    font-size: 0.75em;
}

.checkPhotoContainer {
    display: flex;
    justify-content: space-between;
}
.checkPhotoContainer > div {
    flex-shrink: 0;
    width: calc(50% - 10px);
    height: 440px;
}
.checkPhotoContainer .checkPhoto {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #dde;
    background: #00112212;
    height: calc(100% - 20px);
    margin-bottom: 20px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.checkPhotoContainer .checkPhoto.bad::before {
    content: "";
    position: absolute;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #a008;
}
.checkPhotoContainer .checkPhoto.bad::after {
    content: "BAD";
    position: absolute;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.8em;
}
.checkPhotoContainer .checkPhoto img {
    max-height: 100%;
}
.checkPhotoContainer > div:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.checkPhotoContainer > div:last-child .checkPhoto {
    width: calc(50% - 10px);
    height: 200px;
}
.badImgContainer {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 1.1em;
    margin-top: 10px;
    margin-left: 5px;
}
#badImgSelect {
    padding: 9px 8px;
    min-width: 120px;
}
#step_photocheck .buttons {
    display: flex;
    margin-top: auto;
    gap: 20px;
}
#step_photocheck .badImgBtn {
    width: 150px;
}
#step_photocheck .startBtn {
    flex-grow: 1;
}

/************** Suitability Step ***************/

#step_suitability .buttons {
    display: flex;
    margin-top: auto;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}
#step_suitability .nextBtn.red {
    width: auto;
    max-width: 225px;
}
#step_suitability .unsuitableBtn {
    font-size: 0.85em;
    padding: 5px 8px;
}
#step_suitability #unsuitableReason {
    width: auto;
    flex-grow: 1;
    max-width: 260px;
    margin-left: auto;
}
#step_suitability .nextBtn {
    margin-left: 0;
}

/************** Options Step ***************/

#step_options .selections .btn2 {
    width: calc(33.33% - 10px);
}

/************** Session Step ***************/

#step_session hr {
    width: 100%;
    border: 1px solid #dde;
    border-bottom: none;
    margin: 12px auto;
}
#step_session h4 {
    text-align: center;
    font-size: 1.1em;
    margin-top: 10px;
    margin-bottom: 0px;
}
.split {
    display: flex;
    justify-content: space-between;
}
.split > .tabBox {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 10%;
    gap: 10px;
}
.split > .tabBox > div {
    transform: rotate(180deg);
    writing-mode: vertical-lr;
    flex-grow: 1;
    text-align: center;
    width: 60%;
    padding-left: 10px;
    display: flex;
    justify-content: center;
    border-left: 2px solid #d9e3ed;
    color: #a9c5e7;
}
.split > .tabBox > div.active {
    border-color: #3af;
    color: #0f8ae3;
    background: #f7fafd;
    box-shadow: inset 21px 0px 15px -12px #e8f2ff;
}
.split > .graftBox {
    padding-right: 28px;
    padding-left: 15px;
    border-right: 1px solid #dde;
    width: 50%;
}
.split > .methodBox {
    padding-left: 28px;
    width: 40%;
}
#step_session .area .btn2 {
    width: calc(33.333% - 12px);
    margin-bottom: 20px;
}
#step_session .grafts .btn2 {
    width: calc(50% - 12px);
}
#step_session .nextBtn {
    position: absolute;
    right: 0;
    bottom: 0;
}
#step_session .hint {
    position: absolute;
    bottom: 3px;
    font-size: 0.7em;
    color: #aaa;
}
#step_session .inputBox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}
#step_session .inputBox .label {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#step_session .inputBox .label span {
    font-size: 0.7em;
    color: #aaa;
    text-align: center;
}

/************** Result Expect Step ***************/

#step_resultexpect .selectionContainer {
    display: flex;
    justify-content: center;
}
#step_resultexpect .selections {
    flex-direction: column;
    align-items: center;
    width: 50%;
}
#step_resultexpect .selections .label {
    margin-bottom: 20px;
    padding-bottom: 3px;
    border-bottom: 1px solid #899;
}
#step_resultexpect .selections .btn2 {
    width: calc(70% - 10px);
}

/************** Confirmation Step ***************/

#step_confirmoption .planTitle {
    margin: 0 0 15px 2px;
}
#step_confirmoption .planTitle > span {
    font-weight: bold;
}
#step_confirmoption .infoContainer .boxes {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}
#step_confirmoption .infoContainer .boxes > div {
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fbfbfc;
    padding: 12px 18px 15px;
    min-height: 130px;
    flex-grow: 1;
}
#step_confirmoption .infoContainer .boxes > div.empty > table {
    display: none;
}
#step_confirmoption .infoContainer .boxes h5 {
    margin: 0 0 7px 2px;
    font-size: 1.02em;
    border-bottom: 1px solid #ddd;
    padding: 0 0 5px;
}
#step_confirmoption table {
    color: #666;
    font-size: 0.9em;
}
#step_confirmoption table td:last-child {
    font-weight: 600;
    color: #223;
    padding-left: 12px;
}
#step_confirmoption .notesContainer {
    margin: 16px 0;
}
#step_confirmoption .notesContainer > label {
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    color: #666;
}
#step_confirmoption .notesContainer textarea {
    height: 65px;
}

/***************************************/

.hidden {
    opacity: 0;
}
