:root {
    --bg-color: #eaeaea;
    --alt-bg-color: #FFFFFF;
    --primary-color: #111111;
    --second-color: #9bae89;
    --shadow-1: #727272;
    --shadow-2: #E0DFD7;
    --border-color: #63666A;
    --border-radius: 8px;
    height: 100%;
}

@font-face {
    font-family: "CircularStd";
    src:
        /* url("../fonts/CircularStd-Black.otf") format("opentype"), */
        url("../fonts/CircularStd-Book.otf") format("opentype"),
        url("../fonts/CircularStd-Bold.otf") format("opentype");
}

/* tag style */
html {
    background: #616c76;
    font-family: "ITC Franklin Gothic Std";
}

body,
button {
    margin: 0;
    font-size: 14px;
}


body {
    width: 500px;
    margin: 0 auto;
    margin-top: 20px;
    box-sizing: border-box;
}

.app {
    background: var(--bg-color);
    display: grid;
    grid-template-rows: max-content max-content 1fr max-content max-content max-content max-content;
    gap: 16px;
    padding: 5% 5%;
    box-sizing: border-box;
    position: relative;
    height: 80%;
    border-radius: 20px;    
}

.app .logo {
    text-align: right;
}

.app .logo img {
    height: 35px;
}

button {
    border: 0;
    border-radius: var(--border-radius);
    background: inherit;
    color: inherit;
    cursor: pointer;
}

button:disabled {
    border-color: var(--border-color);
    opacity: 0.3;
}

/* chevron */
i.fa {
    font-size: 40px;
    color: var(--second-color);
}

/* generic style */
.flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background-color: #e42313;
    padding: 20px 5%;
    box-sizing: border-box;
}

.header img {
    width: 100%;
}

.visual {
    justify-content: right !important;
    width: 100%;
    height: 390px;
}

.no-data {
    width: 100%;
    height: 390px;
    align-content: center;
    text-align: center;
    display: none;
}

.ellipse {
    background-color: var(--alt-bg-color);
    border-radius: 50%;
    border: 3px dashed var(--second-color);
    box-shadow: 4px 4px 4px var(--shadow-1);
    box-sizing: border-box;
}

@keyframes flash {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.flash-effect {
    animation: flash 1s infinite; /* Flashing every second */
}

@keyframes border-flash {
    0% {
        border-color: var(--second-color);
    }
    50% {
        border-color: transparent;
    }
    100% {
        border-color: var(--second-color);
    }
}

.border-flash-effect {
    animation: border-flash 1s linear infinite;
}

@keyframes border-flash {
    0% {
        border-color: var(--second-color);
    }
    50% {
        border-color: transparent;
    }
    100% {
        border-color: var(--second-color);
    }
}


.mid-point {
    top: calc(50% - 20px);
    left: 50%;
    width: 6px;
    height: 40px;
    background: var(--second-color);
    z-index: 1;
    box-shadow: 2px 2px 4px var(--shadow-1);
    border-radius: 2px;
}

.multiProbeText {
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    justify-content: left;
    align-items: center;
    margin-left: 14%;
}

.info {
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    justify-content: left;
    align-items: center;
    margin-left: 14%;
}

.info span {
    padding-left: 8px;
    border-left: 4px solid var(--second-color);
    height: 24px;
    line-height: 24px;
    font-weight: 400;
}

.info span b {
    font-weight: bold;
}

.info-btn {
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    top: 0;
    left: 0;
    background-color: var(--alt-bg-color);
    border: 2px solid var(--second-color);
    border-radius: 50%;
    color: var(--second-color);
    font-size: 24px;
    font-weight: bold;
    box-shadow: 4px 4px 8px var(--shadow-1);
    cursor: pointer;
}

.tissues,
.probe,
.probe-quantity,
.time,
.power {
    background: var(--alt-bg-color);
    border-radius: var(--border-radius);
    box-shadow: 4px 4px 4px var(--shadow-2);
    height: 38px;
}

.probe {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 0px 16px;
}

.probe .dropdown {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--second-color);
    height: 100%;
    font-size: 24px;
    font-weight: bold;
    position: relative;
    cursor: pointer;
}

