* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    scrollbar-gutter: stable;
}

.red {
    fill: #ff0000;
}
.red:hover {
    fill: #870c0c;
}
:root {
    --color-bg: #f0f0f0;
    --color-button-bg: #fdfdfd;
    --color-small-box: #efefef;
    --color-small-box-hover: #e9e9e9;
    --color-surface-alt: #e9e9e9;
    --color-surface-hover: #dfdfdf;
    --color-footer-bg: #e5e5e5;
    --color-border: #ccc;
    --color-border-strong: #8c8c8c;
    --color-text: #333;
    --color-text-strong: #222;
    --color-text-muted: #999;
    --color-accent: #e0eef9;
    --color-accent-strong: #6279e2;
    --color-popup-bg: #d8deff;
    --color-warning: #e4c5f5;
}

body.theme-default {
    --color-bg: #f0f0f0;
    --color-button-bg: #fdfdfd;
    --color-small-box: #efefef;
    --color-small-box-hover: #e9e9e9;
    --color-surface-alt: #e9e9e9;
    --color-surface-hover: #dfdfdf;
    --color-footer-bg: #e5e5e5;
    --color-border: #ccc;
    --color-border-strong: #8c8c8c;
    --color-text: #333;
    --color-text-strong: #222;
    --color-text-muted: #999;
    --color-accent: #e0eef9;
    --color-accent-strong: #6279e2;
    --color-popup-bg: #d8deff;
    --color-warning: #e4c5f5;
}
    /* Color themes, switched by clicking the logo */
body.theme-green {
 /*   --color-bg: #1b1b1b; */
    --color-button-bg: #f7fff9;
    --color-small-box: #c3ffd0;
    --color-small-box-hover: #a6f6b7;
    --color-surface-alt: #a7ffbb;
    --color-surface-hover: #a1f6bc;
  /*  --color-border: rgb(126, 204, 119);*/
    --color-border-strong: #778c79;
 /*   --color-text: #e6e6e6; */
  /*  --color-text-strong: #ffffff; */
  /*  --color-text-muted: #b0b0b0; */
      --color-accent: #f9f4e0; 
 /*   --color-accent-strong: #6a88ff; */
 /*   --color-popup-bg: #2f3450; */
 /*   --color-warning: #7a4a8a; */
}             
body.theme-blue {
    --color-button-bg: #f2fbff;
    --color-small-box: #d0f2ff;
    --color-small-box-hover: #a4e5ff;
    --color-surface-alt: #b7d4ff;
    --color-surface-hover: #9dbdf1;
  /*  --color-border: rgb(119, 149, 204);*/
    --color-border-strong: #778c8c;
    --color-accent: #e3f9e0; 
}
body.theme-purple {
    --color-button-bg: #fcf9ff;
    --color-small-box: #e7e0fd;
    --color-small-box-hover: #d6cefb;
    --color-surface-alt: #d3cdff;
    --color-surface-hover: #c3bcfc;
  /*  --color-border: rgb(152, 119, 204);*/
    --color-border-strong: #778c8c;
    --color-accent: #f9e0e0; 
}
body.theme-red {
    --color-button-bg: #fff9f9;
    --color-small-box: #ffdfdf;
    --color-small-box-hover: #ffcece;
    --color-surface-alt: #ecb0b0;
    --color-surface-hover: #f5a1a1;
  /*  --color-border: rgb(204, 119, 119);*/
    --color-border-strong: #778c8c;
    --color-accent: #e0f9e0; 
}
#blinker-upper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 52vh;
    background-color: rgb(33, 7, 7);
    z-index: 10000;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.15s ease;
}
@keyframes blinker-upper {
    0% { transform: scaleY(0); }
    20% { transform: scaleY(1); }
    70% { transform: scaleY(1); }
    100% { transform: scaleY(0); }
}
#blinker-lower {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48vh;
    background-color: rgb(33, 7, 7);
    z-index: 10000;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.15s ease;
}
@keyframes blinker-lower {
    0% { transform: scaleY(0); }
    20% { transform: scaleY(1); }
    70% { transform: scaleY(1); }
    100% { transform: scaleY(0); }
}
#blinker-upper.is-blinking {
    animation: blinker-upper 0.8s 1;
}
#blinker-lower.is-blinking {
    animation: blinker-lower 0.8s 1;
}


body {
    background-color: var(--color-bg);
    position: relative;
}


img {
    max-width: 100%;
    height: auto;
}

