/* Enhanced Search Bar Styles */
.search-bar .search-input {
    width: 400px;
    max-width: 90vw;
}

.search-bar .search-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.search-bar .form-inner2 {
    position: relative;
    width: 100%;
}

.search-bar .form-inner2 input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd !important;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.search-bar .form-inner2 input:focus {
    outline: none;
    border-color: #523B8E !important;
    box-shadow: 0 0 0 3px rgba(82, 59, 142, 0.1);
}

/* Search Category Buttons */
.search-category-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.search-category-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
}

.search-category-btn svg {
    flex-shrink: 0;
    color: #523B8E;
    transition: all 0.3s ease;
}

.search-category-btn:hover {
    background: #523B8E;
    border-color: #523B8E;
    color: #fff;
    transform: translateX(5px);
}

.search-category-btn:hover svg {
    color: #FFB52A;
}

.search-category-btn:active {
    transform: translateX(3px) scale(0.98);
}

/* Responsive Design */
@media (max-width: 767px) {
    .search-bar .search-input {
        width: 350px;
    }

    .search-bar .search-group {
        padding: 15px;
        gap: 12px;
    }

    .search-category-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .search-category-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .search-bar .search-input {
        width: 90vw;
        left: 5vw;
    }

    .search-bar .search-group {
        padding: 12px;
    }

    .search-category-btn {
        padding: 10px 12px;
        font-size: 12px;
        gap: 8px;
    }
}

/* Animation for search input opening */
.search-bar .search-input {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.search-bar .search-input::before,
.search-bar .search-input::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.search-bar .search-group {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.search-bar .search-input.show {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for buttons */
.search-category-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.search-category-btn.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sidebar Search Widget Styles */
.search-widget {
    margin-top: 15px;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-widget-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd !important;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-widget-input:focus {
    outline: none;
    border-color: #523B8E !important;
    box-shadow: 0 0 0 3px rgba(82, 59, 142, 0.1);
}

.search-widget-btn {
    padding: 10px 15px;
    background: #523B8E;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-widget-btn:hover {
    background: #3d2d6b;
    transform: scale(1.05);
}

.search-widget-btn svg {
    width: 18px;
    height: 18px;
}

.active-search-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.active-search-badge span {
    font-weight: 500;
}

.clear-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    color: #999;
    text-decoration: none;
    transition: all 0.3s ease;
}

.clear-search:hover {
    background: #523B8E;
    color: #fff;
}

.clear-search svg {
    width: 12px;
    height: 12px;
}