.dropdown-content {
    position: absolute;
    box-shadow: 4px 4px 4px var(--shadow-2);
    z-index: 1;
    display: none;
    flex-flow: column;
    top: 40px;
    width: 100%;
    background: white;
    text-align: center;
}

.dropdown-content button {
    margin: 4px 0px;
    color: var(--primary-color);
    cursor: pointer;
}

.dropdown-content button:hover {
    color: var(--second-color);
}

.dropdown-content button:disabled:hover {
    color: var(--primary-color);
}

.probe label {
    text-align: left;
    font-weight: bold;
}

.probe .fa {
    justify-self: flex-end;
}

.tissues {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.probe-quantity {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

button.clicked {
    background: var(--second-color);
    color: var(--alt-bg-color);
    font-weight: bold;
}

.card {
    box-sizing: border-box;
    height: auto;
    padding: 4px 16px;
    display: grid;
    grid-template-rows: max-content 1fr max-content;
}

.card .title {
    font-weight: bold;
}

.card .unit {
    width: 100%;
    text-align: center;
    font-weight: bold;
}

.card .value {
    color: var(--second-color);
    font-weight: bold;
    font-size: 32px;
    margin: 0;
}

.card .step {
    height: 100%;
    flex-direction: column;
    right: 0;
}

.line {
    font-weight: lighter;
    letter-spacing: 0;
    background: var(--primary-color);
    height: 2px;
}

.line::before,
.line::after {
    content: "";
    width: 8px;
    height: 2px;
    background: var(--primary-color);
    display: block;
    position: absolute;
}

.length-line {
    width: 100%;
    bottom: -14px;
}

.length-line .value {
    width: 100%;
    bottom: -28px;
    font-weight: bold;
}

.length-line:before {
    transform: rotate(90deg);
    left: -4px;
}

.length-line:after {
    transform: rotate(90deg);
    right: -4px;
}

.height-line {
    height: 100%;
    width: 2px;
    right: -14px;
}

.height-line .value {
    right: -20px;
    height: 100%;
    width: max-content;
    left: 8px;
    font-weight: bold;
}

.height-line:before {
    top: 0;
    left: -3px;
}

.height-line:after {
    bottom: 0;
    right: -3px;
}

.offset-line {
    top: -16px;
    border: 2px solid var(--primary-color);
    background: transparent;
    box-sizing: border-box;
    border-top: 0;
    border-bottom: 0;
}

.offset-line .value {
    width: max-content;
    top: -24px;
    font-weight: bold;
}

.offset-line .len {
    height: 2px;
    background: var(--primary-color);
    top: 4px;
}

.offset-line:before,
.offset-line:after {
    width: 0;
}

.modal {
    display: none;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.4);
    padding: 56px 32px;
    box-sizing: border-box;
    border-radius: 20px;
}

.modal-content {
    border-radius: var(--border-radius);
    border: 4px solid var(--border-color);
    height: 100%;
    background: var(--alt-bg-color);
    padding: 40px 20px 20px 20px;
    box-sizing: border-box;
    flex-direction: column;
    font-weight: bold;
    color: var(--primary-color);
    align-items: unset;
    overflow: auto;
    display: inherit;
}

#splash-modal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px 20px;
}

/* Make the disclaimer text scroll if needed */
#splash-modal .modal-content > p:first-of-type {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
}

/* Keep disclaimer untouched */

/* Only style copyright text */
.splash-footer p {
    font-size: 11px;
    color: #666;
    margin: 0;
    text-align: left;
    margin-top:30px;
    
}

/* Optional: keep footer centred */
.splash-footer {
    text-align: center;
}


#splash-modal img {
    width: 60%;
}



#splash-modal button {
    height: 40px;
    padding: 0px 20px;
    margin: 10px 0px;
    justify-self: left;
}

.modal-content h4 {
    margin-bottom: 0;
    color: var(--second-color);
}

.modal-content h2 {
    margin-bottom: 0;
    color: var(--second-color);
}

.modal-content ul {
    margin: 0;
    padding-inline-start: 20px;
    color: black;
    list-style: none;
}

