.multi-select-tag {
    display: inline-block;
    position: relative;
    width: 100%;
    font-family: Arial, sans-serif;
}

.multi-select-tag .multi-select {
    width: 100%;
    position: relative;
    cursor: pointer;
}

.multi-select-tag .multi-select input {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
    width: calc(100% - 16px);
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.multi-select-tag .multi-select .options {
    position: absolute;
    z-index: 1000; /* Ensures visibility above other elements */
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    max-height: 150px; /* Restrict height */
    overflow-y: auto; /* Enable scrolling for overflowing content */
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

.multi-select-tag .multi-select .option {
    padding: 8px;
    cursor: pointer;
}

.multi-select-tag .multi-select .option:hover {
    background: #f1f1f1;
}

.multi-select-tag .multi-select .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0;
}

.multi-select-tag .multi-select .tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background: #007bff;
    color: white;
    border-radius: 3px;
    font-size: 12px;
}

.multi-select-tag .multi-select .tag .remove {
    margin-left: 5px;
    cursor: pointer;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .multi-select-tag .multi-select .options {
        position: static; /* Ensures dropdown stays within the flow */
        margin-top: 10px;
        max-height: 150px; /* Smaller max-height for smaller screens */
        padding: 5px; /* Padding for better touch targets */
    }

    .multi-select-tag .multi-select .option {
        padding: 12px 20px;
        font-size: 14px; /* Larger font size for readability */
    }

    .multi-select-tag .multi-select input {
        padding: 10px;
        font-size: 14px; /* Improved input usability */
        width: 100%; /* Ensure full-width input */
    }

    .multi-select-tag .multi-select .tags {
        gap: 10px; /* Increase gap between tags */
        margin-bottom: 10px;
    }

    .multi-select-tag .multi-select .tag {
        font-size: 14px;
        padding: 6px 12px;
    }

    .form-container {
        margin-bottom: 60px; /* Adds space for submit button */
    }

    .custom-submit-btn {
        position: fixed; /* Fix button at the bottom */
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        width: 90%; /* Full-width button */
    }
}
