/* ==========================================================================
   WCR SEARCH FORM - COCKPIT DESIGN SYSTEM
   Limitato a 1000px per il form, Full Width per i risultati
   ========================================================================== */

/* 1. WRAPPER ESTERNO (Non limita la larghezza) */
.wcr-main-listing-wrapper {
    width: 100%;
    position: relative;
}

/* 2. BOX DI RICERCA (Limitato e Centrato) */
.hero-search-form {
    width: 100%;
    max-width: 1000px; /* Qui limitiamo la larghezza del form */
    margin: 0 auto;
    position: relative;
    z-index: 100;
}

/* Etichetta Tecnica Gold sopra il form */
.hsf-label-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.hsf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
    animation: hsf-pulse 2s infinite;
}

@keyframes hsf-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.hsf-label-top span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 215, 0, 0.9);
}

/* 3. IL CONTENITORE NERO (Vetro Scuro) */
.wcr-fleet-container {
    background: #171717 !important;
    border: 1px solid rgba(255, 215, 0, 0.15) !important;
    border-radius: 40px !important;
    padding: 30px !important;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5) !important;
    position: relative;
    overflow: hidden;
}

/* Effetto griglia tecnica sullo sfondo del form */
.wcr-fleet-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* 4. GRIGLIA CAMPI (Ritiro e Consegna) */
.wcr-filter-grid-advanced {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.hsf-row-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 5. INPUT CARDS (Stile Cockpit Unificato) */
.wcr-input-card {
    background: #141414 !important;
    border: 1px solid #222 !important;
    padding: 18px !important;
    border-radius: 20px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.wcr-input-card:hover {
    border-color: #444 !important;
}

.wcr-input-card:focus-within {
    border-color: #FFD700 !important;
    background: #181818 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.wcr-card-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, 0.4) !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 12px !important;
}

.wcr-card-label svg {
    width: 14px !important;
    height: 14px !important;
    stroke: currentColor !important;
}

.filter-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 6. ELEMENTI DI INPUT (Select e Date Unificati) */
.wcr-main-select, 
.wcr-date-picker-input, 
.wcr-flat-input-select {
    width: 100% !important;
    height: 50px !important;
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 0 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

/* Frecce personalizzate per le Select */
.wcr-main-select, .wcr-flat-input-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FFD700' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    padding-right: 40px !important;
}

.hsf-datetime-row {
    display: flex;
    gap: 10px;
}

.hsf-datetime-row .wcr-date-picker-input {
    flex: 1.5;
}

.hsf-datetime-row .wcr-flat-input-select {
    flex: 1;
    color: #FFD700 !important; /* Orario evidenziato in giallo */
    font-weight: 800 !important;
}

/* 7. BOTTONE SUBMIT (Energia Pura) */
.wcr-search-btn-cinematic {
    width: 100%;
    height: 75px;
    background: #FFD700 !important;
    color: #111 !important;
    border: none !important;
    border-radius: 20px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2);
}

.wcr-search-btn-cinematic:hover {
    background: #fff !important;
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* 8. CONTENITORE RISULTATI (Esplode a Full Width) */
.wcr-results-container {
    width: 100%;
    max-width: none !important; /* Rimuove ogni limite */
    margin-top: 80px; /* Distanza dal form sopra */
}



/* 9. RESPONSIVE FIXES */
@media (max-width: 991px) {
    .hsf-row-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wcr-fleet-container {
        padding: 20px !important;
        border-radius: 30px !important;
    }
}

@media (max-width: 768px) {
    .wcr-search-btn-cinematic {
        height: 65px;
        font-size: 14px;
    }
    
    .wcr-input-card {
        padding: 15px !important;
    }
}

/* ALLINEAMENTO COCKPIT HOME FORM */

.wcr-input-card .wcr-card-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--yellow) !important; /* Etichette in oro per importanza */
    font-weight: 900;
}

.wcr-input-card .wcr-card-label svg {
    width: 16px;
    height: 16px;
    stroke: var(--yellow);
}

.wcr-datetime-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* --- FIX LARGHEZZA DATA E ORA --- */

/* Applichiamo il peso ai contenitori invece che ai singoli campi */
.wcr-datetime-row .wcr-date-input-wrapper {
    flex: 1.6 !important; 
    min-width: 0;
}

.wcr-datetime-row .wcr-time-select-wrapper {
    flex: 1 !important;
    min-width: 160px !important; /* Spazio vitale per far stare "21:30 (+ 10,00 €)" */
}

/* Forza gli input a occupare tutto lo spazio dei contenitori sopra */
.wcr-date-picker-input, 
.wcr-flat-input-select {
    width: 100% !important;
    height: 48px !important;
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-size: 13px !important;
}

/* Ottimizzazione specifica per il testo dell'orario */
.wcr-flat-input-select {
    font-weight: 800 !important;
    color: var(--yellow) !important;
    padding-left: 10px !important;
    padding-right: 30px !important; /* Riduciamo il padding destro per guadagnare spazio testo */
    background-position: right 8px center !important; /* Spostiamo la freccia più a destra */
}

/* Hover e Focus */
.wcr-input-card:focus-within {
    border-color: var(--yellow) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.wcr-search-btn-cinematic {
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* BLOCCA IL LAYOUT DEL FORM IN HOME */
.hero-search-form .wcr-datetime-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 15px !important;
    justify-content: space-between;
}


/* Stato disabilitato: resta visibile ma opaco */
.hero-search-form .wcr-flat-input-select:disabled {
    opacity: 0.4 !important;
    background-color: #1a1a1a !important;
    cursor: not-allowed;
}


/* Fix per input e select in Home */
.hero-search-form .wcr-date-picker-input, 
.hero-search-form .wcr-flat-input-select {
    height: 50px !important;
    font-size: 14px !important;
}

/* Stile Pallini Rossi (Giorno Pieno) anche per la Home */
.flatpickr-day.wcr-day-full {
    background: #ec1920 !important;
    border-color: #ec1920 !important;
    color: #ffffff !important;
    text-decoration: line-through !important;
    opacity: 1 !important;
    pointer-events: none !important;
}