/* Diggio Ricerca Avanzata CSS */

.block-diggio-search {
    background: #ffffff;
    padding: 0;
    /* Remove padding from container to allow full-width headers */
    padding-bottom: 15px;
    /* Add bottom padding only */
    border-bottom: 2px solid #eaeaea;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    width: 100%;
    z-index: 1000;
}

.diggio-search-headers {
    width: 100%;
    margin-bottom: 15px;
}

.diggio-title-wrapper,
.diggio-desc-wrapper {
    width: 100%;
    text-align: center;
    padding: 10px 0;
}

.diggio-title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    /* Default size */
    color: #333;
    /* Default text color, user can override via CSS or we assume dark on light/colored bg */
}

/* If background is dark, text might need to be white. 
   Since we don't know the exact color contrast, we leave it to user CSS customization 
   or assume the user picks a light background. 
   Ideally, we could have a text color picker too, but simple is better for now. 
   We will force white text ONLY if a background color is set inline (handled via smarty logic check? No, CSS simple way:)
*/

.diggio-desc {
    font-size: 14px;
}

.block-diggio-search.sticky-top {
    position: sticky;
    top: 0;
}

#diggio-search-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.diggio-search-flex {
    display: flex;
    flex-wrap: wrap;
    /* Wraps on small screens */
    gap: 10px;
    align-items: center;
    justify-content: center;
    /* Center content */
}

/* Steps Styling */
.diggio-step {
    flex: 1 1 150px;
    /* Grow, Shrink, Basis */
    min-width: 140px;
}

.diggio-step select.form-control {
    width: 100%;
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.diggio-step select.form-control:disabled {
    background-color: #f9f9f9;
    color: #999;
    cursor: not-allowed;
}

/* Button Styling */
.diggio-step-btn {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    /* Don't grow too much */
}

.btn-search-diggio {
    background-color: #2fb5d2;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    padding: 0 20px;
    height: 42px;
    border: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-search-diggio:hover:not(:disabled) {
    background-color: #2592a9;
}

.btn-search-diggio:disabled {
    background-color: #ccc;
    cursor: default;
}

#diggio-reset-btn {
    height: 42px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    border-radius: 4px;
    padding: 0 15px;
}

/* Responsive */
@media (max-width: 991px) {
    .diggio-search-flex {
        justify-content: space-between;
    }
}

@media (max-width: 767px) {
    .diggio-search-flex {
        flex-direction: column;
        gap: 0;
        /* No gap, rely on minimal margin if needed */
        display: block;
        /* Switch to block to avoid flex gap issues on some browsers */
    }

    .diggio-step {
        width: 100%;
        margin-bottom: 5px !important;
        /* Minimal spacing between fields */
        padding: 0 !important;
    }

    /* Force removed margins on the select element itself */
    .diggio-step select.form-control {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        height: 40px !important;
        /* Enforce reasonable height */
    }

    .diggio-cat-select {
        margin-top: 5px !important;
    }

    .diggio-step-btn {
        width: 100%;
        display: flex;
        margin-top: 5px;
    }

    .diggio-step-btn button {
        flex: 1;
    }
}

/* Results Page */
.diggio-results h1 {
    margin: 20px 0;
    text-align: center;
    text-transform: uppercase;
    color: #333;
    font-size: 24px;
}

.diggio-results #products {
    margin-top: 30px;
}