mark { /* Used to highlight text to improve later */
    color: #ff0000;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline;
}
.fraction-image {
    scale: 0.9;
    width: auto;
    height: auto;
    padding: 0.5rem 2.5rem 0.5rem 0rem;
}
#equation-vaconversion {
    scale: 0.9;
}
#equation-snellen-fraction {
    scale: 0.9;
}
#equation-farpoint {
    scale: 0.95;
}
#equation-vergence {
    scale: 0.9;
}
#equation-vertexdistance {
    scale: 0.9;
}
.fraction-image.vertex-distance-white {
    scale: 0.9;
}
/* Header */
.header {
    width: 37rem;
    padding: 1.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    position: relative;
}
.nav-button-container {
    width: 100%;
    height: 5.375rem;
    display: grid;
    grid-template: 1fr 1fr / 1fr 1fr 1fr;
/*    grid-template: 43px 43px / 135px 135px 135px;*/
    grid-gap: 0.3125rem 1.0625rem;
}
.nav-button {
    width: 10rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    height: 2.6875rem;
    color: var(--color-text);
    border-radius: 0.1875rem;
    background-color: var(--color-button-bg);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.nav-button:hover {
    background-color: var(--color-accent);
    scale: 1.03;
}
.language-container {
    width: 2rem;
    margin-left: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.language-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.8rem;
    width: 1.875rem;
    height: 1.875rem;
    color: var(--color-text);
    border-radius: 0.1875rem;
    background-color: var(--color-button-bg);
    border: 1px solid var(--color-border);
    margin: 0.0625rem 1.125rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}
.language-button:hover {
    background-color: var(--color-accent);
    scale: 1.1;
}
.logo {
    width: 4.9375rem;
    height: 3.6875rem;
    position: absolute;
    right: -6rem;
    top: 3rem;
    cursor: pointer;
}
#more-button {
    position: absolute;
    left: -5.7rem;
    top: 7.5rem;
    width: 4rem;
    height: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    background-color: var(--color-button-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.1875rem;
    transition: all 0.15s ease;
    z-index: 1000;
}
#more-button:hover,
#more-button:has(~ #more-panel:hover) {
   /* background-color: #e0eef9; */
    top: 7.6rem;
    background-color: #d0d0d0;
    border: 1px solid black;
    font-size: 0.87rem;
    scale: 1.2;
    box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.15);
    width: 6rem;
    height: 1.1rem;
    left: -6.7rem;
}
#more-button:active {
    background-color: #9aa8e5;
    border: 1px solid #9aa8e5;
}
#more-panel {
    position: absolute;
    left: -7.2rem;
    top: 8.7rem;
    width: 7rem;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 0.15rem 0.5rem 0.15rem;
    justify-content: center;
    align-items: flex-start;
    font-weight: 600;
    color: var(--color-text);
  /*  background-color: #a3b0e9;*/
    background-color: var(--color-surface-hover);
  /*  border: 2px solid #7084dd; */
    border: 2px ridge var(--color-border-strong);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease;
    z-index: 999;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.2s ease, transform 0.15s ease;
    pointer-events: none;
}
#more-button:hover ~ #more-panel,
#more-panel:hover {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
}
.more-panel-button {
    width: 100%;
    height: auto;
    min-height: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  /*  background-color: #c6cbdd; */
 /*    background-color: #dfdfdf; */
    background-color: var(--color-button-bg);
    border: 1px solid var(--color-border-strong);
    font-size: 0.93rem;
    border-radius: 0.1875rem;
    padding: 0.5rem 0.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.15);
}
.more-panel-button-small {
    font-size: 0.9rem;
}
.more-panel-button:hover {
    background-color: var(--color-accent);

  /*  transform: translateX(0.0625rem); */
    scale: 1.02;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.15);
}
.more-panel-button:active {
    background-color: var(--color-accent-strong);
    font-weight: 700;
    transform: translateX(0.0625rem);
    box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2);
}
/* Popup */
#popup-frame-wrapper {
    position: absolute;
    top: 9.8rem;
    left: 0rem;
    z-index: 999;
    padding-bottom: 2rem;
}
#popup-frame {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 37rem;
    height: auto;
    background-color: var(--color-popup-bg);
    border: 2px ridge var(--color-border-strong);
    border-radius: 0.1875rem;
    box-shadow: inset 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1),
    0 0.125rem 0.75rem rgba(0, 0, 0, 0.15); 

    opacity: 1;
    transition: all 0.3s ease;
    overflow: auto;
}
#popup-literature, #popup-organizations, #popup-desktop-version, #popup-references, #popup-payment, #popup-standard-values, #popup-about {
    display: none;
    height: auto;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    padding-bottom: 0.5rem;
}
/* Popup - Literature, Organizations, Schools, Glossary and About -------------------------------------------*/
#popup-literature, #popup-organizations, #popup-schools, #popup-glossary, #popup-about {
    position: relative;
}
#popup-about {
    width: 100%;
    padding: 2rem 0.5rem 2rem 1rem;
    text-align: left;
    grid-template: auto / auto;
}
#popup-literature h3, #popup-organizations h3, #popup-schools h3, #popup-glossary h3, #popup-about h3 {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    width: 75%;
    margin: 2rem 0 0.1rem 1.5rem;
    padding-left: 1rem;
    border-bottom: 2px solid var(--color-text-muted);
}
#popup-literature h4, #popup-organizations h4, #popup-schools h4, #popup-glossary h4, #popup-about h4 {
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    width: 70%;
    margin: 1rem 0 0.5rem 2rem;
    padding-left: 1rem;
    border-bottom: 1px solid var(--color-text-muted);
}
#popup-literature h5, #popup-organizations h5, #popup-schools h5, #popup-glossary h5, #popup-about h5 {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    width: 90%;
    margin: 1rem 0 0.5rem 1rem;
    padding-left: 1rem;
}
#popup-literature p, #popup-organizations p, #popup-schools p, #popup-glossary p {
    width: 70%;
    text-align: left;
    padding-left: 1rem;
    padding-right: 0.8rem;
    margin-left: 2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-text-muted);
}
#popup-about p {
    width: 80%;
    text-align: left;
    padding-right: 0.8rem;
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}
#popup-literature p:hover, #popup-organizations p:hover, #popup-schools p:hover, #popup-glossary p:hover {
    background-color: var(--color-accent);
}
#popup-literature a, #popup-organizations a, #popup-schools a, #popup-glossary a {
    color: var(--color-text);
    text-decoration: none;
}
#popup-literature a:hover, #popup-organizations a:hover, #popup-schools a:hover, #popup-glossary a:hover {
    color: var(--color-accent-strong);
}
#popup-lists-gap {
    height: 0.4rem;
}
#popup-lists-gap-large {
    height: 1.5rem;
}
#popup-literature footer, #popup-organizations footer, #popup-schools footer, #popup-glossary footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: left;
    padding-left: 24rem;
}

