/*
 * REVIEWSENSEI - Search Button Fix
 * Complete fix for search button positioning and icon alignment
 * Version: 3.0 - Critical Fix
 * Author: Claude Code Assistant
 */

/* ========================================
   SEARCH BUTTON CRITICAL FIX
   ======================================== */

/* Override all existing search styles with highest priority */
.axil-header .header-search .header-search-form .axil-search.form-group {
    position: relative !important;
    height: 45px !important;
    background: #f8f9fa !important;
    border: 2px solid transparent !important;
    border-radius: 25px !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.axil-header .header-search .header-search-form .axil-search.form-group:focus-within {
    border-color: #3858f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(56, 88, 246, 0.1) !important;
}

/* Input field - MUST be first in DOM order */
.axil-header .header-search .header-search-form .axil-search.form-group input[type="text"],
.axil-header .header-search .header-search-form .axil-search.form-group .form-control {
    width: 100% !important;
    height: 41px !important;
    padding: 0 55px 0 20px !important;
    border: none !important;
    background: transparent !important;
    font-size: 14px !important;
    color: #333333 !important;
    outline: none !important;
    border-radius: 25px !important;
    min-width: auto !important;
    box-shadow: none !important;
    order: 1 !important;
}

.axil-header .header-search .header-search-form .axil-search.form-group input::placeholder {
    color: #999999 !important;
}

/* Search button - MUST overlay on the right */
.axil-header .header-search .header-search-form .axil-search.form-group .search-button,
.axil-header .header-search .header-search-form .axil-search.form-group button[type="submit"] {
    position: absolute !important;
    right: 3px !important;
    top: 3px !important;
    width: 39px !important;
    height: 39px !important;
    border: none !important;
    background: #3858f6 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    order: 2 !important;
    padding: 0 !important;
}

.axil-header .header-search .header-search-form .axil-search.form-group .search-button:hover,
.axil-header .header-search .header-search-form .axil-search.form-group button[type="submit"]:hover {
    background: #2c46d4 !important;
    transform: scale(1.05) !important;
}

.axil-header .header-search .header-search-form .axil-search.form-group .search-button i,
.axil-header .header-search .header-search-form .axil-search.form-group button[type="submit"] i {
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   MOBILE SEARCH FIXES
   ======================================== */

/* Mobile search toggle button */
.axil-header .header-search .mobile-search-wrapper .search-button-toggle {
    width: 45px !important;
    height: 45px !important;
    background: #f8f9fa !important;
    color: #666666 !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
}

.axil-header .header-search .mobile-search-wrapper .search-button-toggle:hover {
    background: #3858f6 !important;
    color: #ffffff !important;
}

.axil-header .header-search .mobile-search-wrapper .search-button-toggle i {
    font-size: 16px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile search form dropdown */
.axil-header .header-search .mobile-search-wrapper .header-search-form {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    width: 280px !important;
    background: #ffffff !important;
    padding: 20px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15) !important;
    border-radius: 0 0 15px 15px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    z-index: 1002 !important;
    border: 1px solid #e5e5e5 !important;
    border-top: none !important;
}

.axil-header .header-search .mobile-search-wrapper .header-search-form.open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.axil-header .header-search .mobile-search-wrapper .header-search-form .form-group,
.axil-header .header-search .mobile-search-wrapper .header-search-form .axil-search {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    background: #f8f9fa !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 25px !important;
    display: flex !important;
    align-items: center !important;
    height: 45px !important;
}

.axil-header .header-search .mobile-search-wrapper .header-search-form .form-group:focus-within,
.axil-header .header-search .mobile-search-wrapper .header-search-form .axil-search:focus-within {
    border-color: #3858f6 !important;
    box-shadow: 0 0 0 3px rgba(56, 88, 246, 0.1) !important;
}

.axil-header .header-search .mobile-search-wrapper .header-search-form input[type="text"],
.axil-header .header-search .mobile-search-wrapper .header-search-form .form-control {
    width: 100% !important;
    height: 41px !important;
    padding: 0 55px 0 20px !important;
    border: none !important;
    background: transparent !important;
    font-size: 14px !important;
    outline: none !important;
    border-radius: 25px !important;
    order: 1 !important;
}

.axil-header .header-search .mobile-search-wrapper .header-search-form .search-button,
.axil-header .header-search .mobile-search-wrapper .header-search-form button[type="submit"] {
    position: absolute !important;
    right: 3px !important;
    top: 3px !important;
    width: 39px !important;
    height: 39px !important;
    background: #3858f6 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 2 !important;
    order: 2 !important;
    padding: 0 !important;
}

.axil-header .header-search .mobile-search-wrapper .header-search-form .search-button:hover,
.axil-header .header-search .mobile-search-wrapper .header-search-form button[type="submit"]:hover {
    background: #2c46d4 !important;
    transform: scale(1.05) !important;
}

.axil-header .header-search .mobile-search-wrapper .header-search-form .search-button i,
.axil-header .header-search .mobile-search-wrapper .header-search-form button[type="submit"] i {
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   RESPONSIVE SEARCH FIXES
   ======================================== */

@media (max-width: 767px) {
    .axil-header .header-search .header-search-form {
        display: none !important;
    }
    
    .axil-header .header-search .mobile-search-wrapper {
        display: block !important;
    }
    
    .axil-header .header-search .mobile-search-wrapper .header-search-form {
        width: 260px !important;
        right: -10px !important;
    }
}

@media (min-width: 768px) {
    .axil-header .header-search .mobile-search-wrapper {
        display: none !important;
    }
    
    .axil-header .header-search .header-search-form {
        display: block !important;
    }
}

/* ========================================
   FONT AWESOME ICON FIX
   ======================================== */

/* Ensure Font Awesome icons load properly */
.axil-header i.fal.fa-search,
.axil-header i.fas.fa-search {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro" !important;
    font-weight: 400 !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    line-height: 1 !important;
}

.axil-header i.fal.fa-search:before,
.axil-header i.fas.fa-search:before {
    content: "\f002" !important;
}

/* ========================================
   DARK MODE SEARCH FIXES
   ======================================== */

.dark-mode .axil-header .header-search .header-search-form .axil-search.form-group,
.axil-header.header-dark .header-search .header-search-form .axil-search.form-group {
    background: #2a2a2a !important;
}

.dark-mode .axil-header .header-search .header-search-form .axil-search.form-group input,
.axil-header.header-dark .header-search .header-search-form .axil-search.form-group input {
    color: #ffffff !important;
}

.dark-mode .axil-header .header-search .mobile-search-wrapper .search-button-toggle,
.axil-header.header-dark .header-search .mobile-search-wrapper .search-button-toggle {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

/* ========================================
   FINAL OVERRIDE PROTECTION
   ======================================== */

/* Force these styles to override any conflicting CSS */
.axil-header.axil-header.axil-header .header-search .search-button,
.axil-header.axil-header.axil-header .header-search button[type="submit"] {
    position: absolute !important;
    right: 3px !important;
    top: 3px !important;
    width: 39px !important;
    height: 39px !important;
    border-radius: 50% !important;
    background: #3858f6 !important;
    color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.axil-header.axil-header.axil-header .header-search .search-button i,
.axil-header.axil-header.axil-header .header-search button[type="submit"] i {
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}