.modal-content ul li::before {
    content: "\2022";
    color: red;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.close {
    color: var(--second-color);
    font-size: 40px;
    width: 40px;
    height: 40px;
    font-weight: bold;
    opacity: 0.7;
    top: 0;
    right: 0;
}

.close:hover,
.close:focus {
    opacity: 1;
    text-decoration: none;
    cursor: pointer;
}

.probes-container {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    width: 100%;
    margin-right: 50px;
}

#fixed, #lateral {
	position: absolute;
	left: 22.5%
}
#diameter {
	position: absolute;
	top: 60%;
	left: -5%;
}
#lateral {
	bottom: 0%;
}

#fixed, #lateral-single {
    position: absolute;
    left: 22.5%;
}

#lateral, #lateral-single {
    position: absolute;
    left: 27.5%; /* Updated lateral offset */
    bottom: 0%;
}

#diameter-single {
	position: absolute;
	top: 60%;
	left: -5%;
}
#lateral-single {
	bottom: 0%;
}

#ptc-probe-1, #ptc-probe-2 {
	position: absolute;
	transform: rotate(90deg);
	left: -2.5%;
	bottom: 50%;
}
#ptc-probe-2 {
	left: 8.5%;
}

@media only screen and (max-height: 860px) {
    body {
        width: 400px;
    }

    body,
    button {
        font-size: 12px;
    }
    
    .app {
        background: var(--bg-color);
        display: grid;
        grid-template-rows: max-content max-content 1fr max-content max-content max-content max-content;
        gap: 16px;
        padding: 2% 5%;
        box-sizing: border-box;
        position: relative;
        height: 80%;
    }

    .probe .dropdown {
        font-size: 20px;
    }

    .card .value,
    i.fa {
        font-size: 25px;
    }

    .tissues,
    .probe,
    .probe-quantity {
        height: 30px;
    }

    .card {
        height: auto;
    }

    .dropdown-content {
        top: 30px;
    }

    .modal {
        padding: 24px 12px;
    }
}

@media only screen and (max-height: 780px) {
    body {
        width: 400px;
    }

    body,
    button {
        font-size: 10px;
    }

    .header {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        background-color: #e42313;
        padding: 2% 5%;
        box-sizing: border-box;
    }

    .probe .dropdown {
        font-size: 20px;
    }

    .visual {
        height: 300px;
    }

    .card .value,
    i.fa {
        font-size: 25px;
    }

    .app {
        gap: 10px;
    }

    .tissues,
    .probe,
    .probe-quantity {
        height: 25px;
    }

    .card {
        height: auto;
    }

    .dropdown-content {
        top: 25px;
    }

    .modal {
        padding: 24px 12px;
    }
}

@media only screen and (max-width: 480px) {
    body {
        width: 100%;
    }

    .header {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        background-color: #e42313;
        padding: 2% 5%;
        box-sizing: border-box;
    }

    .visual {
        height: 300px;
    }

    body,
    button {
        font-size: 12px;
    }

    .app .logo img {
        height: 25px;
    }

    .probe .dropdown {
        font-size: 20px;
    }

    .card .value,
    i.fa {
        font-size: 25px;
    }

    .app {
        gap: 8px;
    }

    .tissues,
    .probe,
    .probe-quantity {
        height: 30px;
    }

    .card {
        height: 70px;
    }

    .dropdown-content {
        top: 40px;
    }

    .modal {
        padding: 24px 12px;
    }
}

@media only screen and (max-width: 320px) {
    body {
        width: 100%;
    }

    body,
    button {
        font-size: 10px;
    }

    .app .logo img {
        height: 15px;
    }

    .probe .dropdown {
        font-size: 16px;
    }

    .card .value,
    i.fa {
        font-size: 24px;
    }

    .app {
        gap: 6px;
    }

    .tissues,
    .probe,
    .probe-quantity {
        height: 25px;
    }

    .card {
        height: 100px;
    }

    .dropdown-content {
        top: 32px;
    }

    .modal {
        padding: 12px 8px;
    }

    
}
