/*---FDG Ricerca Home ---*/

.fdg-download-su-button {
    line-height: 50px !important;
}

.fdg-compact-row,
.fdg-form-row,
.fdg-form-group,
.fdg-from-group,
.fdg-to-group,
.fdg-date-group,
.fdg-form-actions,
.fdg-buttons-wrapper,
.fdg-select-wrapper {
    box-sizing: border-box;
}

.fdg-input,
.fdg-select,
.fdg-date-input,
.fdg-time-input,
.fdg-btn-primary,
.fdg-btn-swap {
    box-sizing: border-box;
}

/* FIX BOTTONE SWAP */

.fdg-btn-swap {
    position: relative;
    overflow: hidden;
    text-indent: -9999px;
    white-space: nowrap;
}

.fdg-btn-swap i,
.fdg-btn-swap svg,
.fdg-btn-swap::before {
    text-indent: 0;
}

.fdg-btn-swap span:not(.icon),
.fdg-btn-swap .fdg-swap-text,
.fdg-btn-swap .screen-reader-text:not(:focus) {
    display: none !important;
}

/* BASE SELECT2 */

.fdg-form-group,
.fdg-from-group,
.fdg-to-group,
.fdg-date-group,
.fdg-select-wrapper {
    min-width: 0 !important;
}

.fdg-select-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

.fdg-select-wrapper .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.fdg-select-wrapper .select2-container--default .select2-selection--single {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.fdg-select-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100% !important;
}

.fdg-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 0;
}


/*---MEDIA QUERY x tutti i dispositivi---*/

/* DESKTOP*/

@media (min-width: 768px) {

    .fdg-search-container .elementor-widget-shortcode {
        width: 1060px;
        max-width: 1060px;
        min-width: 0 !important;
        padding-bottom: 30px !important;
        margin-top: 20px !important;
    }

    .fdg-external-search-form {
        width: 100%;
        padding: 0 !important;
    }

    .fdg-compact-row {
        width: 100%;
        background: #cfd7db !important;
        border: none !important;
        border-radius: 16px !important;
        box-shadow: none !important;
        padding: 26px 30px !important;
        margin: 0 0 24px 0 !important;
    }

    .fdg-form-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        gap: 14px !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .fdg-from-group {
        flex: 1.35 1 0 !important;
        min-width: 0 !important;
    }

    .fdg-to-group {
        flex: 1.35 1 0 !important;
        min-width: 0 !important;
    }

    .fdg-date-group {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    .fdg-form-group {
        margin: 0 !important;
    }

    .fdg-form-group label {
        display: block !important;
        color: #0b1f2a !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        margin: 0 0 10px 4px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        font-family: "Instrument Sans", sans-serif !important;
    }

    .fdg-input,
    .fdg-select,
    .fdg-date-input,
    .fdg-time-input,
    .fdg-select-wrapper .select2-container--default .select2-selection--single {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 58px !important;
        min-height: 58px !important;
        border-radius: 12px !important;
        background: #f6f6f6 !important;
        border: 1px solid #e4e4e4 !important;
        box-shadow: none !important;
        font-size: 16px !important;
    }

    .fdg-input,
    .fdg-select,
    .fdg-date-input,
    .fdg-time-input {
        padding: 10px 16px !important;
    }

    .fdg-select-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 56px !important;
        padding-left: 18px !important;
        padding-right: 38px !important;
        font-size: 16px !important;
        color: #2a2a2a !important;
    }

    .fdg-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 58px !important;
        right: 12px !important;
    }

    .fdg-btn-swap {
        width: 96px !important;
        min-width: 96px !important;
        max-width: 96px !important;
        flex: 0 0 96px !important;
        height: 58px !important;
        margin: 0 !important;
        border-radius: 12px !important;
        background: #003847 !important;
        color: #fff !important;
        border: none !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        align-self: flex-end !important;
    }

    .fdg-btn-swap:hover {
        background: #00748d !important;
        transform: none !important;
    }

    .fdg-btn-swap i,
    .fdg-btn-swap svg {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 11px !important;
    }

    .fdg-date-group.fdg-date-time-split {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 92px;
        gap: 12px !important;
        align-items: end !important;
    }

    .fdg-date-group.fdg-date-time-split label {
        grid-column: 1 / -1;
    }

    .fdg-form-actions {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 18px !important;
    }

    .fdg-buttons-wrapper {
        width: auto !important;
        margin-top: 0 !important;
    }

    .fdg-btn-primary {
        min-width: 200px !important;
        height: 54px !important;
        min-height: 54px !important;
        padding: 0 28px !important;
        border-radius: 10px !important;
        background: #0a8aa4 !important;
        color: #fff !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 17px !important;
        font-weight: 700 !important;
    }

    .fdg-btn-primary:hover {
        background: #087a91 !important;
        transform: none !important;
    }
}

