.custom-search-widget form {
    display: flex;
    gap: 15px;
    align-items: center;
    background: #fcf9f7;
    padding: 15px;
    border-radius: 15px;
    flex-wrap: nowrap; /* Prevent wrapping to ensure single line */
    width: 100%; /* Ensure the form takes full available width */
    box-sizing: border-box; /* Include padding in width calculation */
}

.csw-dropdown, .csw-date {
    padding: 10px;
    border: 2px dashed #000;
    font-weight: bold;
    min-width: 150px; /* Minimum width to maintain readability */
    max-width: 200px; /* Cap width to prevent excessive stretching */
    background: white;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ff0" height="24" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    box-sizing: border-box; /* Ensure padding doesn't affect layout */
}

.csw-date {
    min-width: 180px; /* Slightly wider for date input */
    max-width: 220px; /* Cap to prevent excessive stretching */
}

.csw-button {
    background-color: yellow;
    color: black;
    font-weight: bold;
    padding: 10px 20px;
    border: 1px solid black;
    flex-shrink: 0; /* Prevent button from shrinking */
}

/* Override Elementor wrapper styles to prevent interference */
.play-custom-search-widget > .e-con-inner,
.custom-search-widget form > .e-con-inner,
.csw-dropdown > .e-con-inner,
.csw-date > .e-con-inner,
.csw-button > .e-con-inner,
.play-custom-search-widget .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
    display: contents !important; /* Remove wrapper influence */
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .custom-search-widget form {
        flex-wrap: wrap; /* Allow wrapping on mobile */
        justify-content: center; /* Center items when wrapped */
    }

    .csw-dropdown, .csw-date {
        min-width: 120px; /* Reduce minimum width on mobile */
        max-width: 180px; /* Adjust max width for mobile */
    }

    .csw-date {
        min-width: 150px; /* Adjust date input width */
        max-width: 200px;
    }
}