/* Popup - Desktop version -----------------------------------------------------------------*/
#popup-desktop-version {
    grid-template: auto auto / 0.75fr 1.25fr;
}
#popup-desktop-version-top {
    grid-column: 1 / -1;
    padding: 1.5rem 0.5rem 2rem 1rem;
    text-align: left;
    width: 90%;
}
#popup-desktop-version-left-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 4rem;
    padding-left: 1rem;
    text-align: left;
}
#popup-desktop-version-right-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#popup-desktop-version-image {
    padding: 1rem 0.5rem 0rem 0.5rem;
    height: 25rem;
    width: auto;
}
/* Popup - References -----------------------------------------------------------------*/
#popup-references {
    width: 90%;
    padding: 2rem 0.5rem 2rem 3rem;
    text-align: left;
    grid-template: auto / auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}
#popup-references h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    padding-left: 2rem;
    border-bottom: 2px solid var(--color-text-muted);
}
#popup-references p {
    text-align: left;
    margin-bottom: 0.5rem;
/*    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    color: #222;*/
    border-bottom: 1px solid var(--color-text-muted);
    padding: 0.3rem;
}
#popup-references p:hover {
    background-color: var(--color-accent);
}

/* Scoreboard -----------------------------------------------------------------*/
#scoreboard-frame {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10rem;
    left: -12.5rem;
    width: 12rem;
    height: 30rem;

    border-radius: 0.1875rem;
    padding: 0.5rem;
 /*   box-shadow: 0 0.125rem 1rem rgba(0, 0, 0, 0.15); */
    transition: background-color 0.4s ease;
    font-size: 1rem;
    font-weight: 600;
    gap: 1rem;
    overflow: visible;
}
#scoreboard-frame:hover {
    background-color: var(--color-surface-hover);
    border-left: 1px ridge var(--color-border-strong);
 /*   box-shadow: 
        0.2rem -0.125rem 0.15rem rgba(0, 0, 0, 0.15),
        0.2rem 0.125rem 0.15rem rgba(0, 0, 0, 0.15); */
}
#scoreboard-frame h3 {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0 0.2rem 0;
    height: auto;
    width: 100%;
    color: var(--color-text-strong);
    border-bottom: 1px solid var(--color-text-muted);
    padding-bottom: 0.3rem;
}
#scoreboard-hover-section {
    position: absolute;
    top: 0rem;
    left: 11.5rem;
    display: grid;
    grid-template: auto auto auto auto auto / 1fr 1fr 1fr;
    width: 38rem;
    height: 30rem;
    padding: 1rem 0.5rem 0.5rem 1.5rem;
    background-color: var(--color-bg);
    border-radius: 0rem 0.1875rem 0.1875rem 0rem;
    transform: scaleX(0);
    transform-origin: left;
    transition: all 0.4s ease;
    font-size: 1rem;
    font-weight: 600;
    gap: 0.5rem;
    z-index: 10000;
    pointer-events: none;
}
#scoreboard-frame:hover #scoreboard-hover-section, #scoreboard-hover-section:hover {
    transform: scaleX(1);
    pointer-events: auto;
    background-color: var(--color-surface-hover);
    border-right: 1px ridge var(--color-border-strong);
 /*   box-shadow: 
        0.2rem -0.125rem 0.25rem rgba(0, 0, 0, 0.15),
        0.2rem 0.125rem 0.25rem rgba(0, 0, 0, 0.15);  */
  /*  border-top: 1px ridge #8c8c8c;
    border-bottom: 1px ridge #8c8c8c; */
}

.scoreboard-button {
    width: 10rem;
    height: 4.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: 0.1875rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
    background-color: var(--color-button-bg);
    cursor: pointer;
    padding: 0.5rem 0.5rem;
}
.scoreboard-button:hover {
    background-color: var(--color-accent);
    scale: 1.03;
}
.scoreboard-button:active {
    background-color: var(--color-accent-strong);
    scale: 1.01;
}
#scoreboard-frame h4 {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin: 0.5rem 0 0.2rem 0;
    height: auto;
    padding-top: 0.5rem;
    width: 100%;
    color: var(--color-text-strong);
    border-bottom: 1px solid var(--color-text-muted);
    padding-bottom: 0.3rem;
}
input[type="text"] {
    width: 100%;
    height: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    border-radius: 0.1875rem;
    text-align: center;
    justify-self: center;
    align-self: center;
}
input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}
label {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    justify-self: center;
    align-self: center;
}

/* Main */
.main {
    width: 37rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}
#main-various {
    display: flex;
    flex-direction: column;
}
#main-vertex {
    display: none;
}
#main-desentration {
    display: none;
}
#main-price {
    display: none;
}
#main-general {
    display: none;
}