/* MOBILE */

@media (max-width: 767px) {

    .fdg-search-container .elementor-widget-shortcode {
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
        padding: 0 18px !important;
        margin-top: 16px !important;
    }

    .fdg-external-search-form {
        width: 100%;
        padding: 0 !important;
    }

    .fdg-compact-row {
        width: 100%;
        background: #cfd7db !important;
        border: none !important;
        border-radius: 24px !important;
        box-shadow: none !important;
        padding: 18px !important;
        margin: 0 0 16px 0 !important;
    }

    .fdg-form-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .fdg-form-group,
    .fdg-from-group,
    .fdg-to-group,
    .fdg-date-group {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
    }

    .fdg-form-group label {
        display: block !important;
        color: #102733 !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        margin: 0 0 8px 4px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    .fdg-input,
    .fdg-select,
    .fdg-date-input,
    .fdg-time-input,
    .fdg-select-wrapper .select2-container--default .select2-selection--single {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 56px !important;
        min-height: 56px !important;
        border-radius: 10px !important;
        background: #f6f6f6 !important;
        border: 1px solid #e4e4e4 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }

    .fdg-input,
    .fdg-select,
    .fdg-date-input,
    .fdg-time-input {
        padding: 0 16px !important;
    }

    .fdg-select-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 54px !important;
        padding-left: 16px !important;
        padding-right: 38px !important;
        font-size: 16px !important;
    }

    .fdg-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 56px !important;
        right: 10px !important;
    }

    .fdg-btn-swap {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 54px !important;
        border-radius: 10px !important;
        background: #003847 !important;
        color: #fff !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .fdg-btn-swap i,
    .fdg-btn-swap svg {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
        font-size: 18px !important;
    }

    .fdg-date-group.fdg-date-time-split {
        display: block !important;
    }

    .fdg-date-group.fdg-date-time-split .fdg-time-input {
        margin-top: 10px !important;
    }

    .fdg-date-input {
        padding-right: 42px !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23102733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 14px center !important;
        background-size: 18px !important;
    }

    .fdg-form-actions {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 16px !important;
    }

    .fdg-buttons-wrapper {
        width: 100% !important;
        margin-top: 0 !important;
    }

    .fdg-btn-primary {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 54px !important;
        min-height: 54px !important;
        border-radius: 10px !important;
        background: #0a8aa4 !important;
        color: #fff !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        padding: 0 18px !important;
    }
}

/* fix sul container per mobile più stretto */

@media (max-width: 430px) {
    .fdg-search-container .elementor-widget-shortcode {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .fdg-compact-row {
        border-radius: 22px !important;
        padding: 16px !important;
    }
}

@media (max-width: 375px) {
    .fdg-search-container .elementor-widget-shortcode {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .fdg-compact-row {
        padding: 14px !important;
    }

    .fdg-input,
    .fdg-select,
    .fdg-date-input,
    .fdg-time-input,
    .fdg-select-wrapper .select2-container--default .select2-selection--single {
        height: 54px !important;
        min-height: 54px !important;
    }
}

/* Selettore calendario*/

.fdg-date-group {
    position: relative;
}

.fdg-date-input {
    position: relative;
    padding-right: 46px !important;
    background-color: #f6f6f6 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230b1f2a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 18px !important;
    cursor: pointer;
}

.fdg-date-input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.fdg-date-input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.fdg-date-input[type="date"]::-webkit-inner-spin-button,
.fdg-date-input[type="date"]::-webkit-clear-button {
    display: none;
}

.fdg-date-input[type="date"]::-moz-focus-inner {
    border: 0;
}

.fdg-date-input:focus,
.fdg-input:focus,
.fdg-time-input:focus,
.fdg-select:focus,
.fdg-select-wrapper .select2-container--default.select2-container--focus .select2-selection--single {
    outline: none !important;
    border-color: #0a8aa4 !important;
    box-shadow: 0 0 0 3px rgba(10, 138, 164, 0.12) !important;
}

@media (max-width: 767px) {
    .fdg-date-input {
        padding-right: 44px !important;
        background-position: right 14px center !important;
        background-size: 18px !important;
    }
}


/* Fix iOS Safari - date input alignment */
.fdg-date-input[type="date"]::-webkit-date-and-time-value {
    text-align: left !important;
}




