/* Floating Search Box Wrapper */
.floating-search {
    display: none;
    position: fixed !important;
    top: 100px;
    right: 40px;
    width: 250px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    padding: 12px;
    z-index: 9999; /* Ensure always on top */
    touch-action: none;
    cursor: move;

    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Active state (when box is shown) */
.floating-search.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Header bar inside the search box */
.floating-search .search-header {
    background: #f1f3f5;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Close icon inside header */
.floating-search .close-search {
    font-size: 1.2rem;
    cursor: pointer;
    color: #495057;
}

/* Input inside search box */
.floating-search input[type="text"] {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 0.875rem;
}

/* Dark Theme Styling */
.dark-mode .floating-search {
    background-color: #1e1e2f;
    border-color: #2c2c3a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    color: #eaeaea;
}

.dark-mode .floating-search .search-header {
    background-color: #2b2b3d;
    color: #eaeaea;
}

.dark-mode .floating-search input[type="text"] {
    background-color: #2b2b3d;
    color: #ffffff;
    border: 1px solid #444;
}

.dark-mode .floating-search input[type="text"]::placeholder {
    color: #999;
}

.dark-mode .floating-search .close-search {
    color: #ccc;
}