/* Calculation sections */
.calculation-section {
    width: 100%;
    height: 9.875rem;
    background-color: var(--color-surface-alt);
    border: 2px inset var(--color-border-strong);
    margin-bottom: 1.25rem;
    transition: background-color 0.4s ease;
    position: relative;
}
.calculation-section:hover {
/*    background-color: #a2e6b4;*/
    background-color: var(--color-surface-hover);
}
.calculation-section h2, .pri-glasses-section h2, .pri-cl-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    position: absolute;
    top: 0.625rem;
    left: 1.25rem;
}
.reset-button, .x-button, .background-button, .background-close-button, .popup-background-button, .popup-background-close-button {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 1.5625rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.125rem;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: "Arial", sans-serif;
    color: var(--color-text);
    background-color: var(--color-button-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.1875rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}
.x-button {
    top: 2rem;
}
.background-button {
    right: 2.3rem;
}
.no-x {
    right: -0.35rem !important;
}
.popup-background-button {
    right: 1.3rem;
    top: -0.4rem;
}
#popup-frame .x-button {
    top: 0.625rem;
    z-index: 1000;
}
#stv-standard-values .x-button {
    top: 0.6rem;
    right: 0.625rem;
    z-index: 1000;
}
#scoreboard-frame .x-button, #scoreboard-frame .reset-button {
    top: 0.4rem;
    right: 0.4rem;
    background-color: #fdfdfd;
    border: 1px solid #ccc;
    width: 1.09rem;
    height: 0.875rem;
    font-size: 0.7rem;
    font-family: "Arial", sans-serif;
    padding-top: 0.1rem;
}
#scoreboard-frame .reset-button {
    right: 1.75rem;
}
.calculation-section:hover .footer-box {
    background-color: var(--color-surface-hover);
}
.calculate-button {
    width: 8.125rem;
    height: 1.875rem;
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
    border-radius: 0.1875rem;
    background-color: var(--color-button-bg);
    border: 1px solid #777;
    transition: background-color 0.3s ease;
    position: absolute;
    bottom: 0.625rem;
    left: 1.875rem;
    padding-top: 0.12rem;
    cursor: pointer;
}
.invalid-input {
    font-size: 1.0rem;
    font-weight: 700;
    display: none;
    background-color: var(--color-warning);
    padding: 0.1rem 0.2rem;
    position: absolute;
    right: 2rem;
    bottom: -0.5rem;
    width: 9rem;
    text-align: center;
    border-radius: 0.1875rem;
    border: 1px solid #777;
}
/*
.calculation-section footer:hover, .calculation-section footer:has(~ .expandable-footer:hover) {
    background-color: var(--color-footer-bg);
}
.calculation-section footer:hover ~ .expandable-footer, .expandable-footer:hover {
    transform: scaleY(1);
    pointer-events: auto;
} */
.background-frame, .popup-background-frame {
    display: none;
    position: absolute;
    top: 0.5rem;
    left: 0.625rem;
    width: 33.6rem;
    min-height: 8.7rem;
    max-height: 8.7rem;
    background-color: var(--color-button-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.1875rem;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    z-index: 100;
    overflow: hidden;
    transition: all 0.1s ease;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}
.popup-background-frame {
    z-index: 1000;
    left: -1.5rem;
    top: -0;
    min-height: 6rem;
    max-height: 6rem;
    width: 32.5rem;
}
.background-frame:hover, .popup-background-frame:hover {
    max-height: 50rem;
    overflow: visible;
}
.background-frame h5, .popup-background-frame h5, .expandable-footer p {
    font-size: 1.0rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 0.5rem;
}
.background-frame p, .popup-background-frame p, .expandable-footer p {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    margin-bottom: 0.4rem;
}
.popup-background-frame-parent {
    position: relative;
}
.footer-box {
    position: absolute;
    bottom: 0.3rem;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--color-surface-alt);
    transition: all 0.4s ease;
    padding: 0.5rem;
    overflow: hidden;
}
.footer-box p {
    font-size: 0.8rem;
}
.footer-box:hover .hidden-footer {
    display: flex;
}
/*
.hidden-footer {
    position: relative;
    display: none;
    flex-direction: column;
    align-items: left;
    justify-content: left;
    gap: 0.2rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
}
.hidden-footer h5 {
    font-size: 1.0rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 0.5rem;
} */
.source {
    position: absolute;
    top: 0.5rem;
    right: 4rem;
    text-align: right;
}
/*
.calculation-section footer {
    position: absolute;
    bottom: 0.3rem;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background-color: var(--color-footer-bg);
    transition: all 0.3s ease;
} */

.popup-background-frame-parent .source {
    top: 1.5rem;
    right: 0rem;
    max-width: 4rem;
}
.ref {
    cursor: pointer;
    text-decoration: underline;
    display: inline-block;
}
.ref:hover {
    font-weight: 700;
}
#ref-tooltip {
    position: fixed;
    display: none;
    max-width: 30rem;
    padding: 0.4rem 0.6rem;
    background-color: var(--color-button-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 0.1875rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    line-height: 1.4;
    z-index: 9000;
    pointer-events: none;
}
#ref-tooltip a {
    color: var(--color-text-strong);
    text-decoration: none;
}

/* Calculator section 1-1: VA - Visual acuity conversion --------------------------------------------------------------------------------------------------------*/
.va-content {
    margin-top: 3.5rem;
    display: grid;
    grid-template: 1.25rem 1.25rem / 7.5rem 7.5rem 7.5rem 7.5rem;
    grid-gap: 0.625rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    align-items: center;
}
.va-content input {
    width: 7.5rem;
}
#va-section .footer-box {
    height: 2rem;
}

/* Calculator section 1-2: TCY - Turn cylinder */
.tcy-form {
    margin-top: 2.5rem;
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem/ 3.75rem 3.75rem 3.125rem 1.5rem 10.6rem 11rem;
    grid-gap: 0.125rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding-left: 0.6rem;
}
.tcy-form input[type="radio"] {
    width: 0.9rem;
    height: 0.9rem;
    margin-left: 0.4rem;
    margin-top: 0.2rem;
}
.tcy-radio-label {
    font-size: 0.85rem;
    text-align: left;
}
.tcy-result-label {
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

/* Calculator section 1-3: SPE - Spherical equivalent */
.spe-content {
    margin-top: 2.25rem;
    display: flex;
}
.spe-input-container {
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem/ 5rem 5rem;
    grid-gap: 0.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding-left: 2.2rem;
}
.spe-input-container input {
    width: 5rem;
}
.spe-result-container {
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem/ 10rem;
    grid-gap: 0.125rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    padding-left: 3rem;
}
#spe-section .calculate-button {
    margin-left: 1.5rem;
    z-index: 1;
}
#spe-section .footer-box {
    height: 2rem;
    padding-left: 10rem;
}

