/* Style for the search container */
.search-container {
    display: grid;
    align-items: center;
    background-color: white;
    border-radius: 25px;
    padding: 8px 15px;
    max-width: 400px;
    margin: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 20;
    isolation: isolate;
}

.search-bar {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Input styling */
.search-input {
    border: none !important;
    outline: none;
    background: none;
    font-size: 16px;
    color: #8e9093;
    width: 100%;
    margin-left: 10px;
    position: relative;
    bottom: 5px;
}

/* Search icon styling */
.search-icon {
    color: #8e9093;
    font-size: 18px;
}

/* Placeholder text styling */
.search-input::placeholder {
    color: #c1c2c5;
    font-style: italic;
}

/* Optional: Adding a hover effect on the search box */
.search-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-next {
    cursor: pointer;
    padding: 0;
    background: none;
    border: 0;
    font-size: 16px;
    display:flex;
}

.search-next span {
    position: relative;
    bottom: 1px;
}

.search-next:hover {
    opacity: 0.8;
}

/* Modal styling */
.tags-modal {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    z-index: 30;
    height: auto;
    margin-top: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tags-modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-height: min(42vh, 300px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tags-modal.show {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 15px;
    padding: 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tag-button:hover {
    background-color: #007bff;
    color: white;
}

/* Active tag styling */
.tag-button.active {
    background-color: #007bff;
    color: white;
}

.selected-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.selected-tag {
    background-color: #007bff;
    color: white;
    border-radius: 15px;
    padding: 5px;
    font-size: 10px;
    display: flex;
    align-items: center;
}

.selected-tag span {
    margin-left: 5px;
    cursor: pointer;
}

.search-input {
    border: none !important;
    outline: none;
    background: none;
    font-size: 16px;
    color: #8e9093;
    width: 100%;
    margin-top: 10px;
}

.search-next {
    cursor: pointer;
    padding: 0;
    background: none;
    border: 0;
    font-size: 16px;
    display: flex;
}

.search-next span {
    position: relative;
    bottom: 1px;
}

.search-next:hover {
    opacity: 0.8;
}

.more-tag {
    background-color: #e0e0e0;
    color: #333;
    cursor: pointer;
    font-weight: bold;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* .tags-modal {
        top: 135px;
    } */

    .search-container {
        max-width: 95%;
        margin: 10px auto;
        padding: 10px 12px;
    }

    .tags-modal {
        top: calc(100% + 8px);
        width: 100%;
        left: 0;
    }

    .tags-modal-content {
        padding: 15px;
        max-height: min(36vh, 240px);
    }

    .tag-button {
        font-size: 14px;
        padding: 8px 12px;
    }

    .search-input {
        font-size: 14px;
        margin-left: 8px;
    }

    .search-next {
        font-size: 14px;
    }
}
