* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'SF Pro Display', sans-serif;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    width: 100%;
    display: flex;
    background-color: #333;
    padding: .8rem 0rem;
}

.headerText {
    width: 100%;
    max-width: 1000px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

.headerText h2 {
    font-size: 2rem;
    font-style: italic;
    color: white;
    font-weight: 550;
}

.main {
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.heading {
    position: relative;
    display: flex;
    justify-content: center;
    width: clamp(280px, 80%, 1000px);
    align-items: center;
    flex-direction: column;
    font-family: 'Inter', 'SF Pro Display', sans-serif;
    margin: 1rem auto;
}

.heading h2{
    font-size: clamp(1.155rem, 2.926vw, 2.156rem);
    line-height: 1.5;
    letter-spacing: 1.2px;
    font-weight: 550;
}
  
.heading p{
    font-size: clamp(0.462rem, 1.186vw, .9rem);
    color: #505051;
    font-weight: 300;
}

.midSection {
    display: flex;
    flex-direction: column;
    max-width: 1024px;
    margin-left: 1rem;
    border: 1px solid #ccc;
    border-radius: 2px;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.midTop {
    display: flex;
    flex-direction: row;
    width: clamp(280px, 100%, 1024px);
    margin-left: auto;
    align-items: center;
    justify-content: center;
    padding-bottom: 1rem;
}

.formSection {
    display: flex;
    flex-direction: column;
    padding: 2vw 0vw 2vw 2vw;
    /* width: 100%; */
}  

.unitToggle {
    display: flex;
    margin-bottom: 1vw;
}
  
.pill {
    padding: .8rem 1.5rem;
    border: none;
    cursor: pointer;
    background-color: #eee;
    color: #333;
    font-weight: 400;
    transition: background-color 0.2s, color 0.2s;
}
  
.pill.active {
    background-color: #333;
    color: #fff;
}

.formItems {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5vw;
}

.formItems p {
    font-size: clamp(0.6, 1.386vw, 1.016rem);
    margin-bottom: .4rem;
    font-weight: 300;
}

.formItems input {
    padding: 12px 0px;
    border: 1px solid #ccc; 
    text-align: left;
    font-size: clamp(0.6, 1.386vw, 1.016rem);
    font-weight: 300;
    padding-left: .7rem;
    width: 30vw;
    color: black;
    min-width: 280px;
    max-width: 600px;
}

.formItemsHeight {
    max-width: 30vw;
    min-width: 285px;
    margin-bottom: 1.5vw;
}

.formItemsHeight  input{
    width: 14.7vw;
    padding: 12px 0px;
    border: 1px solid #ccc; 
    text-align: left;
    font-size: clamp(0.6, 1.386vw, 1.016rem);
    font-weight: 300;
    padding-left: .7rem;
    color: black;
    min-width: 138px;
}

.formItemsHeight p {
    font-size: clamp(0.6, 1.386vw, 1.016rem);
    margin-bottom: .4rem;
    font-weight: 300;
}

.genderSelect {
    display: flex;
}
  
.radioPill input[type="radio"] {
    display: none;
}
  
.radioPill span {
    display: inline-block;
    padding: .8rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #eee;
    font-weight: 400;
}
  
.radioPill input[type="radio"]:checked + span {
    background-color: #333;
    color: white;
    border-color: #333;
}

.buttonSection {
    display: flex;
    flex-direction: row;
    margin-top: 2rem;
    gap: 1rem;
    margin-left: auto;
    margin-right: auto;
    /* font-size: 3vw; */
}

.btnSecBtn {
    font-family: 'Inter', 'SF Pro Display', sans-serif;
    padding: 1rem 2.2rem;
    font-size: 1.2rem;
    background-color: #333333;
    color: white;
    border: none;
    border-radius: 2px;
}

.btnSecBtn:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 5px #aaaaaa;
}

.resultSection {
    margin: 0rem 3vw;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 340px;
    margin-top: 2vw;
    border: none;
    border-radius: 4px;
}

.resultSection h3 {
    font-size: clamp(1rem, 1.386vw, 1.016rem);
    color: #626366;
    font-weight: 500;
    line-height: 1.3;
    font-weight: 500;
}

.resultText {
    margin-top: 1rem;
    font-size: 1.6rem;
}

.resultBMIContainer {
    display: flex;
    flex-direction: row;
    margin-top: 2rem;
}

.resultBMI {
    font-size: 3rem;
    font-weight: 550;
    color: black;
}

.resultBMISpecifier {
    margin-top: auto;
    margin-bottom: .5rem;
    margin-left: .3rem;
}

.bulletPoints {
    padding: 1rem 2rem;
    font-size: .8rem;
}

.lineBreak {
    position: relative;
    max-width: 100%;
    height: 1px;
    background-color: #ccc;
    margin: 0rem 2rem;
}
  
.infoSection {
    width: 70vw;
    display: flex;
    flex-direction: column;
    max-width: 1024px;
    margin-top: 1rem;
    /* padding: 0vw 2vw; */
    padding-left: 1vw;
    padding-right: 1vw;
    min-width: 680px;
}

.infoSection h2 {
    margin: 1rem 0rem;
}

.infoSection h3 {
    margin: .5rem 0rem;
    font-size: .95rem;
}

.infoSection p {
    font-size: 1rem;
    font-weight: 300;
}

.infoSection ul {
    padding: 1rem 2rem;
}

.infoSection li {
    font-weight: 300;
}

.infoSection a {
    font-size: 1rem;
    padding: 5px;
}

.bmiChartAdults {
    width: 100%;
    max-width: 500px;
    margin: 0rem auto;
    min-width: 200px;
}

.table {
    width: 80%;
    border-collapse: collapse;
    border: 2px solid #ccc;
    margin: .5rem auto;
    max-width: 320px;
  }

.bmiPrime {
    width: 95%;
}
  
  .table th, .table td {
    border: 1px solid #ccc;
    padding: 2px;
    text-align: left;
  }
  
  .table th {
    background-color: black;
    color: white;
  }
  
  .table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
  }

.table td:nth-child(2),
.bmi-table th:nth-child(2) {
  text-align: center;
}

.table td:nth-child(3),
.bmi-table th:nth-child(3){
    text-align: center;
}

.popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: sans-serif;
  }
  
  .popup-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    position: relative;
    text-align: center;
    width: 300px;
  }
  
  .close {
    position: absolute;
    top: 10px; right: 15px;
    cursor: pointer;
    font-size: 1.5rem;
  }
  
  .loader {
    margin: 20px auto;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
  }

  .blur {
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

@media (max-width: 650px) {
    .heading {
        margin: .2rem auto;
    }
    .heading h2{
      font-size: 1.5rem;
      font-weight: 700;
    }
  
    .heading p{
      display: none;
    }

    .midSection {
        width: 99%;
        margin-left: 0rem;
        padding-bottom: 1rem;
    }

    .midTop {
        flex-direction: column;
        padding-bottom: 1rem;
    }

    .formSection {
        padding-right: 2vw;
        width: 100%;
    }

    .formItems input {
        padding: 12px 0px;
        padding-left: .7rem;
        width: 100%;
    }

    .formItemsHeight {
        width: 100%;
    }

    .formItemsHeight  input{
        width: 49%;
        font-weight: 300;
        padding-left: .7rem;
        color: black;
    }

    .bulletPoints {
        margin: 1rem 2rem;
        font-size: 1rem;
    }

    .infoSection {
        width: 98%;
        /* padding: 0rem 1rem; */
        min-width: 280px;
    }

    .infoSection h2 {
        font-size: 1rem;
    }

    .resultSection {
        padding-top: 1.5rem;
        width: 100%;
        /* border-color: green; */
        border: 1px solid black;
        box-shadow: none;
    }
}