/* Calculator section 2-1: VCA - Vertex calculator */
.vca-form {
    margin-top: 2.3125rem;
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem 1.25rem/ 3.75rem 3.75rem 3.125rem 2rem 11rem 9rem;
    grid-gap: 0.125rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding-left: 0.6rem;
}
.vca-form .vertex-result-label {
    font-weight: 700;
    font-size: 1rem;
    padding-left: 1rem;
}
#vca-section .footer-box {
    height: 2.8rem;
    width: 65%;
    margin-left: 32.5%;
    bottom: 0.5rem;
}

/* Calculator section 2-2: VCH - Vertex chart */
.vch-form {
    margin-top: 2.8rem;
    display: flex;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding-left: 2rem;
    width: 100%;
}
.vch-form-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 5rem;
    margin-right: 2rem;
}
.vch-form-item input {
    width: 5rem;
}
#vch-section .calculate-button {
    position: static;
    margin-top: 1rem;
}
#vch-chart {
    margin-top: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    width: 95%;
    margin-left: 2.5%;
    height: auto;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 0.25rem;
    border: 1px solid #aaa;
}
#vch-chart:hover {
    border: 1px solid #777;
    background-color: #eee;
}
#vch-place-filler {
    height: 3rem;
}
#vch-chart h2 {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    padding: 0.25rem;
    padding-right: 1.5rem;
    margin-left: 2.5rem;
}
#vch-chart h3 {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.25rem;
    border-bottom: 1px solid #ccc;
}
#vch-section {
    height: auto;
    min-height: 9.875rem;
}
#vch-section .footer-box {
    height: 2rem;
    position: static;
    margin-top: 2rem;
}

/* Calculator section 3-1: EPD - Decentration */
#epd-section {
    height: 12rem;
    position: relative;
    overflow: visible;
}
.epd-form {
    margin-top: 2.7rem;
    margin-left: 1rem;
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem 2rem 1.1rem 1.1rem / 3.75rem 3.75rem 0.6rem 2rem 0.6rem 2.3rem 0.6rem 2.8rem 5rem 7.3rem 4rem;
    gap: 0.125rem 0.1rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.epd-form input[type="text"] {
    width: 3.75rem;
    align-self: left;
    justify-self: left;
}
.epd-form input[type="radio"] {
    width: 0.7rem;
    height: 0.7rem;
    margin-top: 0.3rem;
}
#epd-error1, #epd-error2 {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: left;
    justify-self: left;
    align-self: left;
    padding-left: 0.7rem;
    overflow: visible;
    white-space: nowrap;
}
.epd-form label {
    text-align: left;
    align-self: left;
    justify-self: left;
}
#epd-direction-label {
    grid-column: 1 / span 11;
    text-align: left;
    justify-self: left;
    align-self: left;
    padding-left: 1rem;
    margin-top: 0.5rem;
}
.epd-direction-radio {
    justify-self: end;
    margin-right: 0.5rem;
/*    grid-column: 1 / span 2; */
}
.epd-direction-radio-label {
    grid-column: 2 / span 10;
    text-align: left;
    justify-self: left;
    align-self: left;
}
#epd-section .footer-box {
    width: 63%;
    max-height: 4.2rem;
    margin-left: 35%;
    border-left: 1px solid var(--color-border);
    padding: 0.5rem;
    bottom: auto;
    top: 7rem;
    z-index: 100;
}
#epd-section .footer-box p {
    width: 100%;
    text-align: left;
    margin-bottom: 0.2rem;
}
#epd-section .expand-arrow {
    position: absolute;
    top: 3rem;
    right: 0rem;
    opacity: 0.7;
}
#epd-section .footer-box:hover {
    max-height: 20rem;
    height: 20rem;
}
#epd-section .footer-box:hover .expand-arrow {
    display: none;
}
#epd-section .background-frame {
    min-height: 10.8rem;
    max-height: 10.8rem;
}


/* Calculator section 3-2: MAX - Maximum decentration */
#max-section {
    z-index: 1;
    position: relative;
    height: 12rem;
}
.max-form {
    margin-top: 2.7rem;
    margin-left: 1rem;
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem 2rem 1.1rem 1.1rem / 3.75rem 3.75rem 0.6rem 2rem 0.6rem 2.3rem 0.6rem 2.8rem 7.3rem 9.3rem;
    gap: 0.125rem 0.1rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.max-form input[type="text"] {
    width: 3.75rem;
}
.max-form input[type="radio"] {
    width: 0.7rem;
    height: 0.7rem;
    margin-top: 0.3rem;
}
.max-form label {
    text-align: left;
}
#max-direction-label {
    grid-column: 1 / span 10;
    text-align: left;
    justify-self: left;
    align-self: left;
    padding-left: 1rem;
    margin-top: 0.5rem;
}
.max-direction-radio {
    justify-self: end;
    margin-right: 0.5rem;
}
.max-direction-radio-label {
    grid-column: 2 / span 9;
    text-align: left;
    justify-self: left;
    align-self: left;
}
.max-result-label {
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    font-size: 0.9rem;
}
#max-section .calculate-button {
    left: 19.2rem;
    bottom: 5.5rem;
    width: 6rem;
    font-size: 0.95rem;
    padding-top: 0.2rem;
}
#max-section .footer-box {
    width: 63%;
    max-height: 4.2rem;
    margin-left: 35%;
    border-left: 1px solid var(--color-border);
    padding: 0.5rem;
    bottom: auto;
    top: 7rem;
    z-index: 100;
}
#max-section .footer-box p {
    width: 100%;
    text-align: left;
    margin-bottom: 0.2rem;
}
#max-section .expand-arrow {
    position: absolute;
    top: 3rem;
    right: 0rem;
    opacity: 0.7;
}
#max-section .footer-box:hover {
    max-height: 15rem;
    height: 15rem;
}
#max-section .footer-box:hover .expand-arrow {
    display: none;
}
#max-section .background-frame {
    min-height: 10.8rem;
    max-height: 10.8rem;
}
#max-section .background-frame:hover {
    max-height: 50rem;
    overflow: visible;
}

