.bsa-card {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0ebff 100%);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 2.5rem;
}

.bsa-unit-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.bsa-unit-btn {
    padding: 0.9rem 4rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 500;
    font-family: "Roboto Slab", serif;
    text-transform: uppercase;
    color: #000;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.bsa-unit-btn.active {
    background: linear-gradient(135deg, #0F2BC9 0%, #667eea 100%);
    color: #fff;
}

.bsa-input-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.bsa-input-field {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    flex: 1;
}

.bsa-input-field label {
    font-weight: 600;
    margin: 6px 0;
    color: #111;
}

.bsa-input-field input[type="number"] {
    width: 100%;
    padding: 13px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-weight: 400;
    font-family: "Roboto Slab", serif;
    font-size: 1rem;
    box-sizing: border-box;
    background: #fff;
}

.bsa-custom-select {
    position: relative;
    width: 100%;
}

.bsa-selected {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 400;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
}

.bsa-selected:after {
    content: "\25BC";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.bsa-items {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    display: none;
    max-height: 150px;
    overflow-y: auto;
}

.bsa-items div {
    padding: 10px;
    cursor: pointer;
    font-weight: 400;
}

.bsa-items div:hover {
    background-color: #f0f4ff;
}

.bsa-items.show {
    display: block;
}

.bsa-selected.bsa-active:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Metric / Imperial Inputs */
.bsa-input-field .bmi-height-imperial {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.bsa-input-field .bmi-height-imperial input {
    width: 100%;
    max-width: 120px;
}

.bsa-input-field .metric {
    display: block;
}

.bsa-input-field .imperial {
    display: none;
}

.bsa-height-imperial input {
    margin-right: 10px;
}

.bsa-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.bsa-calc-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #0F2BC9 0%, #667eea 100%);
    text-transform: uppercase;
    color: #fff;
    font-weight: 600;
    font-family: "Roboto Slab", serif;
    border: none;
    border-radius: 8px;
    width: 40%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.bsa-calc-btn:hover {
    transform: translateY(1px);
}

/* Result Card */
.bsa-result-card {
    max-width: 900px;
    margin: 1.75rem auto 0 auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    padding: 1.75rem;
    text-align: center;
}

.bsa-result-header h3 {
    font-size: 1.5rem;
    font-weight: 500;
    font-family: "Roboto Slab", serif;
    color: rgb(9, 119, 9);
    margin: 0;
}

/* Result Table */
.bsa-result-table {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin-top: 1rem;
}

.bsa-result-table th,
.bsa-result-table td {
    padding: 10px;
    border: 1px solid #ccc;
}

.bsa-result-table th {
    background-color: #0F2BC9;
    color: #ffffff;
    font-weight: 500;
    font-family: "Roboto Slab", serif;
}

/* Input adjustments */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}


/***** Media Query *****/
/***** Tablets in portrait & smaller laptops (≤991px) ******/
@media (max-width: 991px) {
    .bsa-card {
        max-width: 800px;
        gap: 1.75rem;
    }

    .bsa-result-card {
        max-width: 800px;
        padding: 1.75rem;
    }
}

/***** Standard tablets & landscape phones (≤768px) ******/
@media (max-width: 768px) {
    .bsa-card {
        max-width: 700px;
        gap: 1.75rem;
    }

    .bsa-result-card {
        max-width: 700px;
        padding: 1.75rem;
    }

    .bsa-calc-btn {
        width: 55%;
    }
}

/***** Large smartphones & phablets (≤617px) ******/
@media (max-width: 617px) {
    .bsa-card {
        max-width: 550px;
        gap: 1.75rem;
    }

    .bsa-result-card {
        max-width: 550px;
        padding: 1.75rem;
    }

    .bsa-calc-btn {
        width: 100%;
    }

    .bsa-unit-selection {
        display: flex;
        gap: 20px;
        justify-content: center;
        flex-direction: column;
    }

    .bsa-input-row {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        flex-direction: column;
        flex-wrap: wrap;
    }

    .bsa-input-field {
        width: 100%;
    }

    .bsa-result-header h3 {
        font-size: 1.3rem;
    }

    .bsa-result-table th {
        font-size: 0.9rem;
    }
}

/***** Small smartphones (≤450px) ******/
@media (max-width: 450px) {
    .bsa-card {
        max-width: 400px;
        gap: 1.75rem;
    }

    .bsa-result-card {
        max-width: 400px;
        padding: 1.75rem;
    }

    .bsa-calc-btn {
        width: 100%;
    }

    .bsa-unit-selection {
        display: flex;
        gap: 20px;
        justify-content: center;
        flex-direction: column;
    }

    .bsa-input-row {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        flex-direction: column;
        flex-wrap: wrap;
    }

    .bsa-input-field {
        width: 100%;
    }

    .bsa-result-header h3 {
        font-size: 1.2rem;
    }

    .bsa-result-table th,
    .bsa-result-table th, .bsa-result-table td {
        font-size: 0.8rem;
    }
}

/***** Extra small phones & older devices (≤365px) ******/
@media (max-width: 365px) {
    .bsa-card {
        max-width: 330px;
        gap: 1.75rem;
    }

    .bsa-result-card {
        max-width: 330px;
        padding: 1.75rem;
    }

    .bsa-calc-btn {
        width: 100%;
    }

    .bsa-unit-selection {
        display: flex;
        gap: 20px;
        justify-content: center;
        flex-direction: column;
    }

    .bsa-input-row {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        flex-direction: column;
        flex-wrap: wrap;
    }

    .bsa-input-field {
        width: 100%;
    }

    .bsa-result-header h3 {
        font-size: 1.1rem;
    }

    .bsa-result-table th,
    .bsa-result-table th, .bsa-result-table td {
        font-size: 0.75rem;
    }
}