.form-input-animated {
    padding: 12px 15px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
    height: 40px !important;
}

.form-input-animated:focus {
    border-color: #007bff !important;
}

.form-label-animated {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%);
    left: 15px !important;
    font-size: 16px !important;
    color: #999 !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
    background: white !important;
    padding: 0 4px !important;
}

.form-label-animated::before {
    content: "";
    position: absolute;
    top: calc(50% - (var(--slot-top, 3px) / 2));
    height: var(--slot-height, 4px);
    left: 0;
    right: 0;
    margin: 0;
    background-color: #ffffff ;
    z-index: -1;
    padding: 0 4px;
}

/* === CSS SPECIFICO PER INPUT (non select) === */
input.form-input-animated:focus + .form-label-animated{
    top: 0 !important;
    left: 15px !important;
    font-size: 14px !important;
    color: #007bff !important;
    padding: 0 8px !important;
    background-color: transparent !important;
}

input.form-input-animated:not(:focus)[value]:not([value=""]) + .form-label-animated {
    color: #666 !important;
    top: 0 !important;
    left: 15px !important;
    font-size: 14px !important;
    padding: 0 8px !important;
    background-color: transparent !important;
    display: inline-block;
}

/* === CSS SPECIFICO PER SELECT === */
select.form-input-animated {
    cursor: pointer;
    width: 100%;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Solo quando la select ha focus */
select.form-input-animated:focus + .form-label-animated {
    top: 0 !important;
    font-size: 14px !important;
    color: #007bff !important;
    padding: 0 8px !important;
    background-color: transparent !important;
}

select.form-label-animated{
    top: 10px;
}

/* Solo quando la select ha una selezione valida (classe aggiunta via JS) */
select.form-input-animated.has-selection + .form-label-animated {
    top: 0 !important;
    font-size: 14px !important;
    color: #666 !important;
    padding: 0 8px !important;
    background: transparent !important;
}

/* === CSS SPECIFICO PER TEXTAREA === */
textarea.form-input-animated {
    min-height: 120px !important;
    height: auto !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

textarea.form-input-animated:focus + .form-label-animated {
    top: 0 !important;
    left: 15px !important;
    font-size: 14px !important;
    color: #007bff !important;
    padding: 0 8px !important;
    background-color: transparent !important;
}

input.form-input-animated:not(:focus)[value]:not([value=""]) + .form-label-animated
{
    color: #666 !important;
    top: 0 !important;
    left: 15px !important;
    font-size: 14px !important;
    padding: 0 8px !important;
    background-color: transparent !important;
    display: inline-block;
}
.password-wrapper {
    position: relative;
}


.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #888;
    user-select: none;
    z-index: 5;
}

.select-wrapper {
    position: relative;
}

.tooltip-icon {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
    cursor: pointer;
    z-index: 3;
}


.tooltip-balloon {
    position: absolute;
    background: #0C364F;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    display: none;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Freccia */
.tooltip-balloon::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0C364F;
}

.checkbox-container {
    margin: 15px 0;
}

.informativa{
    display: flex;
    padding: 0 24px 24px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
}

.checkbox-container label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
}

.register-button {
    background: #3498db;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.register-button:hover {
    background: #2980b9;
}

.login-link {
    display: flex;
    padding: 24px 64px 24px 64px;
    align-items: center;
    gap: 10px;
    align-self: stretch;
}

