/* Custom CSS for Expanding Search Bar */

/* Ensure the search bar container handles the expansion */
.elementor-widget-search .elementor-search-form {
    position: relative;
    width: 40px; /* Initial compact width */
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    border-radius: 50px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    float: right; /* Align to the right initially */
}

/* Expand the container on focus or focus-within */
.elementor-widget-search .elementor-search-form:focus-within,
.elementor-widget-search .elementor-search-form:hover {
    width: 100%; /* Expand to full container width */
    max-width: 400px; /* Optional max-width */
    box-shadow: 0 4px 12px rgba(110, 193, 228, 0.2); /* #6EC1E4 accent shadow */
}

/* Style the input field */
.elementor-widget-search .elementor-search-form__input {
    width: 100%;
    padding: 10px 40px 10px 20px; /* Room for the icon */
    border: 1px solid transparent;
    border-radius: 50px;
    background: transparent;
    color: #333333;
    font-size: 16px;
    outline: none;
    opacity: 0; /* Hide text initially */
    transition: opacity 0.3s ease 0.1s, border-color 0.3s ease;
}

/* Show text and border on focus/hover */
.elementor-widget-search .elementor-search-form:focus-within .elementor-search-form__input,
.elementor-widget-search .elementor-search-form:hover .elementor-search-form__input {
    opacity: 1;
    border-color: #6EC1E4; /* Primary color */
}

/* Style the submit button / icon */
.elementor-widget-search .elementor-search-form__submit {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px; /* Matches initial container width */
    background: transparent;
    border: none;
    color: #7A7A7A; /* Text color from globals */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

/* Icon color on focus/hover */
.elementor-widget-search .elementor-search-form:focus-within .elementor-search-form__submit,
.elementor-widget-search .elementor-search-form:hover .elementor-search-form__submit {
    color: #6EC1E4; /* Primary color */
}

/* Specific styling for SearchWP Live Ajax Search container if needed */
.searchwp-live-search-results {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 5px;
}
