#vial-calculator-tool {
  max-width: 828px;
  margin: 0px auto;
  & > div[layoutalignment] {
    & div[contentalignment] {
      width: 100%;
      & .vial-calculator-container {
        & #global-error-banner {
          display: none;
          &.visible {
            display: block;
            padding-bottom: 12px;
            & p {
              font-family: Arial;
              font-weight: 400;
              font-size: 12px;
              line-height: 16px;
              color: rgb(228, 0, 48);
              margin-bottom: 4px;
            }
          }
        }
        & .patient-list {
          display: flex;
          flex-direction: column;
          & .patient-card {
            border: 2px solid rgb(255, 184, 0);
            overflow: visible;
            background: hsl(0, 0%, 100%);
            animation: 0.25s ease 0s 1 normal none running slideIn;
            box-sizing: border-box;
            margin-top: 40px;
            scroll-margin-top: 52px;
            @media screen and (min-width: 768px) {
              border-radius: 10px;
              padding: 2px;
            }
            & .patient-wrapper {
              background-color: rgb(250, 250, 248);
              padding: 32px 30px;
              display: flex;
              flex-direction: column;
              row-gap: 10px;
              @media screen and (min-width: 768px) {
                padding: 32px 28px 22px;
              }
              & .patient-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                & .patient-header-title {
                  color: rgb(122, 37, 164);
                }
                & .patient-header-actions {
                  display: flex;
                  flex-direction: row;
                  column-gap: 10px;
                  @media screen and (min-width: 768px) {
                    column-gap: 24px;
                  }
                  & .btn-reset,
                  & .btn-remove {
                    background: none;
                    border: none;
                    cursor: pointer;
                    display: flex;
                    align-items: center;
                    gap: 4px;
                    padding: 0px;
                    font-family: Arial;
                    font-weight: 400;
                    font-size: 16px;
                    line-height: 24px;
                    letter-spacing: 0px;
                    text-align: right;
                    vertical-align: middle;
                    color: rgb(146, 24, 175);
                    &:hover {
                      text-decoration: underline;
                    }
                  }
                }
              }
              & .btn-reset {
                color: rgb(92, 15, 139);
              }
              & .btn-remove {
                color: rgb(192, 0, 60);
              }
              & .patient-inputs {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
                gap: 32px;
                @media (max-width: 540px) {
                  grid-template-columns: 1fr;
                }
                & .field-group {
                  display: flex;
                  flex-direction: column;
                  gap: 2px;
                }
                & .field-label {
                  font-family: Arial;
                  font-weight: 400;
                  font-size: 16px;
                  line-height: 24px;
                  letter-spacing: 0px;
                  & .asterisk {
                    color: rgb(228, 0, 48);
                  }
                  & sup {
                    font-size: 75%;
                  }
                  & .material-symbols-outlined {
                    font-style: normal;
                    color: rgb(84, 79, 64);
                    font-size: 12px;
                  }
                  & .info-icon {
                    display: inline-block;
                    width: 14px;
                    height: 14px;
                    border: 1.5px solid rgb(92, 15, 139);
                    border-radius: 50%;
                    text-align: center;
                    line-height: 11px;
                    font-size: 0.6rem;
                    color: rgb(92, 15, 139);
                    cursor: help;
                    margin-left: 2px;
                    vertical-align: middle;
                  }
                }
                & .field-label.error {
                  color: rgb(228, 0, 48);
                  & .asterisk {
                    color: rgb(228, 0, 48);
                  }
                  & .material-symbols-outlined {
                    color: rgb(228, 0, 48);
                  }
                }
                & .patient-input {
                  height: 56px;
                  border-radius: 8px;
                  background-color: rgb(255, 255, 255);
                  border: 2px solid rgb(213, 209, 206);
                  padding: 16px;
                  font-family: Arial;
                  font-weight: 400;
                  font-size: 16px;
                  line-height: 24px;
                  letter-spacing: 0px;
                  &:focus {
                    border-color: rgb(92, 15, 139);
                  }
                  &.error {
                    border-color: rgb(228, 0, 48);
                    background: rgb(255, 245, 248);
                  }
                }
                & .field-error {
                  font-family: Arial;
                  font-weight: 400;
                  font-size: 12px;
                  line-height: 16px;
                  color: rgb(228, 0, 48);
                  &.visible {
                    margin-top: 8px;
                    display: block;
                    @media screen and (min-width: 768px) {
                      margin-top: 10px;
                    }
                  }
                }
              }
            }
            & .patient-results {
              background: rgb(255, 241, 204);
              padding: 32px 24px 32px 32px;
              display: flex;
              flex-direction: column;
              row-gap: 24px;
              @media screen and (min-width: 768px) {
                padding: 32px 26px 45px 32px;
              }
              & .result-section {
                display: flex;
                flex-direction: column;
                row-gap: 10px;
                & .result-section-title {
                  color: rgb(122, 37, 164);
                }
                & .result-row {
                  display: flex;
                  align-items: center;
                  gap: 16px;
                  & .result-box {
                    height: 56px;
                    background: rgba(84, 79, 64, 0.08);
                    border: 2px solid rgb(213, 209, 206);
                    border-radius: 8px;
                    padding: 16px;
                    font-family: Arial;
                    font-weight: 400;
                    font-size: 16px;
                    line-height: 24px;
                    &.result-dilution,
                    &.result-waste {
                      width: 225px;
                    }
                    &.result-120mg,
                    &.result-400mg {
                      width: 100px;
                    }
                    @media screen and (min-width: 768px) {
                      &.result-dilution,
                      &.result-waste,
                      &.result-120mg,
                      &.result-400mg {
                        width: 300px;
                      }
                    }
                  }
                  & .result-unit {
                    font-family: Arial;
                    font-size: 16px;
                    line-height: 24px;
                    font-weight: 700;
                  }
                }
              }
              & .result-section:nth-child(2) {
                row-gap: 24px;

                @media screen and (min-width: 768px) {
                  row-gap: 19px;
                }
              }
            }
          }
          & .patient-card.has-data {
            & .patient-results {
              & .result-box {
                background-color: rgb(255, 255, 255) !important;
              }
            }
          }
        }
        & .calculator-actions {
          display: flex;
          gap: 24px;
          padding: 16px 0px 40px;
          @media screen and (min-width: 768px) {
            justify-content: flex-end;
            padding: 40px 0px 56px;
          }
          & button {
            flex: 1 1 0%;
            min-width: 0px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            letter-spacing: 1.5px;
            gap: 8px;
            border-radius: 24px;
            font-weight: 700;
            font-size: 12px;
            line-height: 16px;
            text-transform: uppercase;
            box-sizing: border-box;
            @media screen and (min-width: 768px) {
              height: 40px;
              max-width: 162px;
            }
            & .material-symbols-outlined {
              font-style: normal;
              font-size: 20px;
            }
          }
          & .btn-add-patient {
            color: rgb(146, 24, 175);
            border: 2px solid rgb(146, 24, 175);
            background-color: rgb(255, 255, 255);
            font-family: Arial;
            &:hover {
              background: rgb(243, 232, 255);
            }
          }
          & .btn-total-vials {
            color: rgb(255, 255, 255);
            background-color: rgb(146, 24, 175);
            border: 2px solid transparent;
            font-family: Arial;
            &:hover {
              background: rgb(122, 27, 191);
            }
          }
        }
        & .totals-footer {
          border: none;
          border-radius: 8px;
          background-color: rgb(255, 241, 204);
          padding: 24px 17px 40px;
          display: flex;
          row-gap: 24px;
          flex-direction: column;
          scroll-margin-top: 52px;
          @media screen and (min-width: 768px) {
            flex-direction: row;
            padding: 40px 0px 40px 35px;
            align-items: center;
            column-gap: 40px;
          }
          & .icon-text-wrapper {
            display: flex;
            flex-direction: row;
            gap: 16px;
            @media screen and (min-width: 768px) {
              max-width: 478px;
            }
            & img {
              width: 40px;
              height: 40px;
              @media screen and (min-width: 768px) {
                margin-top: 6px;
                width: 104px;
                height: 104px;
              }
            }
            & .totals-text {
              & h4 {
                color: rgb(122, 37, 164);
                margin-bottom: 12px;
              }
            }
          }
          & .totals-vials {
            display: flex;
            flex-direction: column;
            gap: 24px;
            & .totals-vial-row {
              display: flex;
              align-items: center;
              gap: 16px;
              & .totals-vial-box {
                width: 100px;
                height: 56px;
                background: rgba(84, 79, 64, 0.08);
                border: 2px solid rgb(213, 209, 206);
                border-radius: 8px;
                padding: 16px;
                font-family: Arial;
                font-weight: 400;
                font-size: 16px;
                line-height: 24px;
              }
              & .totals-vial-box.error {
                border-color: rgb(228, 0, 48) !important;
                background-color: rgb(255, 245, 248) !important;
              }
              & .totals-vial-label {
                font-family: Arial;
                font-weight: 700;
                font-size: 16px;
                line-height: 24px;
                & span {
                  font-family: Arial;
                  font-weight: 400;
                  font-size: 12px;
                  line-height: 16px;
                  display: block;
                }
              }
            }
          }
        }
      }
    }
  }
}
@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

.field-popover {
  position: absolute;
  z-index: 1;
  background: rgba(239, 239, 237, 1);
  border-radius: 8px;
  padding: 8px 36px 8px 12px;
  box-sizing: border-box;
  pointer-events: auto;

  & .field-popover-text {
    font-family: Arial;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: -0.15px;
    color: #544f40;
    display: block;
  }

  & .field-popover-close {
    position: absolute;
    top: 8px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #544f40;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    &:hover {
      color: rgb(30, 28, 20);
    }
  }

  & .field-popover-arrow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgb(240, 240, 238);
  }
}
