/* Stile form in stile Lestin - basato su https://gaviaspreview.com/wp/lestin/home-3/ */
.cbd-search-form.cbd-lestin-style {
    background-color: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 20px 20px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 9;
}
.cbd-search-form.bck-trasparent-style{
    content: '';
    width: 100%;
    height: 100%;
    position: relative;
    padding:15px;
    top: 0;
    left: 0;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);

.cbd-search-form.cbd-lestin-style .cbd-form-title {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    display: none; /* Il form Lestin non mostra un titolo nel header */
}

/* Grid layout per i campi */
.cbd-form-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 4 campi + 1 pulsante = 5 colonne */
    gap: 10px;
    align-items: center;
    margin-bottom: 0;
}

/* Stile campi */
.cbd-search-form.cbd-lestin-style .cbd-form-field {
    margin-bottom: 0;
    padding: 0 5px;
}

.cbd-search-form.cbd-lestin-style label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbd-search-form.cbd-lestin-style label i {
    margin-right: 5px;
    color: #FFCE00; /* Arancione accent color */
}

.cbd-search-form.cbd-lestin-style input,
.cbd-search-form.cbd-lestin-style select {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    height: 45px;
}

.cbd-search-form.cbd-lestin-style input:focus,
.cbd-search-form.cbd-lestin-style select:focus {
    border-color: #FFCE00;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 93, 35, 0.2);
}

/* Stile pulsante di ricerca */
.cbd-search-form.cbd-lestin-style .cbd-search-button {
    width: 100%;
    padding: 12px 15px;
    background-color:#FFCE00;
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbd-search-form.cbd-lestin-style .cbd-search-button:hover {
    background-color: #000000;
    color:#FFFFFF;
}

.cbd-search-form.cbd-lestin-style .cbd-search-button i {
    margin-right: 8px;
}

/* Personalizzazione datepicker */
.cbd-search-form.cbd-lestin-style .ui-datepicker {
    border-radius: 0;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.cbd-search-form.cbd-lestin-style .ui-datepicker-header {
    border-radius: 0;
    border: none;
    background: #0e2a3d;
    color: white;
}

.cbd-search-form.cbd-lestin-style .ui-datepicker-calendar th {
    color: #666;
}

.cbd-search-form.cbd-lestin-style .ui-datepicker-calendar .ui-state-default {
    background: #f5f5f5;
    border: none;
    text-align: center;
    color: #333;
}

.cbd-search-form.cbd-lestin-style .ui-datepicker-calendar .ui-state-hover {
    background: #e0e0e0;
    color: #000;
}

.cbd-search-form.cbd-lestin-style .ui-datepicker-calendar .ui-state-active {
    background: #ff5d23;
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .cbd-form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cbd-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .cbd-search-form.cbd-lestin-style {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .cbd-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Nascondi i controlli nativi di date input in favore del datepicker custom */
.cbd-search-form.cbd-lestin-style input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.8;
    cursor: pointer;
}

/* Aggiungiamo stili per l'ultima colonna del bottone */
.cbd-search-form.cbd-lestin-style .cbd-form-row:last-child {
    padding: 0 5px;
    align-self: end;
    margin-top: 24px; /* Allinea il pulsante con gli input (tenendo conto dell'altezza della label) */
}

@media (max-width: 768px) {
    .cbd-search-form.cbd-lestin-style .cbd-form-row:last-child {
        margin-top: 0;
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .cbd-search-form.cbd-lestin-style .cbd-form-row:last-child {
        grid-column: span 1;
    }
}