.ell-calc-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #222;
    /* background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); */
}

.ell-calc-container h3 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -1px;
    font-weight: 800;
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    color: #0075C1;
}

.ell-calc-container h4 {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 10px;
    font-weight: 700;
    color: #0075C1;
}

.ell-calc-container h4::before {
    content: "\2714";
    color: #28a745;
    margin-right: 8px;
}

.ell-calc-container p {
    font-size: 18px;
    line-height: 1.3;
}

.ell-calc-container h3::after {
    content: "";
    display: block;
    width: 20%;
    height: 3px;
    background-color: #FFB0BF;
    position: absolute;
    bottom: -10px;
    left: 0;
}

.ell-calc-wrapper {
    background: white;
    padding: 2rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0 5px 5px 5px;
    position: relative;
    z-index: 2;
}

.ell-calc-container input,
.ell-calc-container button,
.ell-calc-container select,
.ell-calc-container textarea {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #222;
    margin-bottom: 0;
}

.ell-calc-container * {
    box-sizing: border-box;
}

.ell-form-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ell-form-group.ell-factors-checkbox-group {
  gap: 10px;  
}

.ell-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0;
    color: #222;
}

/* Floating Label Styles */
.ell-floating-wrapper {
    position: relative;
    margin-bottom: 0;
}

/* .ell-floating-wrapper:not(:last-child) {
    margin-bottom: 5px;
} */

.ell-floating-wrapper label {
    position: absolute;
    top: 11px;
    left: 10px;
    background-color: transparent;
    padding: 0 5px;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
    color: #666;
    font-weight: normal;
    font-size: 14px;
    margin: 0;
}

/* Active State (Focused or Has Value) */
.ell-floating-wrapper.ell-focused label,
.ell-floating-wrapper.ell-has-value label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #0075C1;
    background-color: #fff;
    font-weight: 600;
}

.ell-form-group input,
.ell-form-group select {
    width: 100%;
    padding: 10px 12px;
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: transparent;
    /* margin-bottom: 10px; */
}

/* Hide placeholder when label is covering it */
.ell-floating-wrapper input::placeholder {
    color: transparent;
}

.ell-floating-wrapper.ell-focused input::placeholder {
    color: #ccc;
}

.ell-calc-container .ell-calc-btn {
    background-color: #0075C1;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 800;
    font-size: 16px;
    border: 2px solid #0075c1;
    background-clip: border-box;
    border-radius: 4px;
    
    /* Theme Resets */
    background-image: none;
    box-shadow: none;
    text-shadow: none;
    text-transform: none;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    line-height: 1.5;
}

/* Spacing for Contact Stages */
#ell-settlement-contact-stage p,
#ell-redundancy-contact-stage p {
    margin-bottom: 30px;
}

#ell-settlement-contact-stage hr,
#ell-redundancy-contact-stage hr {
    margin-top: 0px;
    margin-bottom: 15px;
    border: none;
    border-top: 1px solid #CCCCCC;
    background-color: transparent;
}

#ell-settlement-contact-stage .ell-form-group,
#ell-redundancy-contact-stage .ell-form-group {
    margin-bottom: 30px;
}

.ell-calc-btn:hover {
    opacity: 0.9;
}

#ell-result {
    margin-top: 20px;
    padding: 10px;
    background-color: #e7f4e4;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Loading Spinner Styles */
.ell-calc-btn.ell-loading {
    color: transparent;
    pointer-events: none;
}

.ell-calc-btn.ell-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: ell-spin 0.8s linear infinite;
}

@keyframes ell-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .ell-calc-wrapper {
        padding: 15px;
    }
}

/* Step Indicators */
.ell-steps {
    display: flex;
    justify-content: flex-start;
    gap: 5px;
    margin-bottom: -1px;
    position: relative;
    z-index: 3;
    margin-top:2rem;
}

.ell-step {
    padding: 10px 20px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    color: #444;
    cursor: pointer;
}

.ell-step.active {
    background-color: #fff;
    color: #0073aa;
    font-weight: bold;
    border-bottom: 1px solid #fff;
}

/* Fade Transitions */
#ell-settlement-stage-1,
#ell-settlement-contact-stage,
#ell-settlement-result,
#ell-redundancy-stage-1,
#ell-redundancy-contact-stage,
#ell-redundancy-result {
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

/* Checkbox Grid Styles */
.ell-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.ell-checkbox-group br {
    display: none;
}

.ell-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 13px;
}

.ell-checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Grid Layout for Inputs */
#ell-settlement-stage-1,
#ell-redundancy-stage-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 30px;
}

.ell-form-group.ell-full-width,
#ell-settlement-calc-btn,
#ell-redundancy-calc-btn {
    grid-column: 1 / -1;
}

@media (max-width: 500px) {
    #ell-settlement-stage-1,
    #ell-redundancy-stage-1 {
        grid-template-columns: 1fr;
    }

    .ell-calc-container .ell-calc-btn {
        display: block;
        width: 100%;
    }
}

/* Select2 Styling Overrides */
.ell-calc-container .select2-container .select2-selection--single {
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ell-calc-container .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    color: #222;
    font-size: 13px;
}

.ell-calc-container .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.ell-calc-container .select2-container .select2-selection--multiple {
    min-height: 42px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ell-calc-container .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: block;
    padding: 0 6px;
    margin: 0;
}

.ell-calc-container .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #0075C1;
    border: 1px solid #0064a6;
    color: #fff;
    border-radius: 3px;
    padding: 2px 6px 2px 15px;
    margin: 3px 4px 3px 0;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
}

.ell-calc-container .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    margin-top: 0;
    line-height: 21px;
    font-size: 13px;
}

.ell-calc-container .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 12px;
    opacity: 0.8;
    border: none;
    background: transparent;
    padding: 0;
    height: 100%;
    margin-left: 5px;
}
.ell-calc-container .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
    opacity: 1;
}

.ell-select-all-btn {
    background: none;
    border: none;
    color: #0075C1;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    float: right;
    font-weight: 500;
    pointer-events: auto;
    
    /* Theme Resets */
    background-image: none;
    box-shadow: none;
    text-transform: none;
    margin: 0;
}

.ell-calc-dropdown .select2-results__option {
    font-size: 13px;
}

.ell-checkbox-container label {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    margin-bottom: 4px;
    font-weight: normal;
    font-size: 12px;
}

.ell-checkbox-container input[type="checkbox"] {
    transform: scale(0.9);
    margin: 0 4px 0 0;
    cursor: pointer;
    width: auto;
    height: auto;
    padding: 0;
}

/* Override Browser Autofill Styles */
.ell-calc-container input:-webkit-autofill,
.ell-calc-container input:-webkit-autofill:hover, 
.ell-calc-container input:-webkit-autofill:focus, 
.ell-calc-container input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #222 !important;
    transition: background-color 5000s ease-in-out 0s;
}