/* Calculator section 4: PRI - Price calculator */
#main-price {
    position: relative;
}
.discount-radio-container {
    width: 9rem;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    margin-bottom: 0.5rem;
    border: 1px solid var(--color-border);
    padding: 0.1rem 0.2rem;
    gap: 0.5rem;
    background-color: var(--color-small-box);
    transition: background-color 0.3s ease;
}
.discount-radio-container > *:first-child {
    grid-column: 1 / -1;
}
#main-price h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0rem;
    display: inline-block;
}
#main-price h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0rem;
    display: inline-block;
}
#pri-sidebar {
    width: 12rem;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 1rem;
    transition: background-color 0.4s ease;
    position: absolute;
    right: -12.5rem;
    top: 0;
}
#pri-sidebar:hover {
    background-color: var(--color-button-bg);
}
#pri-sidebar p {
    width: 80%;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: #fff;
    padding: 0.2rem 0.2rem;
    border-radius: 0.1875rem;
    border: 1px solid #ccc;
}
#pri-include-panel {
    width: 60%;
    display: none;
    flex-direction: column;
    align-items: left;
    justify-content: left;
    gap: 0.2rem;
    margin-top: 1.5rem;
    border: 1px solid var(--color-border);
    padding: 0.2rem 0.2rem;
    border-radius: 0.1875rem;
    background-color: var(--color-small-box);
    transition: background-color 0.3s ease;
}
#pri-sidebar:hover #pri-include-panel {
    background-color: var(--color-small-box-hover);
}
#pri-include-panel label {
    font-size: 1.1rem;
    font-weight: 600;
}
.pri-include-checkbox-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: left;
    gap: 0.2rem;
    margin-left: 2rem;
}
#pri-space-filler1, #pri-space-filler2 {
    height: 10rem;
}
.pri-glasses-section, .pri-cl-section {
    width: 100%;
    height: 15rem;
    background-color: var(--color-surface-alt);
    border: 2px inset var(--color-border-strong);
    margin-bottom: 1.25rem;
    transition: background-color 0.4s ease;
    position: relative;
}
.pri-glasses-section:hover, .pri-cl-section:hover {
    background-color: var(--color-surface-hover);
/*    background-color: #a2e6b4;*/
}
.pri-glasses-section:hover .discount-radio-container, .pri-cl-section:hover .discount-radio-container {
    background-color: var(--color-small-box-hover);
/*    background-color: #b7e8c3;*/
}
.pri-section-title {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    position: absolute;
    top: 0.7rem;
    right: 2.7rem;
}
.pri-section-title h2 {
    position: static;
}
.pri-section-title input {
    width: 14rem;
    height: 1.6rem;
    background-color: #fff;
}
.pri-content-holder {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-left: 1rem;
}
.pri-glasses-left-side {
    width: 70%;
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem 1.25rem 1.25rem 1.25rem 1.25rem 1.25rem 1.25rem / 2fr 1fr 1fr 1fr;
    grid-gap: 0rem;
    margin-top: 2.2rem;
}
.pri-glasses-right-side {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 2.2rem;
}
.pri-cl-upper-side {
    width: 90%;
    margin-top: 0.5rem;
    margin-left: 1rem;
    display: grid;
    grid-template: 1.25rem 1.25rem 1.25rem 1.25rem 1.25rem 1.25rem / 3fr 0.75fr 0.5fr 0.75fr 1fr;
    grid-gap: 0rem;
    margin-top: 2.4rem;
}
.pri-cl-bottom-left-side {
    width: 70%;
}
.pri-cl-bottom-right-side {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -0.5rem;
}
.pri-nav-button {
    width: 8.125rem;
    height: 1.875rem;
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    border-radius: 0.1875rem;
    background-color: var(--color-button-bg);
    border: 1px solid var(--color-border-strong);
    transition: background-color 0.3s ease;
    padding-top: 0.12rem;
    cursor: pointer;
}
.pri-nav-button:hover {
    background-color: var(--color-accent);
}
.pri-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: -0.5rem;
}

