.input-container {
    position: relative; /* Make the container relative */
    margin-top: 10px;
}

.input-label {
    position: absolute;
    left: 0;
    bottom: 10px;
    opacity: 0;
    visibility: hidden;
    font-size: small;
    color: #283583;
    text-transform: capitalize;
}

/* Adjust the styles of the label when input is not empty */
.input-container input:not(:placeholder-shown) + .input-label {
    bottom: 100%;
    opacity: 1;
    visibility: visible; /
}

/* Extra adjustments in case of validation or other states can be added here */
.input-container input:valid + .input-label {
    top: -20px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0%);
}

.input-has-value {
    margin-top: 30px;
}

.cgu-label {
    font-size: small;
    cursor: pointer;
}

/* Styles for the CGU link inside the label */
.cgu-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cgu-label a:hover {
    text-decoration: none;
}

/* Hide the default checkbox */
.input-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom checkbox design */
.checkbox-custom {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    vertical-align: middle;
    position: relative;
    cursor: pointer;
}

/* Checkmark style */
.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid var(--primary-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Show checkmark when checkbox is checked */
.input-checkbox:checked + .cgu-label .checkbox-custom::after {
    display: block;
}

/* Change background color of custom checkbox when the actual checkbox is focused */
.input-checkbox:focus + .cgu-label .checkbox-custom {
    background-color: var(--background-input-focus);
}

/* Add a hover effect for the custom checkbox */
.checkbox-custom:hover {
    background-color: var(--background-input-hover);
}
