/* Floating Search Widget Fixes - High Specificity */

/* DEBUG: Un-comment the line below if you want to see if the CSS is loading at all */
/* .aw-search-trigger { border: 2px solid red !important; } */

.elementor-widget-art_wine_expandable_search .aw-search-float-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elementor-widget-art_wine_expandable_search .aw-search-trigger {
    width: 44px;
    height: 44px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.elementor-widget-art_wine_expandable_search .aw-search-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
}

.elementor-widget-art_wine_expandable_search .aw-search-trigger i,
.elementor-widget-art_wine_expandable_search .aw-search-trigger svg {
    font-size: 18px;
    fill: currentColor;
}

/* SEARCH OVERLAY - HIDDEN BY DEFAULT */
.elementor-widget-art_wine_expandable_search .aw-search-overlay {
    position: absolute;
    top: calc(100% + 20px);
    right: 0;
    width: 320px;
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    
    /* Animation initial state */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 99999 !important;
}

/* ACTIVE STATE */
.elementor-widget-art_wine_expandable_search .aw-search-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.elementor-widget-art_wine_expandable_search .search-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 2px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s;
}

.elementor-widget-art_wine_expandable_search .search-input-wrap:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
}

.elementor-widget-art_wine_expandable_search input[type="search"] {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    padding: 12px 0 !important;
    outline: none !important;
    font-size: 14px !important;
    box-shadow: none !important;
}

.elementor-widget-art_wine_expandable_search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.elementor-widget-art_wine_expandable_search .search-submit {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
    padding: 5px;
}

.elementor-widget-art_wine_expandable_search .search-submit:hover {
    opacity: 1;
    transform: scale(1.1);
}

.elementor-widget-art_wine_expandable_search .search-submit svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Pointer arrow */
.elementor-widget-art_wine_expandable_search .aw-search-overlay::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 15px;
    width: 14px;
    height: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

/* Fix for mobile/tablet where alignment might differ */
@media (max-width: 1024px) {
    .elementor-widget-art_wine_expandable_search .aw-search-overlay {
        right: -10px;
    }
    .elementor-widget-art_wine_expandable_search .aw-search-overlay::before {
        right: 25px;
    }
}