/* STV - Standard values */
#main-standard-values {
    position: relative;
    height: auto;
}
#stv-standard-values {
    height: auto;
    text-align: left;
    background-color: #e9e9e9;
}
#stv-standard-values:hover {
    background-color: #e9e9e9;
}
#stv-thumb-line {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--color-text-muted);
    background-color: #e9e9e9;
    margin-top: 1rem;
    gap: 0.2rem;
}
#stv-thumb-line-whole, #stv-thumb-line-anterior, #stv-thumb-line-div, #stv-thumb-line-refraction, #stv-thumb-line-equations {
    width: 6rem;
    height: auto;
    cursor: pointer;
}
#stv-thumb-line-whole:hover, #stv-thumb-line-anterior:hover, #stv-thumb-line-div:hover, #stv-thumb-line-refraction:hover, #stv-thumb-line-equations:hover {
    transform: scale(1.1);
    border: 2px solid var(--color-accent-strong);
}
#stv-thumb-line-whole:active, #stv-thumb-line-anterior:active, #stv-thumb-line-div:active, #stv-thumb-line-refraction:active, #stv-thumb-line-equations:active {
    border: 2px solid var(--color-accent-strong);
    transform: scale(0.98);
}
#stv-whole {
    width: 100%;
    min-height: 25rem;
    margin: 1rem 0rem 1.5rem 0rem;
    background-color: #e9e9e9;
    position: relative;
    cursor: pointer;
}
#stv-whole-bulbus {
    position: absolute;
    top: 0rem;
    left: 9rem;
    scale: 0.8;
}
#stv-whole-cornea {
    position: absolute;
    top: 3.9rem;
    left: 6.4rem;
    scale: 0.8;
}
#stv-whole-lens {
    position: absolute;
    top: 7rem;
    left: 10.84rem;
    z-index: 400;
    transform: scale(0.65, 0.85);
    transition: transform 0.4s ease;
    z-index: 499;
}
#stv-whole-lens.is-pulsed {
    transform: scale(0.8);
}
#stv-whole-iris {
    position: absolute;
    top: 3.7rem;
    left: 5.05rem;
    scale: 0.8;
    transition: all 0.4s ease;
}
#stv-whole-iris.is-pulsed {
    transform: scale(1.15, 0.975);
}
#stv-whole-ciliarybody {
    position: absolute;
    top: 2.4rem;
    left: 11.7rem;
    scale: 0.8;
    transition: transform 0.3s ease;
    z-index: 500;
}
#stv-whole-ciliarybody.is-pulsed {
    transform: scale(0.8, 1.01);
}
#stv-whole-zonula {
    position: absolute;
    top: 4.5rem;
    left: 12rem;
    transform: scale(0.7, 0.8);
    transition: transform 0.3s ease;
    z-index: 490;
}
#stv-whole-zonula.is-pulsed {
    transform: scale(0.8);
}
#stv-whole-axiallength {
    position: absolute;
    top: 12.4rem;
    left: 4.2rem;
    scale: 0.8;
    opacity: 0.3;
    z-index: 501;
}
#stv-whole-anteriorchamberdepth {
    position: absolute;
    top: 11rem;
    left: 6.7rem;
    scale: 0.8;
    opacity: 0.3;
    z-index: 500;
}
#stv-whole-lensthickness {
    position: absolute;
    top: 13.5rem;
    left: 10.9rem;
    scale: 0.8;
    opacity: 0.3;
    z-index: 500;
}
#stv-whole-pupildiameter {
    position: absolute;
    top: 10.2rem;
    left: 10.6rem;
    scale: 0.8;
    opacity: 0.3;
    z-index: 500;
}
#stv-whole-angledegrees {
    position: absolute;
    top: 17.8rem;
    left: 10.1rem;
    scale: 0.8;
    opacity: 0.3;
    z-index: 500;
}
#stv-whole-globeheight {
    position: absolute;
    top: 0.1rem;
    left: 19.5rem;
    scale: 0.8;
    opacity: 0.3;
    z-index: 500;
}
#stv-whole-conjunctiva {
    position: absolute;
    top: 2.3rem;
    left: 9.1rem;
    scale: 0.8;
    opacity: 0.3;
    z-index: 400;
}
#stv-whole-retina {
    position: absolute;
    top: 6rem;
    left: 28rem;
    scale: 0.55;
    z-index: 500;
}
#stv-whole-retina:hover {
    transform: scale(1.4);
}
#stv-whole-vitreousdepth {
    position: absolute;
    top: 10rem;
    left: 11.5rem;
    scale: 0.8;
    opacity: 0.3;
    width: 21rem;
    z-index: 500;
}
#stv-whole-corneacloseup {
    position: absolute;
    top: 6.2rem;
    left: 8.6rem;
    transform-origin: top left;
    transform: scale(0.15);
    z-index: 500;
    transition: all 0.3s ease;
}
#stv-whole-corneacloseup:hover {
    transform: scale(0.3);
    top: 5.5rem;
    left: 7.5rem;
}
#stv-whole-tearfilm {
    position: absolute;
    top: 14rem;
    left: 5.9rem;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 500;
    opacity: 0.3;
}
#stv-whole-tearfilm:hover {
    transform: scale(1.05);
    top: 14rem;
    left: 5.9rem;
    opacity: 1;
}
#stv-whole-info, #stv-anterior-info {
    display: none;
    position: relative;
    width: 100%;
    height: auto;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    color: var(--color-text-strong);
    background-color: var(--color-bg);
    border: 1px solid var(--color-text-muted);
    padding: 0rem 1rem 1rem 1rem;
    z-index: 500;
    cursor: default;
}
#stv-whole::before {
    content: "";
    display: block;
    height: 24rem;
}
#stv-whole-info {
    width: 90%;
    margin-left: 1.7rem;
}
#stv-standard-values h3 {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    padding-left: 1.5rem;
    border-bottom: 1px solid var(--color-text-muted);
}
#stv-standard-values h4 {
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    width: auto;
    margin: 1rem 0 0.5rem 0;
    padding-left: 1.5rem;
    border-bottom: 1px solid var(--color-text-muted);
}
#stv-standard-values h5 {
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    width: auto;
    margin: 0.3rem 0 0.2rem 0;
    padding-left: 1.5rem;
    border-bottom: 1px solid var(--color-text-muted);
}
#stv-standard-values p {
    margin-top: 0.5rem;
    width: 90%;
    font-size: 0.95rem;
}
#stv-standard-values footer {
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    padding-left: 1rem;
}
#etdrs-grid {
    width: 90%;
    margin-top: 1rem;
    margin-left: 1rem;
    height: auto;
}
.etdrs-cell-text {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    justify-self: center;
    align-self: center;
    pointer-events: none;
}
#etdrs-grid-info-box {
    width: 98%;
    margin-left: 1%;
    margin-top: 1rem;
    background-color: var(--color-small-box);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    padding: 0.25rem 0.5rem 0.7rem 0.5rem;
    border: 1px solid var(--color-border);
    position: relative;
    min-height: 3rem;
}
#etdrs-grid-info-box .source {
    top: 0rem;
    right: 2.5rem;
}
.etdrs-grid-info-box-item {
    display: none;
}
#etdrs-grid-info-box-intro {
    display: block;
}
#stv-anterior-frame {
    display: none;
    width: 90%;
    min-height: 25rem;
    margin: 1rem 0rem 1.5rem 1.7rem;
    background-color: #e9e9e9;
    position: relative;
    cursor: pointer;
}
#stv-anterior-image {
    height: 24.5rem;
    width: auto;
    padding-left: 1.5rem;
}
#stv-anterior-hvid {
    position: absolute;
    top: 10rem;
    left: 7.05rem;
    scale: 0.91;
    opacity: 0.3;
    z-index: 500;
}
#stv-anterior-pupildiameter {
    position: absolute;
    top: 8rem;
    left: 20rem;
    scale: 0.91;
    opacity: 0.3;
    z-index: 500;
}
#stv-anterior-globe {
    position: absolute;
    top: -3.1rem;
    left: 0.8rem;
    scale: 0.91;
    opacity: 0.05;
    z-index: 2;
}
#stv-anterior-transverse {
    position: absolute;
    top: 14rem;
    left: 1.2rem;
    scale: 0.91;
    opacity: 0.3;
    z-index: 500;
}
#stv-whole-axiallength:hover, #stv-whole-anteriorchamberdepth:hover, #stv-whole-vitreousdepth:hover, #stv-whole-lensthickness:hover, #stv-anterior-hvid:hover, #stv-anterior-transverse:hover {
    opacity: 1;
    transform: scale(1, 1.8);
    z-index: 501;
}
#stv-whole-pupildiameter:hover, #stv-whole-globeheight:hover, #stv-anterior-pupildiameter:hover {
    opacity: 1;
    transform: scale(1.8, 1);
}
#stv-whole-angledegrees:hover {
    opacity: 1;
    scale: 1.8;
}
#stv-whole-conjunctiva:hover {
    opacity: 1;
    scale: 1.2;
}
/*
#stv-refraction-frame {
    display: none;
    width: 100%;
    height: auto;
} */
#stv-refraction-frame, #stv-div-frame, #stv-equations-frame {
    margin: 1rem 0rem 1.5rem 0rem;
    display: none;
    position: relative;
    height: auto;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    width: 100%;
    color: var(--color-text-strong);
    padding: 0.5rem 1rem 1rem 1rem;
    cursor: default;
}