.login-link a {
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

.reg{
    flex: 1 0 0;

}

.reg h1{
    color: #0C364F !important;
    font-family: Poppins !important;
    font-size: 32px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: normal !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.accedi{
    color: #0C364F;
    text-align: right;
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.accedi a{
    color: var(#106EBE);
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;

}

#placeholder {
    max-height: 56px;
}

.form-error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 0;
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.form-group-animated.has-error .form-input-animated {
    border-color: #e74c3c !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#main {
    background: url('/wp-content/themes/Avada-Child-Theme/assets/img/register.jpg') no-repeat center !important;
    background-position-x: 0;
    background-position-y: 0;
    display: flex;
    width: 100%;
    min-height: 1100px !important;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    background-size: cover !important;
    background-blend-mode: normal !important;
}

.page .fusion-footer-widget-area > .fusion-fullwidth:first-child {
    margin-top: 0 !important;
}

.woocommerce .form-container .form-column {
    justify-content: flex-start !important;
}


/* === STILE PER TEXTAREA ANIMATA === */
textarea.form-input-animated {
    padding: 12px 15px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
    min-height: 100px !important;
    resize: vertical;
    width: 100%;
}

/* Focus della textarea */
textarea.form-input-animated:focus {
    border-color: #007bff !important;
}

/* Label animata per textarea */
textarea.form-input-animated + .form-label-animated {
    left: 15px !important;
    font-size: 16px !important;
    color: #999 !important;
    background: white !important;
    padding: 0 4px !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
}

/* Quando la textarea ha focus o contiene testo */
textarea.form-input-animated:focus + .form-label-animated,
textarea.form-input-animated:not(:placeholder-shown) + .form-label-animated {
    top: 0 !important;
    left: 15px !important;
    font-size: 14px !important;
    color: #007bff !important;
    background: transparent !important;
    padding: 0 8px !important;
}

/* Placeholder visibile */
textarea.form-input-animated::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* Label animata quando il campo ha contenuto */
.form-input-animated.has-content + .form-label-animated,
.form-input-animated.has-focus + .form-label-animated {
    top: 0 !important;
    left: 15px !important;
    font-size: 14px !important;
    color: #007bff !important;
    background: transparent !important;
    padding: 0 8px !important;
}

/* Placeholder visibile */
textarea.form-input-animated::placeholder,
input.form-input-animated::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

input, textarea {
    -webkit-user-select: text;
}
.custom-select {
    position: relative;
    width: 100%;
}

.select-header {
    padding: 0 15px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
    height: 42px !important;
    min-height: 42px !important;
    cursor: pointer;
    background: white !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.select-header:hover {
    border-color: #999 !important;
}

.select-header.active {
    border-color: black !important;
}

.select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
    max-width: 100%;
}

.select-text.placeholder {
    color: #999 !important;
}

.select-arrow {
    width: 42px;
    height: 100%;
    border-left: 1px solid #ddd;
    font-size: 16px;
    line-height: 42px;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    margin-left: 10px;
    flex-shrink: 0;
}

.form-row{
    max-width: 100%;
}

.select-options {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid black !important;
    border-radius: 6px !important;
    max-height: 300px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    overflow-y: auto;
}

.select-options.show {
    display: block;
}

.select-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.5;
    font-size: 16px;
    white-space: normal;
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background-color: #f8f9fa;
}

.select-option.selected {
    background-color: #007bff;
    color: white;
}

.profession-select-field .form-label-animated {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%);
    left: 15px !important;
    font-size: 16px !important;
    color: #999 !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
    background: white !important;
    padding: 0 4px 0 0 !important;
}

.select2-selection__arrow b{
    left:75% !important;
    color: black !important;
}

.profession-select-field .form-label-animated::before {
    content: "";
    position: absolute;
    top: calc(50% - 2px);
    height: 4px;
    left: 0;
    right: 0;
    margin: 0;
    background-color: #ffffff;
    z-index: -1;
    padding: 0 4px;
}

.profession-select-field.is-open .select-header,
.profession-select-field:focus-within .select-header {
    border-color: black !important;
}

.profession-select-field.is-open .form-label-animated,
.profession-select-field.has-selection .form-label-animated,
.profession-select-field:focus-within .form-label-animated {
    top: 0 !important;
    left: 15px !important;
    font-size: 14px !important;
    padding: 0 8px !important;
    background-color: transparent !important;
}

.profession-select-field.is-open .form-label-animated {
    color: black !important;
}

.profession-select-field:focus-within .form-label-animated {
    color: black !important;
}

.profession-select-field.has-selection .form-label-animated {
    color: #666 !important;
}

.select-full-value {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.4;
    color: #0C364F;
    display: none;
    word-break: break-word;
}

.profession-select-field.has-selection .select-full-value {
    display: block;
}

.profession-select-field .tooltip-icon {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.select-search {
    padding: 10px 12px 0 12px;
}

.select-search input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.select-option.is-hidden {
    display: none;
}
.select2-selection__clear{
    display: none;
}
.profession-select-field .select2-container {
    width: 100% !important;
    display: block;
}

.profession-select-field .select2-selection--single {
    height: 42px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    padding: 0 42px 0 15px !important;
    display: flex !important;
    align-items: center !important;
}

.profession-select-field .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    line-height: 20px !important;
    color: #303030 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    max-width: 409px !important;
}

.profession-select-field .select2-selection--single .select2-selection__placeholder {
    color: #999 !important;
}

.profession-select-field .select2-selection__arrow {
    width: 42px !important;
    height: 100% !important;
    border-left: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 0 !important;
    top: 0 !important;
}

.profession-select-field .select2-selection__arrow b {
    border-color: #666 transparent transparent transparent !important;
    margin-top: 0 !important;
}

.profession-select-field .select2-dropdown {
    border: 2px solid black !important;
    border-radius: 6px !important;
}

.profession-select-field .select2-results__option {
    white-space: normal;
}

.profession-select-field .select2-results__option--highlighted {
    color: #303030 !important;
}

/* Scrollbar personalizzata per le opzioni */
.select-options::-webkit-scrollbar {
    width: 8px;
}

.select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.select-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.select-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media screen and (width <= 1024px) {


    .profession-select-field .select2-selection--single .select2-selection__rendered {
        max-width: 650px  !important;
    }


}