#stv-footer {
    position: absolute;
    width: 20rem;
    top: 0rem;
    left: 37rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    background-color: var(--color-surface-alt);
}
#stv-footer p {
    margin-bottom: 0.5rem;
}


/* Calculator section 5-1: DCO - Conversion meter, feet, inches */
.dco-content {
    display: flex;
    flex-direction: row;
    margin-top: 1rem;
    gap: 1rem;
}
.dco-content label {
    font-size: 1rem;
}
#dco-meter-input-container {
    width: 50%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-left: 1rem;
}
#dco-feet-input-container {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-right: 2rem;
}
.dco-form-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 5rem;
}
#feet-inches-separate-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 80%;
    gap: 1rem;
}
#feet-inches-combined-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 0.3fr 1fr 0.3fr;
    align-items: center;
    justify-content: center;
    gap: 0rem;
    border: 1px solid var(--color-border);
    padding: 0.2rem 0.5rem 0.5rem 0.5rem;
    border-radius: 0.1875rem;
    background-color: var(--color-small-box);
    transition: background-color 0.3s ease;
}
#feet-inches-combined-container > *:first-child {
    grid-column: 1 / -1;
}
#dco-section:hover #feet-inches-combined-container {
    background-color: var(--color-small-box-hover);
}
#feet-inches-combined-container input {
    margin-right: 0.2rem;
}
#dco-section .footer-box {
    height: 2rem;
    margin-right: 16rem;
}

/* Calculator section 5-2: WCO - Weight converter */
.wco-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 3.5rem;
    gap: 2rem;
}
.wco-content label {
    font-size: 1rem;
}
.wco-form-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 6rem;
}

/* Calculator section 5-3: VCO - Volume converter */
.vco-content {
    display: grid;
    grid-template: 1fr 1fr 1fr / 1fr 1fr 1fr 1fr;
    align-items: center;
    justify-content: center;
    margin-top: 0rem;
    margin-left: 1rem;
    margin-right: 1rem;
    gap: 0rem;
}
.vco-content label {
    font-size: 0.85rem;
}
.vco-form-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 6rem;
}
.vco-form-item label {
    margin-top: 0.1rem;
    line-height: 1.2;
}
.vco-form-item input {
    margin-top: 0;
}
#vco-section .footer-box {
    height: 1.5rem;
    background-color: transparent;
}

/* Calculator section 5-4: TCO - Temperature converter */
.tco-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 3.5rem;
    gap: 4rem;
}
.tco-form-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 6rem;
}
.tco-form-item label {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    justify-self: center;
    align-self: center;
}



/* Put in the end to avoid being overridden by other styles */
.calculate-button:hover {
background-color: var(--color-accent);
scale: 1.03;
}
.reset-button:hover, .x-button:hover, .background-button:hover, .popup-background-button:hover, .background-close-button:hover, .popup-background-close-button:hover {
    background-color: var(--color-accent) !important;
    scale: 1.1 !important;
}
.nav-button:active, .language-button:active, .calculate-button:active, .reset-button:active, .x-button:active, .background-button:active, .popup-background-button:active, .background-close-button:active, .popup-background-close-button:active, .pri-nav-button:active {
    background-color: var(--color-accent-strong) !important;
    transform: scale(0.99) !important;
}

.main-footer {
    width: 38rem;
    padding: 1.875rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    margin-top: 4rem;
    border-top: 1px solid var(--color-border);
}


